Closed Bug 1689721 Opened 3 years ago Closed 3 years ago

[wpt-sync] Sync PR 27399 - Change <popup> to LayoutObjectIsNeeded from AdjustStyleForHTMLElement

Categories

(Core :: DOM: Core & HTML, task, P4)

task

Tracking

()

RESOLVED FIXED
87 Branch
Tracking Status
firefox87 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

(Blocks 1 open bug, )

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 27399 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/27399
Details from upstream follow.

b'Mason Freed <masonfreed@chromium.org>' wrote:

Change <popup> to LayoutObjectIsNeeded from AdjustStyleForHTMLElement

This approach gives the same end-result: popups aren't shown if
their 'open' property is false. But per this comment [1], removing
the entire layout object is a better way to accomplish this.

Note that Element::SetIsInTopLayer() already calls
SetForceReattachLayoutTree() at [2], so there's no need to call
it here in MarkStyleDirty(). The call to SetNeedsStyleRecals()
does seem to be necessary, however, or no popup is rendered.

[1] https://chromium-review.googlesource.com/c/chromium/src/+/2648613/8/third_party/blink/renderer/core/html/resources/html.css#b1237
[2] https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/renderer/core/dom/element.cc;l=5366;drc=699e1bd813aa71e101fc20a6ded0d23a277181e4

Bug: 1170977
Change-Id: I3368af36631816d8377ab3ba0ea052f2ac1e138a
Cq-Do-Not-Cancel-Tryjobs: true
Reviewed-on: https://chromium-review.googlesource.com/2657193
WPT-Export-Revision: 69b8044dac180880bf1af41adc1f59957ba1ead2

PR 27399 applied with additional changes from upstream: 76a0658b54cd51506018989fb6753f9becbd1a82, 782cde356c4a2b40bc5994f7dc035335462ff165, da4da6f4a54dbfb77d3bfdb9068a8da75bc2dafd
Component: web-platform-tests → DOM: Core & HTML
Product: Testing → Core

CI Results

Ran 15 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 2 tests and 4 subtests

Status Summary

Firefox

OK : 2
FAIL: 7

Chrome

OK : 2
PASS: 2
FAIL: 5

Safari

OK : 2
FAIL: 7

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

/html/semantics/interactive-elements/the-popup-element/popup-element-basic.tentative.html
popup element exists: FAIL (Chrome: PASS, Safari: FAIL)
The IDL "open" content attribute must have no effect, and must not be reflected to the WebIDL.: FAIL (Chrome: FAIL, Safari: FAIL)
The only visibility control for <popup> is through .show() and .hide().: FAIL (Chrome: FAIL, Safari: FAIL)
/html/semantics/interactive-elements/the-popup-element/popup-shadow-dom.tentative.html
Popups located inside shadow DOM can still be shown: FAIL (Chrome: PASS, Safari: FAIL)
anchor references do not cross shadow boundaries: FAIL (Chrome: FAIL, Safari: FAIL)
anchor references use the DOM tree not the flat tree: FAIL (Chrome: FAIL, Safari: FAIL)
The popup stack is preserved across shadow-inclusive ancestors: FAIL (Chrome: FAIL, Safari: FAIL)

Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b4408dbee204
[wpt PR 27399] - Add an internal open pseudo state for <popup>, a=testonly
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 87 Branch
You need to log in before you can comment on or make changes to this bug.