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

Side by Side Diff: Source/core/dom/shadow/ComposedTreeTraversal.h

Issue 1086873002: Rename NodeRenderingTraversal to LayoutTreeBuilderTraversal (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 5 years, 8 months 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 11 matching lines...) Expand all
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */ 25 */
26 26
27 #ifndef ComposedTreeTraversal_h 27 #ifndef ComposedTreeTraversal_h
28 #define ComposedTreeTraversal_h 28 #define ComposedTreeTraversal_h
29 29
30 #include "core/CoreExport.h" 30 #include "core/CoreExport.h"
31 #include "core/dom/Document.h" 31 #include "core/dom/Document.h"
32 #include "core/dom/NodeRenderingTraversal.h" 32 #include "core/dom/LayoutTreeBuilderTraversal.h"
33 #include "core/dom/shadow/InsertionPoint.h" 33 #include "core/dom/shadow/InsertionPoint.h"
34 #include "core/dom/shadow/ShadowRoot.h" 34 #include "core/dom/shadow/ShadowRoot.h"
35 35
36 namespace blink { 36 namespace blink {
37 37
38 class ContainerNode; 38 class ContainerNode;
39 class Node; 39 class Node;
40 40
41 // Composed tree version of |NodeTraversal|. 41 // Composed tree version of |NodeTraversal|.
42 // 42 //
43 // None of member functions takes a |ShadowRoot| or an active insertion point, 43 // None of member functions takes a |ShadowRoot| or an active insertion point,
44 // e.g. roughly speaking <content> and <shadow> in the shadow tree, see 44 // e.g. roughly speaking <content> and <shadow> in the shadow tree, see
45 // |InsertionPoint::isActive()| for details of active insertion points, since 45 // |InsertionPoint::isActive()| for details of active insertion points, since
46 // they aren't appeared in the composed tree. |assertPrecondition()| and 46 // they aren't appeared in the composed tree. |assertPrecondition()| and
47 // |assertPostCondition()| check this condition. 47 // |assertPostCondition()| check this condition.
48 // 48 //
49 // FIXME: Make some functions inline to optimise the performance. 49 // FIXME: Make some functions inline to optimise the performance.
50 // https://bugs.webkit.org/show_bug.cgi?id=82702 50 // https://bugs.webkit.org/show_bug.cgi?id=82702
51 class CORE_EXPORT ComposedTreeTraversal { 51 class CORE_EXPORT ComposedTreeTraversal {
52 public: 52 public:
53 typedef NodeRenderingTraversal::ParentDetails ParentTraversalDetails; 53 typedef LayoutTreeBuilderTraversal::ParentDetails ParentTraversalDetails;
54 54
55 static Node* next(const Node&); 55 static Node* next(const Node&);
56 static Node* next(const Node&, const Node* stayWithin); 56 static Node* next(const Node&, const Node* stayWithin);
57 static Node* previous(const Node&); 57 static Node* previous(const Node&);
58 58
59 static Node* firstChild(const Node&); 59 static Node* firstChild(const Node&);
60 static Node* lastChild(const Node&); 60 static Node* lastChild(const Node&);
61 static bool hasChildren(const Node&); 61 static bool hasChildren(const Node&);
62 62
63 static ContainerNode* parent(const Node&, ParentTraversalDetails* = 0); 63 static ContainerNode* parent(const Node&, ParentTraversalDetails* = 0);
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 } 299 }
300 300
301 inline Node* ComposedTreeTraversal::traverseLastChild(const Node& node) 301 inline Node* ComposedTreeTraversal::traverseLastChild(const Node& node)
302 { 302 {
303 return traverseChild(node, TraversalDirectionBackward); 303 return traverseChild(node, TraversalDirectionBackward);
304 } 304 }
305 305
306 } // namespace 306 } // namespace
307 307
308 #endif 308 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698