| 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
|
|
|