New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 622185 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug

Blocking:
issue 531990



Sign in to add a comment

Assigned node is skipped for layout update

Project Member Reported by kochi@chromium.org, Jun 22 2016

Issue description

Once layout for an element is done, there is a case that the element's
layout is not recalculated.

I found the case when the element is under a shadow host, and slotted
to some slot inside its parent's shadow root.

Repro case:
http://jsbin.com/diloso/7/edit?html,js,output

You should see green background, but if you see red background,
the style in the light DOM is applied and inheritance in shadow tree
is not working.
 

Comment 1 by hayato@chromium.org, Jun 22 2016

Cc: kochi@chromium.org
Owner: hayato@chromium.org
Project Member

Comment 2 by bugdroid1@chromium.org, Jun 23 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/505c030552ed7a13a108f77ce0829409e542b07c

commit 505c030552ed7a13a108f77ce0829409e542b07c
Author: hayato <hayato@chromium.org>
Date: Thu Jun 23 01:49:27 2016

Make sure to lazyReattach a distributed node if it is already attached

For Shadow DOM v0, InsertionPoint::setDistributedNodes() is calling
lazyReattachIfAttached for distributed nodes, if necessary.

The same thing should be done for Shadow DOM v1 too. Unless that, the old layout
object will be re-used wrongly.

BUG= 531990 , 622185 

Review-Url: https://codereview.chromium.org/2086013003
Cr-Commit-Position: refs/heads/master@{#401512}

[add] https://crrev.com/505c030552ed7a13a108f77ce0829409e542b07c/third_party/WebKit/LayoutTests/shadow-dom/layout-expected.html
[add] https://crrev.com/505c030552ed7a13a108f77ce0829409e542b07c/third_party/WebKit/LayoutTests/shadow-dom/layout.html
[modify] https://crrev.com/505c030552ed7a13a108f77ce0829409e542b07c/third_party/WebKit/Source/core/dom/shadow/SlotAssignment.cpp
[modify] https://crrev.com/505c030552ed7a13a108f77ce0829409e542b07c/third_party/WebKit/Source/core/html/HTMLSlotElement.cpp
[modify] https://crrev.com/505c030552ed7a13a108f77ce0829409e542b07c/third_party/WebKit/Source/core/html/HTMLSlotElement.h

Comment 3 by hayato@chromium.org, Jun 23 2016

Status: Fixed (was: Started)

Sign in to add a comment