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

Side by Side Diff: third_party/WebKit/Source/core/dom/shadow/FlatTreeTraversal.h

Issue 1995203002: Rewrite Shadow DOM distribution engine to support partial synchronous distribution for v1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: No longer FAIL: imported/wpt/shadow-dom/HTMLSlotElement-interface.html Created 4 years, 6 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
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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 static Node& lastWithinOrSelf(const Node&); 118 static Node& lastWithinOrSelf(const Node&);
119 119
120 private: 120 private:
121 enum TraversalDirection { 121 enum TraversalDirection {
122 TraversalDirectionForward, 122 TraversalDirectionForward,
123 TraversalDirectionBackward 123 TraversalDirectionBackward
124 }; 124 };
125 125
126 static void assertPrecondition(const Node& node) 126 static void assertPrecondition(const Node& node)
127 { 127 {
128 #if DCHECK_IS_ON()
129 DCHECK(!node.needsDistributionRecalc()); 128 DCHECK(!node.needsDistributionRecalc());
130 DCHECK(node.canParticipateInFlatTree()); 129 DCHECK(node.canParticipateInFlatTree());
131 #endif
132 } 130 }
133 131
134 static void assertPostcondition(const Node* node) 132 static void assertPostcondition(const Node* node)
135 { 133 {
136 #if DCHECK_IS_ON() 134 #if DCHECK_IS_ON()
137 if (node) 135 if (node)
138 assertPrecondition(*node); 136 assertPrecondition(*node);
139 #endif 137 #endif
140 } 138 }
141 139
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 } 303 }
306 304
307 inline Node* FlatTreeTraversal::traverseLastChild(const Node& node) 305 inline Node* FlatTreeTraversal::traverseLastChild(const Node& node)
308 { 306 {
309 return traverseChild(node, TraversalDirectionBackward); 307 return traverseChild(node, TraversalDirectionBackward);
310 } 308 }
311 309
312 } // namespace blink 310 } // namespace blink
313 311
314 #endif 312 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/shadow/ElementShadow.cpp ('k') | third_party/WebKit/Source/core/dom/shadow/ShadowRoot.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698