Closed Bug 1494918 Opened 6 years ago Closed 6 years ago

FlattenAssignedNodes should check that slots are in shadow root

Categories

(Core :: DOM: Core & HTML, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
mozilla64
Tracking Status
firefox64 --- fixed

People

(Reporter: smaug, Assigned: smaug)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

No description provided.
Blocks: 1494609
Priority: -- → P2
this is to follow the spec and fixing the difference with other implementation (this issue is coming from bug 1494609). See 5.1. in https://dom.spec.whatwg.org/#find-flattened-slotables Currently we're missing 'whose root is a shadow root'
Attachment #9012855 - Flags: review?(echen)
Attachment #9012855 - Flags: review?(echen) → review+
Pushed by opettay@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/31863507b670 FlattenAssignedNodes should check that slots are in shadow root , r=edgar
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/13297 for changes under testing/web-platform/tests
aha, unexpected pass
Flags: needinfo?(bugs)
Pushed by opettay@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/e6ec31f7a72b FlattenAssignedNodes should check that slots are in shadow root , r=edgar
Upstream web-platform-tests status checks passed, PR will merge once commit reaches central.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
Upstream PR was closed without merging
You might want to add these an extra testcase to verify that the ::slotted(*) CSS rules are applied according to spec as a result of this fix. If it doesn't, then it will be a bug. I've added the test and analysis as a text file. In Firefox 62 the test attached will produce the wrong result according to the spec in #3,#6,#9. With the fix the behavior should be the same as in Chrome. Links to the test in codepen is here too: slotted(*){...} https://codepen.io/orstavik/pen/pxJLEG?editors=1000 If someone is interested, I made two more tests to illustrate how content in a slot gets styled: * {...} https://codepen.io/orstavik/pen/VELXLm?editors=1000 :host {...} https://codepen.io/orstavik/pen/pxJLyG?editors=1000 Can anyone also add a link to a discussion as to why the spec chose to flatten slots in this manner and treat slot children as they do?
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: