Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(188)

Unified Diff: third_party/WebKit/Source/core/dom/LayoutTreeBuilderTraversal.h

Issue 2725953002: Refactor LayoutTreeBuilderTraversal to expose a cleaner interface to layout sibling nodes. (Closed)
Patch Set: Refactor LayoutTreeBuilderTraversal to expose a cleaner interface to layout sibling nodes. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/LayoutTreeBuilderTraversal.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/LayoutTreeBuilderTraversal.h
diff --git a/third_party/WebKit/Source/core/dom/LayoutTreeBuilderTraversal.h b/third_party/WebKit/Source/core/dom/LayoutTreeBuilderTraversal.h
index 2d88e1685fd12977a6373b35d83c5b6b12e15b92..0053fc9de370c68923955f60c23fc27e264a1505 100644
--- a/third_party/WebKit/Source/core/dom/LayoutTreeBuilderTraversal.h
+++ b/third_party/WebKit/Source/core/dom/LayoutTreeBuilderTraversal.h
@@ -61,6 +61,14 @@ class CORE_EXPORT LayoutTreeBuilderTraversal {
static ContainerNode* layoutParent(const Node&, ParentDetails* = nullptr);
static Node* firstChild(const Node&);
static Node* nextSibling(const Node&);
+ static Node* nextLayoutSibling(const Node& node) {
+ int32_t limit = kTraverseAllSiblings;
+ return nextLayoutSibling(node, limit);
+ }
+ static Node* previousLayoutSibling(const Node& node) {
+ int32_t limit = kTraverseAllSiblings;
+ return previousLayoutSibling(node, limit);
+ }
static Node* previousSibling(const Node&);
static Node* previous(const Node&, const Node* stayWithin);
static Node* next(const Node&, const Node* stayWithin);
@@ -78,6 +86,10 @@ class CORE_EXPORT LayoutTreeBuilderTraversal {
ContainerNode* found = parent(node);
return found && found->isElementNode() ? toElement(found) : 0;
}
+
+ private:
+ static Node* nextLayoutSibling(const Node&, int32_t& limit);
+ static Node* previousLayoutSibling(const Node&, int32_t& limit);
};
} // namespace blink
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/LayoutTreeBuilderTraversal.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698