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

Unified Diff: third_party/WebKit/Source/core/editing/LayoutTreeTraversal.h

Issue 1756763002: 2016-03-02T18:53:01 LayoutPosition Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2016-04-25T19:02:18 Created 4 years, 8 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
Index: third_party/WebKit/Source/core/editing/LayoutTreeTraversal.h
diff --git a/third_party/WebKit/Source/core/editing/LayoutTreeTraversal.h b/third_party/WebKit/Source/core/editing/LayoutTreeTraversal.h
new file mode 100644
index 0000000000000000000000000000000000000000..b6263c3449e83d9aae1c73e61596f3b719c307e7
--- /dev/null
+++ b/third_party/WebKit/Source/core/editing/LayoutTreeTraversal.h
@@ -0,0 +1,43 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef LayoutTreeTraversal_h
+#define LayoutTreeTraversal_h
+
+#include "core/CoreExport.h"
+#include "core/editing/VisiblePosition.h"
+#include "wtf/Allocator.h"
+#include "wtf/Forward.h"
+
+namespace blink {
+
+// LayoutTreeTraversal is the layout tree version of |NodeTraversal|.
+class LayoutTreeTraversal final {
+ STATIC_ONLY(LayoutTreeTraversal);
+
+public:
+ static LayoutObject* parent(const LayoutObject&);
+ static LayoutObject* firstChild(const LayoutObject&);
+ static LayoutObject* lastChild(const LayoutObject&);
+ static bool hasChildren(const LayoutObject&);
+
+ static LayoutObject* nextSibling(const LayoutObject&);
+ static LayoutObject* previousSibling(const LayoutObject&);
+
+ static LayoutObject* next(const LayoutObject&);
+ static LayoutObject* previous(const LayoutObject&);
+};
+
+} // namespace blink
+
+#ifndef NDEBUG
+// Outside the blink namespace for ease of invocation from GDB.
+CORE_EXPORT void dumpLayoutTree(const blink::InlineBox*);
+CORE_EXPORT void dumpLayoutTree(const blink::LayoutObject*);
+CORE_EXPORT void dumpLayoutTree(const blink::Node*);
+CORE_EXPORT void dumpLayoutTree(const blink::Position&);
+CORE_EXPORT void dumpLayoutTree(const blink::VisiblePosition&);
+#endif
+
+#endif // LayoutTreeTraversal_h

Powered by Google App Engine
This is Rietveld 408576698