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 14 matching lines...) Expand all Loading... |
25 */ | 25 */ |
26 | 26 |
27 #ifndef NodeRenderingTraversal_h | 27 #ifndef NodeRenderingTraversal_h |
28 #define NodeRenderingTraversal_h | 28 #define NodeRenderingTraversal_h |
29 | 29 |
30 #include "core/dom/Element.h" | 30 #include "core/dom/Element.h" |
31 | 31 |
32 namespace blink { | 32 namespace blink { |
33 | 33 |
34 class InsertionPoint; | 34 class InsertionPoint; |
35 class RenderObject; | 35 class LayoutObject; |
36 | 36 |
37 namespace NodeRenderingTraversal { | 37 namespace NodeRenderingTraversal { |
38 | 38 |
39 class ParentDetails { | 39 class ParentDetails { |
40 STACK_ALLOCATED(); | 40 STACK_ALLOCATED(); |
41 public: | 41 public: |
42 ParentDetails() | 42 ParentDetails() |
43 : m_insertionPoint(nullptr) | 43 : m_insertionPoint(nullptr) |
44 { } | 44 { } |
45 | 45 |
(...skipping 11 matching lines...) Expand all Loading... |
57 }; | 57 }; |
58 | 58 |
59 ContainerNode* parent(const Node&, ParentDetails* = 0); | 59 ContainerNode* parent(const Node&, ParentDetails* = 0); |
60 bool contains(const ContainerNode&, const Node&); | 60 bool contains(const ContainerNode&, const Node&); |
61 Node* firstChild(const Node&); | 61 Node* firstChild(const Node&); |
62 Node* nextSibling(const Node&); | 62 Node* nextSibling(const Node&); |
63 Node* previousSibling(const Node&); | 63 Node* previousSibling(const Node&); |
64 Node* previous(const Node&, const Node* stayWithin); | 64 Node* previous(const Node&, const Node* stayWithin); |
65 Node* next(const Node&, const Node* stayWithin); | 65 Node* next(const Node&, const Node* stayWithin); |
66 Node* nextSkippingChildren(const Node&, const Node* stayWithin); | 66 Node* nextSkippingChildren(const Node&, const Node* stayWithin); |
67 RenderObject* nextSiblingRenderer(const Node&); | 67 LayoutObject* nextSiblingRenderer(const Node&); |
68 RenderObject* previousSiblingRenderer(const Node&); | 68 LayoutObject* previousSiblingRenderer(const Node&); |
69 RenderObject* nextInTopLayer(const Element&); | 69 LayoutObject* nextInTopLayer(const Element&); |
70 | 70 |
71 inline Element* parentElement(const Node& node) | 71 inline Element* parentElement(const Node& node) |
72 { | 72 { |
73 ContainerNode* found = parent(node); | 73 ContainerNode* found = parent(node); |
74 return found && found->isElementNode() ? toElement(found) : 0; | 74 return found && found->isElementNode() ? toElement(found) : 0; |
75 } | 75 } |
76 | 76 |
77 } | 77 } |
78 | 78 |
79 } // namespace blink | 79 } // namespace blink |
80 | 80 |
81 #endif | 81 #endif |
OLD | NEW |