Chromium Code Reviews| Index: third_party/WebKit/Source/core/dom/shadow/FlatTreeTraversal.cpp |
| diff --git a/third_party/WebKit/Source/core/dom/shadow/FlatTreeTraversal.cpp b/third_party/WebKit/Source/core/dom/shadow/FlatTreeTraversal.cpp |
| index 06b2b29cee3bbf52179c973a42b3182b1a85eba4..691889b889681cea47cf44e3f54bdc5b526b72ad 100644 |
| --- a/third_party/WebKit/Source/core/dom/shadow/FlatTreeTraversal.cpp |
| +++ b/third_party/WebKit/Source/core/dom/shadow/FlatTreeTraversal.cpp |
| @@ -100,6 +100,10 @@ static HTMLSlotElement* finalDestinationSlotFor(const Node& node) |
| // document flat tree. See FlatTreeTraversalTest's redistribution test for details. |
| Node* FlatTreeTraversal::traverseSiblings(const Node& node, TraversalDirection direction) |
| { |
| + // TODO(hayato): Stop this hack for a pseudo element because a pseudo element should not be in a document flat tree. |
| + if (node.isPseudoElement()) |
| + return direction == TraversalDirectionForward ? node.nextSibling() : node.previousSibling(); |
|
rune
2016/08/18 23:54:54
Shouldn't LayoutTreeBuilderTraversal handle pseudo
hayato
2016/08/19 03:58:47
Good point! I missed LayoutTreeBuilderTraversal.
|
| + |
| if (node.isChildOfV1ShadowHost()) |
| return traverseSiblingsForV1HostChild(node, direction); |