OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Neither the name of Google Inc. nor the names of its | 10 * * Neither the name of Google Inc. nor the names of its |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 } | 54 } |
55 | 55 |
56 private: | 56 private: |
57 Member<const InsertionPoint> m_insertionPoint; | 57 Member<const InsertionPoint> m_insertionPoint; |
58 }; | 58 }; |
59 | 59 |
60 static ContainerNode* parent(const Node&, ParentDetails* = nullptr); | 60 static ContainerNode* parent(const Node&, ParentDetails* = nullptr); |
61 static ContainerNode* layoutParent(const Node&, ParentDetails* = nullptr); | 61 static ContainerNode* layoutParent(const Node&, ParentDetails* = nullptr); |
62 static Node* firstChild(const Node&); | 62 static Node* firstChild(const Node&); |
63 static Node* nextSibling(const Node&); | 63 static Node* nextSibling(const Node&); |
| 64 static Node* nextLayoutSibling(const Node& node) { |
| 65 int32_t limit = kTraverseAllSiblings; |
| 66 return nextLayoutSibling(node, limit); |
| 67 } |
| 68 static Node* previousLayoutSibling(const Node& node) { |
| 69 int32_t limit = kTraverseAllSiblings; |
| 70 return previousLayoutSibling(node, limit); |
| 71 } |
64 static Node* previousSibling(const Node&); | 72 static Node* previousSibling(const Node&); |
65 static Node* previous(const Node&, const Node* stayWithin); | 73 static Node* previous(const Node&, const Node* stayWithin); |
66 static Node* next(const Node&, const Node* stayWithin); | 74 static Node* next(const Node&, const Node* stayWithin); |
67 static Node* nextSkippingChildren(const Node&, const Node* stayWithin); | 75 static Node* nextSkippingChildren(const Node&, const Node* stayWithin); |
68 static LayoutObject* parentLayoutObject(const Node&); | 76 static LayoutObject* parentLayoutObject(const Node&); |
69 static LayoutObject* nextSiblingLayoutObject( | 77 static LayoutObject* nextSiblingLayoutObject( |
70 const Node&, | 78 const Node&, |
71 int32_t limit = kTraverseAllSiblings); | 79 int32_t limit = kTraverseAllSiblings); |
72 static LayoutObject* previousSiblingLayoutObject( | 80 static LayoutObject* previousSiblingLayoutObject( |
73 const Node&, | 81 const Node&, |
74 int32_t limit = kTraverseAllSiblings); | 82 int32_t limit = kTraverseAllSiblings); |
75 static LayoutObject* nextInTopLayer(const Element&); | 83 static LayoutObject* nextInTopLayer(const Element&); |
76 | 84 |
77 static inline Element* parentElement(const Node& node) { | 85 static inline Element* parentElement(const Node& node) { |
78 ContainerNode* found = parent(node); | 86 ContainerNode* found = parent(node); |
79 return found && found->isElementNode() ? toElement(found) : 0; | 87 return found && found->isElementNode() ? toElement(found) : 0; |
80 } | 88 } |
| 89 |
| 90 private: |
| 91 static Node* nextLayoutSibling(const Node&, int32_t& limit); |
| 92 static Node* previousLayoutSibling(const Node&, int32_t& limit); |
81 }; | 93 }; |
82 | 94 |
83 } // namespace blink | 95 } // namespace blink |
84 | 96 |
85 #endif | 97 #endif |
OLD | NEW |