Re-attaching whitespace siblings broken for generated content
Reported by
r...@opera.com,
Sep 21 2016
|
|||
Issue descriptionWe are not reattaching whitespace-only text nodes when needed when reattaching ::before/::after. For more context, see also issue 648931 .
,
Feb 13 2017
,
Mar 30 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/06fa41652fb4ba0654a28453491c8347109d5620 commit 06fa41652fb4ba0654a28453491c8347109d5620 Author: rune <rune@opera.com> Date: Thu Mar 30 13:00:36 2017 Pass nextTextSibling to ::before layout rebuild. Correct whitespace re-attachment relies on the next text node being tracked in order to re-attach when a previous sibling element changes display type. We did that just while traversing light tree siblings or slotted siblings. ::before pseudo element display type may affect following whitespace text node, so we need to pass on the next text sibling result from the descendant traversal. As we traverse siblings from right-to-left, we should also rebuild ::after before DOM siblings, and ::before after DOM siblings. This fixes the case where an element, whose left-most child, or shadow root child, is a whitespace text node, changes its ::before element's display type from block to inline. The pseudo element layout tree rebuild is renamed from reattach* to rebuild* to match the semantics of the rest of the methods. R=esprehn@chromium.org BUG= 648951 Review-Url: https://codereview.chromium.org/2766163002 Cr-Commit-Position: refs/heads/master@{#460737} [add] https://crrev.com/06fa41652fb4ba0654a28453491c8347109d5620/third_party/WebKit/LayoutTests/fast/text/whitespace/reattach-before-pseudo-expected.html [add] https://crrev.com/06fa41652fb4ba0654a28453491c8347109d5620/third_party/WebKit/LayoutTests/fast/text/whitespace/reattach-before-pseudo.html [modify] https://crrev.com/06fa41652fb4ba0654a28453491c8347109d5620/third_party/WebKit/Source/core/dom/ContainerNode.cpp [modify] https://crrev.com/06fa41652fb4ba0654a28453491c8347109d5620/third_party/WebKit/Source/core/dom/ContainerNode.h [modify] https://crrev.com/06fa41652fb4ba0654a28453491c8347109d5620/third_party/WebKit/Source/core/dom/Element.cpp [modify] https://crrev.com/06fa41652fb4ba0654a28453491c8347109d5620/third_party/WebKit/Source/core/dom/Element.h [modify] https://crrev.com/06fa41652fb4ba0654a28453491c8347109d5620/third_party/WebKit/Source/core/dom/shadow/ShadowRoot.cpp [modify] https://crrev.com/06fa41652fb4ba0654a28453491c8347109d5620/third_party/WebKit/Source/core/dom/shadow/ShadowRoot.h
,
Mar 30 2017
|
|||
►
Sign in to add a comment |
|||
Comment 1 by suzyh@chromium.org
, Sep 22 2016