Automatic update from web-platform-tests
dialog.requestClose() test for removing closedby midway through (#60154)
This test demonstrates an interop bug with dialog.requestClose() and closedby.
--
wpt-commits: 1b8d9de898c425bcfe37f95f0e2acdebd2b420f0
wpt-pr: 60154
Automatic update from web-platform-tests
Remove requestIdleCallback from a dialog test (#59279)
As far as I can tell, it just wants to make sure we've had time to
process the close before then calling it again: we don't need to wait
for as long as requestIdleCallback would.
--
wpt-commits: bc3f573143039309b30f6bd715d124ea701ecf53
wpt-pr: 59279
Automatic update from web-platform-tests
Clean up focusing in `dialog-closedby-start-open.html`
--
wpt-commits: 4be4d67d1376844f34331185b7fbf09183ef49f1
wpt-pr: 58862
Automatic update from web-platform-tests
Restore focus on dialog close when dialog is focused
Dialogs only restore focus to the previously focused element on close
when an element inside the dialog is focused. When there is no focusable
element inside of the dialog and the dialog element itself becomes
focused, we should restore focus to the previously focused element when
the dialog is closed.
This change matches the spec, which uses an inclusive descendant check
on the dialog element.
Fixed: 497884156
Change-Id: I48e0e617a82a3ebe784884bd60f7d81e2776b71d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7735579
Commit-Queue: Joey Arhar <[email protected]>
Reviewed-by: David Baron <[email protected]>
Reviewed-by: Joey Arhar <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1613005}
--
wpt-commits: c4780b9eb3332f8c0f4aa388ef0efb9ce12f71e9
wpt-pr: 59104
Automatic update from web-platform-tests
Add a test for inserting multiple details elements with a document fragment. (#58526)
--
wpt-commits: fd24702f14993bf02f8245c31d489dfb1a6ae46b
wpt-pr: 58526
Automatic update from web-platform-tests
Credit myself on tests I previously wrote (#58140)
5bc1df18d9ba Add WPT reftests for conic-gradient and stop normalization.
590dd7f5d93c Add more <dialog> focus-related tests
b3958a2b7798 Add tests for animating CSS ::backdrop pseudo-element
00668dccbfd2 Import invalid-media-query-list.html from WebKit layout tests (#53149)
d6ef7143ef34 Test that focusing steps do not run when dialog is disconnected
108476e46779 WebKit export: [CSS Highlight API] REGRESSION(270146@main): Crash trying to serialize `::highlight` (#42955)
3455549bab45 WebKit export: [CSS random()] Allow in `@keyframes` (#53860)
7cac08694abc WebKit export: [view-transitions] Allow animations to run more than once (#44609)
f9c9898520bc WebKit export: [view-transitions] Fix white flash on certain demos (#45212)
--
wpt-commits: b15b9424e0e34c9010e01455ec3c2bbd41a9b49a
wpt-pr: 58140
Automatic update from web-platform-tests
classifies "open-pseudo" web feature (#56793)
* first pass at mapping "open-pseudo"
* adds additional mappings
Noting that the spec is referenced in all of these tests: https://drafts.csswg.org/selectors-4/#open-state
--
wpt-commits: a94b616f3d392dba0131be07b86f794365ae9614
wpt-pr: 56793
Automatic update from web-platform-tests
Fix focus related failures due to URL bar being focused on launch
Chromium-based browsers automatically focus the URL bar on launch which can prevent focus events from firing. Fix this by ensuring the page has focus first and in some cases simply change the expectation to use document.activeElement instead.
--
wpt-commits: 744d45bafb0ca4f75f19941da2d4a4d9d85b7748
wpt-pr: 56270
Automatic update from web-platform-tests
Reapply "Make light dismiss use click instead of pointerdown/up"
This reverts commit df686d944283cfbb801057be0c8134c3e0c3f674.
The previous attempt had a flaky test which has been removed this time
around.
Bug: 425579196, 408010435
Change-Id: I6f0563e0c04197a792b2cee6efe1535de432cc17
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7235545
Reviewed-by: Robert Flack <[email protected]>
Commit-Queue: Joey Arhar <[email protected]>
Reviewed-by: Joey Arhar <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1556246}
--
wpt-commits: 5076a8ff63443384259f01ec0d0f041e64e18999
wpt-pr: 56612
Automatic update from web-platform-tests
Remove reliance on :open pseudo selector in unrelated tests (#54543)
WebKit doesn't yet support this pseudo class, so match against [open] instead.
--
wpt-commits: f394836323e790c80d743d2580b0891e78ac894e
wpt-pr: 54543
Automatic update from web-platform-tests
Another attempt to fix <dialog open> top layer behavior
This fixes the case where this element:
```
<dialog open popover id=p>
<script>
p.showPopover();
</script>
```
could be open as a popover, yet not be in the top layer.
See [1] for a first attempt at this fix, but that caused [2], so it
was reverted. This CL cleans up the html.css file a bit, to bring
together the related parts of popover and dialog top layer and display
handling. It also refactors/moves the logic behind the
`:-internal-{popover|dialog}-in-top-layer` pseudo classes, so they use
Element methods. The initial problem with [1] was that since the
`overlay` property is used to control whether the element remains in
the top layer, it's a loop to use `:-internal-popover-in-top-layer`
to control `overlay`. The new code goes back to roughly the same
CSS as before:
```
dialog:modal, [popover]:popover-open {
overlay: auto !important;
}
```
[1] https://chromium-review.googlesource.com/c/chromium/src/+/6185344
[2] https://crbug.com/393947100
Fixed: 388538944
Bug: 393947100
Change-Id: I46c90094f54735908b8ecb8bbe8a0c31f1d548dd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6292794
Commit-Queue: Joey Arhar <[email protected]>
Auto-Submit: Mason Freed <[email protected]>
Reviewed-by: Joey Arhar <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1480691}
--
wpt-commits: 5f6a495c5e0f5663e41d2b759b688f2870d1b54b
wpt-pr: 53492
Automatic update from web-platform-tests
add test ensuring moveBefore does not change the order of open dialogs (#52757)
--
wpt-commits: 55c1bdebbaf774f0065ba0514d76a996d156ad31
wpt-pr: 52757
Automatic update from web-platform-tests
Implement ToggleEvent.source for dialog requestclose
I recently added this to the spec PR after incorporating spec changes
for the addition of dialog.requestClose:
https://github.com/whatwg/html/pull/11186
Bug: 408018828
Change-Id: Ia6a3a2560349760219a863dba814c5addfa60165
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6598554
Reviewed-by: Mason Freed <[email protected]>
Commit-Queue: Joey Arhar <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1468857}
--
wpt-commits: 4f0e0581b96db8b8cb82c1ca74ee08e47225fed0
wpt-pr: 52935
Automatic update from web-platform-tests
Remove the requestIdleCallback test from closedby
Mozilla and Chromium keep ping-ponging this test back and forth because
it's flaky. And the source of the flakiness is that there's an inherent
race in the test, between the call to requestIdleCallback and the `await
test_driver.send_keys`. I added this test initially just to make sure
there wasn't anything weird going on, in [1]. I don't think it's worth
the flakiness in either browser's test system, so this CL just removes
that particular sub-test.
This section is racy:
```
const step = setup(t);
const ESC = '\uE00C';
await test_driver.send_keys(document.documentElement,ESC); // [2]
await step;
```
The [2] line (or equivalent in each test) is racy: we're awaiting
sending keys, but we've also already queued up things, e.g.
requestIdleCallback. The callback might get called before or after
sending the ESC key.
The test was flaky about ~80% of the time for me locally
on a Mac before this CL, and 0% after this CL.
[1] https://chromium-review.googlesource.com/c/chromium/src/+/6259116
Fixed: 417571176
Change-Id: I8ade9b467323c7f8ad4a52f98059d328bb574852
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6559169
Commit-Queue: Mason Freed <[email protected]>
Reviewed-by: Keith Cirkel <[email protected]>
Auto-Submit: Mason Freed <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1462348}
--
wpt-commits: 5855958877a18ace62a91c0cda77b8848a876635
wpt-pr: 52619
Differential Revision: https://phabricator.services.mozilla.com/D250699
Automatic update from web-platform-tests
Implement ToggleEvent.source
The ToggleEvent's source attribute is set to the element which invoked
the element which the ToggleEvent is being fired on. Source can be set
up as a parameter passed to element.showPopover(), an element with the
popovertarget attribute, or an element with the commandfor attribute.
This patch implements support for every element which the ToggleEvent is
currently fired on, including <details>, <dialog>, and popovers.
Bug: 408018828
Change-Id: I43f3cfe66cfcf077980180d598cfb4ccea6c171e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6427115
Reviewed-by: Mason Freed <[email protected]>
Commit-Queue: Joey Arhar <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1461127}
--
wpt-commits: 054fc62514695a3e3cac6eeda9854a09caac1e22
wpt-pr: 52589
Differential Revision: https://phabricator.services.mozilla.com/D250656
We do not need to iterate over all open dialogs, as the top-most dialog
must respond _somehow_ to the escape key press, it either closes, or it
blocks the escape key-press, disallowing outer dialogs to handle the
key-press.
Differential Revision: https://phabricator.services.mozilla.com/D248309
Automatic update from web-platform-tests
Add connectedness/activity check for IsOpen for dialogs
Many such checks of `IsOpen()` implicitly should have also checked
that the dialog was connected to an active document. This CL
replaces several `IsOpen()` checks with `IsOpenAndActive()`, which
avoids a few crashes related to `closedby`.
Also see related spec issue:
https://github.com/whatwg/html/issues/11230
Fixed: 410878546,411623170
Change-Id: Ifc3d66b6a6632fe17acf0258f98bdb557724dc24
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6476484
Commit-Queue: Mason Freed <[email protected]>
Auto-Submit: Mason Freed <[email protected]>
Reviewed-by: Keith Cirkel <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1450659}
--
wpt-commits: 2754b9d6125976e07dd8f8978c31fbf5e54ec5ed
wpt-pr: 52105
Automatic update from web-platform-tests
Fix the issue #51441 by waiting for the actual scrolling to happen in test_move_focus_dont_scroll_viewport. (#51442)
Because scrolling to the button may happen over a period of time, we can't assume that scrollTop has moved
when we receive the first scroll event.
--
wpt-commits: d769a3c872673b8b434e57734120e90fce477c76
wpt-pr: 51442
Automatic update from web-platform-tests
Fix missing invalidation of :open pseudo for dialogs
This was missing, so that changing the `open` attribute did not
invalidate the `:open` pseudo class.
Change-Id: If4bffc3e926b8e40b07a86ddc247f44c7d381812
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6227749
Reviewed-by: Joey Arhar <[email protected]>
Commit-Queue: Mason Freed <[email protected]>
Auto-Submit: Mason Freed <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1426017}
--
wpt-commits: d48385dbf74cb8698fe96277c91c4ed6e18f44ac
wpt-pr: 51008
Automatic update from web-platform-tests
The container node of the dialog element should be connected to a document
Consider this test case:
const dialog = document.createElement('dialog');
dialog.open = true;
const node = document.createElement('div');
node.appendChild(dialog);
document.body.appendChild(node);
This results in a DCHECK failure. When a `dialog` element is added to
`node`, the `HTMLDialogElement::InsertedInto` is called. This method
will continue to be called when `node` is added to the document.
The presence of `ContainerNode` in the document should be evaluated in
`HTMLDialogElement::InsertedInto` and `HTMLDialogElement::RemoveFrom`.
Bug: 398401913, 398630741
Change-Id: I1c656d6a6d808f1c038c9e5d65c0178f26595f48
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6298221
Reviewed-by: Mason Freed <[email protected]>
Auto-Submit: Peng Zhou <[email protected]>
Commit-Queue: Mason Freed <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1425499}
--
wpt-commits: cc174d4d70d350834dbe6c5fafad4bbc9ce3756b
wpt-pr: 50985