| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef LayoutTreeTraversal_h |
| 6 #define LayoutTreeTraversal_h |
| 7 |
| 8 #include "core/CoreExport.h" |
| 9 #include "core/editing/VisiblePosition.h" |
| 10 #include "wtf/Allocator.h" |
| 11 #include "wtf/Forward.h" |
| 12 |
| 13 namespace blink { |
| 14 |
| 15 // LayoutTreeTraversal is the layout tree version of |NodeTraversal|. |
| 16 class LayoutTreeTraversal final { |
| 17 STATIC_ONLY(LayoutTreeTraversal); |
| 18 |
| 19 public: |
| 20 static LayoutObject* parent(const LayoutObject&); |
| 21 static LayoutObject* firstChild(const LayoutObject&); |
| 22 static LayoutObject* lastChild(const LayoutObject&); |
| 23 static bool hasChildren(const LayoutObject&); |
| 24 |
| 25 static LayoutObject* nextSibling(const LayoutObject&); |
| 26 static LayoutObject* previousSibling(const LayoutObject&); |
| 27 |
| 28 static LayoutObject* next(const LayoutObject&); |
| 29 static LayoutObject* previous(const LayoutObject&); |
| 30 }; |
| 31 |
| 32 } // namespace blink |
| 33 |
| 34 #ifndef NDEBUG |
| 35 // Outside the blink namespace for ease of invocation from GDB. |
| 36 CORE_EXPORT void dumpLayoutTree(const blink::InlineBox*); |
| 37 CORE_EXPORT void dumpLayoutTree(const blink::LayoutObject*); |
| 38 CORE_EXPORT void dumpLayoutTree(const blink::Node*); |
| 39 CORE_EXPORT void dumpLayoutTree(const blink::Position&); |
| 40 CORE_EXPORT void dumpLayoutTree(const blink::VisiblePosition&); |
| 41 #endif |
| 42 |
| 43 #endif // LayoutTreeTraversal_h |
| OLD | NEW |