Index: third_party/WebKit/Source/core/dom/LayoutTreeBuilderTraversal.cpp |
diff --git a/third_party/WebKit/Source/core/dom/LayoutTreeBuilderTraversal.cpp b/third_party/WebKit/Source/core/dom/LayoutTreeBuilderTraversal.cpp |
index a9a0a1965dee92ade95f1b764876bf2e9a11a4b6..a502a25952b6965290486d37a9b59ef866ced8bc 100644 |
--- a/third_party/WebKit/Source/core/dom/LayoutTreeBuilderTraversal.cpp |
+++ b/third_party/WebKit/Source/core/dom/LayoutTreeBuilderTraversal.cpp |
@@ -250,7 +250,7 @@ static LayoutObject* nextSiblingLayoutObjectInternal(Node* node, |
pseudoAwareFirstChild(*sibling), limit); |
if (layoutObject) |
return layoutObject; |
- if (!limit) |
+ if (limit == -1) |
return nullptr; |
} |
@@ -270,7 +270,7 @@ LayoutObject* LayoutTreeBuilderTraversal::nextSiblingLayoutObject( |
return sibling; |
Node* parent = LayoutTreeBuilderTraversal::parent(node); |
- while (limit && parent && hasDisplayContentsStyle(*parent)) { |
+ while (limit != -1 && parent && hasDisplayContentsStyle(*parent)) { |
if (LayoutObject* sibling = |
nextSiblingLayoutObjectInternal(nextSibling(*parent), limit)) |
return sibling; |
@@ -296,7 +296,7 @@ static LayoutObject* previousSiblingLayoutObjectInternal(Node* node, |
pseudoAwareLastChild(*sibling), limit); |
if (layoutObject) |
return layoutObject; |
- if (!limit) |
+ if (limit == -1) |
return nullptr; |
} |
@@ -316,7 +316,7 @@ LayoutObject* LayoutTreeBuilderTraversal::previousSiblingLayoutObject( |
return sibling; |
Node* parent = LayoutTreeBuilderTraversal::parent(node); |
- while (limit && parent && hasDisplayContentsStyle(*parent)) { |
+ while (limit != -1 && parent && hasDisplayContentsStyle(*parent)) { |
if (LayoutObject* sibling = previousSiblingLayoutObjectInternal( |
previousSibling(*parent), limit)) |
return sibling; |