[Webkit-unassigned] [Bug 172822] New: We don't invalidate descendants when the matching status of a ::slotted selector changes.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jun 1 10:11:18 PDT 2017


            Bug ID: 172822
           Summary: We don't invalidate descendants when the matching
                    status of a ::slotted selector changes.
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: CSS
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: ecobos at igalia.com
                CC: koivisto at iki.fi, rniwa at webkit.org
            Blocks: 172753

Consider the following test-case, straight from fast/shadow-dom/css-scoping-slot-with-id.html:

<my-host id="t4"><div>text</div></my-host>
var host = document.querySelector('#t4');
var shadow = host.attachShadow({ mode: 'open' });
shadow.innerHTML = `
    #myslot::slotted(*) {
      background-color: green; width: 100%; height: 100%;
  <slot id="notmyslot" style="color:green"></slot>
var slot = shadow.querySelector("#notmyslot");
slot.setAttribute("id", "myslot");

This test-case is failing with my patch in bug 172753 because of the following:

We see that the <slot> element may change style and schedule it for a recalc, _but_ we don't invalidate the subtree, which may change because of the ::slotted pseudo-element, so when we see that the style hasn't changed for it we just don't recalc the inner <div>'s style.

This is wallpapered because right now we always force an Inherit change for display: contents elements, which ends up working in this test case.

Referenced Bugs:

[Bug 172753] Don't always do a style recalc for display: contents elements.
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170601/54c03434/attachment.html>

More information about the webkit-unassigned mailing list