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

Issue 765090 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

Incorrect whitespace re-attachment for non-distributed host child

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

Issue description

We are passing the same WhitespaceAttacher when rebuilding a shadow tree as we pass for the light tree children of the host. That might cause incorrect whitespace re-attachment for whitespace after re-attached ::before elements when we have non-distributed whitespace children of the host.

See attached test-case.

 
shadowroot.html
295 bytes View Download
Labels: Hotlist-Interop
Labels: Update-Monthly
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/+/05ad40ab431fd9ebd2b95c5f059eff5e629361fe

commit 05ad40ab431fd9ebd2b95c5f059eff5e629361fe
Author: Rune Lillesveen <rune@opera.com>
Date: Fri Sep 15 08:19:08 2017

Rebuild non-distributed children with separate WhitespaceAttacher.

We used to pass in the same WhitespaceAttacher to the pass over non-
distributed child nodes which caused DidVisitText() to mess up the
whitespace re-attachment of whitespace being the left-most node of the
distributed nodes. In particular if there was a ::before element
changing display type preceding that left-most space.

Instead, make a RebuildNonDistributedChildren() method which passes in
a separate WhitespaceAttacher.

Bug:  765090 
Change-Id: I4fd3bd417d7a5d7accdcb8b6155991093ab05f50
Reviewed-on: https://chromium-review.googlesource.com/666681
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@{#502202}
[add] https://crrev.com/05ad40ab431fd9ebd2b95c5f059eff5e629361fe/third_party/WebKit/LayoutTests/fast/text/whitespace/reattach-before-pseudo-nondistributed-whitespace-expected.html
[add] https://crrev.com/05ad40ab431fd9ebd2b95c5f059eff5e629361fe/third_party/WebKit/LayoutTests/fast/text/whitespace/reattach-before-pseudo-nondistributed-whitespace.html
[modify] https://crrev.com/05ad40ab431fd9ebd2b95c5f059eff5e629361fe/third_party/WebKit/Source/core/dom/ContainerNode.cpp
[modify] https://crrev.com/05ad40ab431fd9ebd2b95c5f059eff5e629361fe/third_party/WebKit/Source/core/dom/ContainerNode.h
[modify] https://crrev.com/05ad40ab431fd9ebd2b95c5f059eff5e629361fe/third_party/WebKit/Source/core/dom/Element.cpp

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

Status: Fixed (was: Started)

Sign in to add a comment