[Webkit-unassigned] [Bug 158421] New: distributed elements not rendering when parent visibility is initially display:none and then toggled

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jun 6 08:31:53 PDT 2016


https://bugs.webkit.org/show_bug.cgi?id=158421

            Bug ID: 158421
           Summary: distributed elements not rendering when parent
                    visibility is initially display:none and then toggled
    Classification: Unclassified
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Macintosh
                OS: OS X 10.11
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Layout and Rendering
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: paulkinlan at google.com
                CC: simon.fraser at apple.com

Created attachment 280594
  --> https://bugs.webkit.org/attachment.cgi?id=280594&action=review
actual results - slotted elements are not rendered.

I think I have found an issue with Shadow DOM and slotted elements not displaying in WebKit.  

I have a <slot> whose parent is hidden (display: none) and toggled later (display:block).  When toggled, the elements
that are distributed into the <slot> are not rendered.  You have to force a layout/paint via devtools (toggle :active for example)
for it to render the distributed elements.

It looks like that WebKit is making an optimization where it knows initially the distributed elements are not visible so
it doesn't layout the elements, however it doesn't then realise that the parent has been made visible so it doesn't force
a layout and render of the elements.

Demo: https://jsbin.com/cebura/latest
Smallest test case: https://output.jsbin.com/jusuga/latest 
    Expected: click the toggle button in Chrome canary with Experiemental web platform features enabled and you will see the distributed h1 is rendered
    Actual (WebKit): click the toggle button, nothing rendered.  Go to devtools and for a layout (I click :active on the slot and you will see it render)

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160606/5a830531/attachment.html>


More information about the webkit-unassigned mailing list