DescriptionPass 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}
Committed: https://chromium.googlesource.com/chromium/src/+/06fa41652fb4ba0654a28453491c8347109d5620
Patch Set 1 #
Total comments: 10
Patch Set 2 : Fixed review issues. #
Total comments: 2
Patch Set 3 : Documentation fix. #Messages
Total messages: 27 (15 generated)
|