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

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

Issue 2450093005: Support display: contents for elements, first-line and first-letter pseudos. (Closed)
Patch Set: Support display: contents for elements, first-line and first-letter pseudos. Created 4 years, 1 month 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/dom/LayoutTreeBuilderTraversal.h
diff --git a/third_party/WebKit/Source/core/dom/LayoutTreeBuilderTraversal.h b/third_party/WebKit/Source/core/dom/LayoutTreeBuilderTraversal.h
index 7fb265b2c746ce65c57885d20dd684a6f3c0f53f..928644fbacccb235dee7b4db7995a187acb8db1d 100644
--- a/third_party/WebKit/Source/core/dom/LayoutTreeBuilderTraversal.h
+++ b/third_party/WebKit/Source/core/dom/LayoutTreeBuilderTraversal.h
@@ -36,48 +36,49 @@ namespace blink {
class LayoutObject;
-namespace LayoutTreeBuilderTraversal {
rune 2016/11/08 13:26:49 Any particular reason you started using class inst
emilio 2016/11/08 15:43:02 Yup, otherwise I needed to `CORE_EXPORT` every fun
-
-const int32_t kTraverseAllSiblings = -2;
-
-class ParentDetails {
- STACK_ALLOCATED();
-
+class CORE_EXPORT LayoutTreeBuilderTraversal {
public:
- ParentDetails() : m_insertionPoint(nullptr) {}
-
- const InsertionPoint* insertionPoint() const { return m_insertionPoint; }
-
- void didTraverseInsertionPoint(const InsertionPoint*);
-
- bool operator==(const ParentDetails& other) {
- return m_insertionPoint == other.m_insertionPoint;
+ static const int32_t kTraverseAllSiblings = -2;
+ class ParentDetails {
+ STACK_ALLOCATED();
+
+ public:
+ ParentDetails() : m_insertionPoint(nullptr) {}
+
+ const InsertionPoint* insertionPoint() const { return m_insertionPoint; }
+
+ void didTraverseInsertionPoint(const InsertionPoint*);
+
+ bool operator==(const ParentDetails& other) {
+ return m_insertionPoint == other.m_insertionPoint;
+ }
+
+ private:
+ Member<const InsertionPoint> m_insertionPoint;
+ };
+
+ static ContainerNode* parent(const Node&, ParentDetails* = 0);
+ static Node* firstChild(const Node&);
+ static Node* nextSibling(const Node&);
+ static LayoutObject* parentLayoutObject(const Node&);
+ static Node* previousSibling(const Node&);
+ static Node* previous(const Node&, const Node* stayWithin);
+ static Node* next(const Node&, const Node* stayWithin);
+ static Node* nextSkippingChildren(const Node&, const Node* stayWithin);
+ static LayoutObject* nextSiblingLayoutObject(
+ const Node&,
+ int32_t limit = kTraverseAllSiblings);
+ static LayoutObject* previousSiblingLayoutObject(
+ const Node&,
+ int32_t limit = kTraverseAllSiblings);
+ static LayoutObject* nextInTopLayer(const Element&);
+
+ static inline Element* parentElement(const Node& node) {
+ ContainerNode* found = parent(node);
+ return found && found->isElementNode() ? toElement(found) : 0;
}
-
- private:
- Member<const InsertionPoint> m_insertionPoint;
};
-CORE_EXPORT ContainerNode* parent(const Node&, ParentDetails* = 0);
-CORE_EXPORT Node* firstChild(const Node&);
-CORE_EXPORT Node* nextSibling(const Node&);
-Node* previousSibling(const Node&);
-Node* previous(const Node&, const Node* stayWithin);
-Node* next(const Node&, const Node* stayWithin);
-Node* nextSkippingChildren(const Node&, const Node* stayWithin);
-LayoutObject* nextSiblingLayoutObject(const Node&,
- int32_t limit = kTraverseAllSiblings);
-LayoutObject* previousSiblingLayoutObject(const Node&,
- int32_t limit = kTraverseAllSiblings);
-LayoutObject* nextInTopLayer(const Element&);
-
-inline Element* parentElement(const Node& node) {
- ContainerNode* found = parent(node);
- return found && found->isElementNode() ? toElement(found) : 0;
-}
-
-} // namespace LayoutTreeBuilderTraversal
-
} // namespace blink
#endif

Powered by Google App Engine
This is Rietveld 408576698