Doesn't update assigned node for slots correctly in certain case

RESOLVED FIXED in Firefox 68

Status

()

defect
P2
normal
RESOLVED FIXED
4 months ago
3 months ago

People

(Reporter: edgar, Assigned: edgar)

Tracking

(Blocks 1 bug)

unspecified
mozilla68
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox68 fixed)

Details

Attachments

(2 attachments)

I found this issue while reviewing https://github.com/whatwg/dom/pull/695.

Here is the test script: https://software.hixie.ch/utilities/js/live-dom-viewer/?saved=6885

Expected result:
We should assign p with slot="assigned1" to slot with id="slot3"
after p in shadowRoot1 is removed.

Actual result:
We fall back to slotable child of slot3.

Blocks: shadowdom

And I got this assertion in debug build.

Assertion failure: content->GetFlattenedTreeParentNodeForStyle() (Node not in the flattened tree still has a frame?), at /Users/edgarchen/Workspace/mercurial/mozilla-central/layout/base/PresShell.cpp:3985
#01: AssertFrameSubtreeIsSane(nsIFrame const&)[/Users/edgarchen/Workspace/mercurial/mozilla-central/objdir-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x663ecc1]
#02: AssertFrameSubtreeIsSane(nsIFrame const&)[/Users/edgarchen/Workspace/mercurial/mozilla-central/objdir-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x663ed93]
#03: AssertFrameSubtreeIsSane(nsIFrame const&)[/Users/edgarchen/Workspace/mercurial/mozilla-central/objdir-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x663ed93]
#04: AssertFrameSubtreeIsSane(nsIFrame const&)[/Users/edgarchen/Workspace/mercurial/mozilla-central/objdir-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x663ed93]
#05: AssertFrameSubtreeIsSane(nsIFrame const&)[/Users/edgarchen/Workspace/mercurial/mozilla-central/objdir-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x663ed93]
#06: AssertFrameSubtreeIsSane(nsIFrame const&)[/Users/edgarchen/Workspace/mercurial/mozilla-central/objdir-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x663ed93]
#07: AssertFrameSubtreeIsSane(nsIFrame const&)[/Users/edgarchen/Workspace/mercurial/mozilla-central/objdir-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x663ed93]
#08: AssertFrameSubtreeIsSane(nsIFrame const&)[/Users/edgarchen/Workspace/mercurial/mozilla-central/objdir-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x663ed93]
#09: AssertFrameSubtreeIsSane(nsIFrame const&)[/Users/edgarchen/Workspace/mercurial/mozilla-central/objdir-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x663ed93]
#10: AssertFrameTreeIsSane(mozilla::PresShell const&)[/Users/edgarchen/Workspace/mercurial/mozilla-central/objdir-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x660362d]
...

Assignee: nobody → echen
Posted file reduced testcase

It looks like we probably need something similar like bug 1435632.

Pushed by echen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d6bc3bde65d6
Moving assigned nodes caused by slot removal should properly invalidate layout; r=emilio
Status: NEW → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/16878 for changes under testing/web-platform/tests
Upstream PR merged
You need to log in before you can comment on or make changes to this bug.