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

Issue 764686 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
NOT IN USE
Closed: Sep 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

ShadowRoot::SkipRebuildLayoutTree must traverse flat tree

Reported by r...@opera.com, Sep 13 2017

Issue description

RebuildLayoutTree() has been changed to traverse in flat tree order, but SkipRebuildLayoutTree() still traverses the light tree.

 
slotted.html
316 bytes View Download

Comment 1 by shend@chromium.org, Sep 13 2017

Labels: Hotlist-CodeHealth

Comment 2 by shend@chromium.org, Sep 13 2017

Labels: Update-Quarterly
Project Member

Comment 4 by bugdroid1@chromium.org, Sep 15 2017

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

commit 7b3ead21ca2926d6d2780780acc6c2317399d274
Author: Rune Lillesveen <rune@opera.com>
Date: Fri Sep 15 07:57:01 2017

Always rebuild layout tree for shadow root when host is rebuilt.

We tried to do a light-weight search for the first in-flow or text
child of the shadow root when shadow root children didn't need a
rebuild. This was done to make the WhiteAttacher point to the correct
text node when re-attaching the ::before element.

This code did not properly handle slots and insertion points. Also,
supporting display:contents for ::after means we will have to traverse
shadow root children from its last node until we find the first in-flow
to properly attach a space inside an ::after element.

For simplicity, and correctness, walk the shadow root children using
RebuildChildrenLayoutTrees() instead.

Bug:  764686 
Change-Id: Icb9f8db7172ea54bd876fd95ca722c2906b4c639
Reviewed-on: https://chromium-review.googlesource.com/667138
Reviewed-by: nainar <nainar@chromium.org>
Reviewed-by: meade_UTC10 <meade@chromium.org>
Commit-Queue: Rune Lillesveen <rune@opera.com>
Cr-Commit-Position: refs/heads/master@{#502194}
[add] https://crrev.com/7b3ead21ca2926d6d2780780acc6c2317399d274/third_party/WebKit/LayoutTests/fast/text/whitespace/reattach-before-pseudo-slot-fallback-whitespace-expected.html
[add] https://crrev.com/7b3ead21ca2926d6d2780780acc6c2317399d274/third_party/WebKit/LayoutTests/fast/text/whitespace/reattach-before-pseudo-slot-fallback-whitespace.html
[modify] https://crrev.com/7b3ead21ca2926d6d2780780acc6c2317399d274/third_party/WebKit/Source/core/dom/ShadowRoot.cpp
[modify] https://crrev.com/7b3ead21ca2926d6d2780780acc6c2317399d274/third_party/WebKit/Source/core/dom/ShadowRoot.h

Comment 5 by r...@opera.com, Sep 15 2017

Status: Fixed (was: Started)

Sign in to add a comment