Skip to content

Commit

Permalink
Re-do close watcher user activation tracking
Browse files Browse the repository at this point in the history
Our previous approach for close watcher user activation tracking had
cases where we could  allow the cancel event to fire, but we were not
allowing it.

Fixing this is nontrivial. We need to more closely track the allowed
number of close watchers, and use it when making decisions about
creating ungrouped close watchers or firing cancel events. This allows
us to pass test cases like:

* A close watcher stack that is relatively empty compared to the amount
  of user activations so far, needs to allow cancel events.

* A close watcher stack that is full compared to the amount of user
  activations so far, needs to prevent cancel events.

Additionally, our previous mechanism of tracking groups by using
booleans on the close watchers was buggy when a close watcher was
destroyed. Instead, properly track the groups as a vector of vectors.

Spec PR: whatwg/html#10168

Bug: 1512224
Change-Id: I6d7ccdc27c69f457455f517dcdbcc71d615b4290
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5232387
Reviewed-by: Joey Arhar <[email protected]>
Commit-Queue: Domenic Denicola <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1268262}
  • Loading branch information
domenic authored and chromium-wpt-export-bot committed Mar 5, 2024
1 parent 08b559d commit 01412b2
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
event.preventDefault();
});

await test_driver.bless();
bottomDialog.showModal();
await blessTopLayer(bottomDialog);
topDialog.showModal();
Expand Down

0 comments on commit 01412b2

Please sign in to comment.