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

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, 10 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..a5d2283846b61006f973e517245218a9489db4ba 100644
--- a/third_party/WebKit/Source/core/dom/LayoutTreeBuilderTraversal.h
+++ b/third_party/WebKit/Source/core/dom/LayoutTreeBuilderTraversal.h
@@ -37,6 +37,9 @@ namespace blink {
class LayoutObject;
class CORE_EXPORT LayoutTreeBuilderTraversal {
+ static Node* nextLayoutSibling(const Node&, int32_t& limit);
+ static Node* previousLayoutSibling(const Node&, int32_t& limit);
rune 2017/03/10 12:32:41 I'd put these in a private section below the publi
+
public:
static const int32_t kTraverseAllSiblings = -2;
class ParentDetails {
@@ -61,6 +64,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);
« 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