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

Side by Side Diff: third_party/WebKit/Source/core/dom/shadow/ElementShadow.cpp

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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 root = root->olderShadowRoot(); 247 root = root->olderShadowRoot();
248 otherRoot = otherRoot->olderShadowRoot(); 248 otherRoot = otherRoot->olderShadowRoot();
249 } 249 }
250 250
251 return true; 251 return true;
252 } 252 }
253 253
254 const InsertionPoint* ElementShadow::finalDestinationInsertionPointFor(const Nod e* key) const 254 const InsertionPoint* ElementShadow::finalDestinationInsertionPointFor(const Nod e* key) const
255 { 255 {
256 DCHECK(key); 256 DCHECK(key);
257 #if DCHECK_IS_ON()
258 DCHECK(!key->needsDistributionRecalc()); 257 DCHECK(!key->needsDistributionRecalc());
259 #endif
260 NodeToDestinationInsertionPoints::const_iterator it = m_nodeToInsertionPoint s.find(key); 258 NodeToDestinationInsertionPoints::const_iterator it = m_nodeToInsertionPoint s.find(key);
261 return it == m_nodeToInsertionPoints.end() ? nullptr : it->value->last(); 259 return it == m_nodeToInsertionPoints.end() ? nullptr : it->value->last();
262 } 260 }
263 261
264 const DestinationInsertionPoints* ElementShadow::destinationInsertionPointsFor(c onst Node* key) const 262 const DestinationInsertionPoints* ElementShadow::destinationInsertionPointsFor(c onst Node* key) const
265 { 263 {
266 DCHECK(key); 264 DCHECK(key);
267 #if DCHECK_IS_ON()
268 DCHECK(!key->needsDistributionRecalc()); 265 DCHECK(!key->needsDistributionRecalc());
269 #endif
270 NodeToDestinationInsertionPoints::const_iterator it = m_nodeToInsertionPoint s.find(key); 266 NodeToDestinationInsertionPoints::const_iterator it = m_nodeToInsertionPoint s.find(key);
271 return it == m_nodeToInsertionPoints.end() ? nullptr : it->value; 267 return it == m_nodeToInsertionPoints.end() ? nullptr : it->value;
272 } 268 }
273 269
274 void ElementShadow::distribute() 270 void ElementShadow::distribute()
275 { 271 {
276 if (isV1()) 272 if (isV1())
277 youngestShadowRoot().distributeV1(); 273 youngestShadowRoot().distributeV1();
278 else 274 else
279 distributeV0(); 275 distributeV0();
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 visitor->trace(m_selectFeatures); 377 visitor->trace(m_selectFeatures);
382 visitor->trace(m_shadowRoot); 378 visitor->trace(m_shadowRoot);
383 } 379 }
384 380
385 DEFINE_TRACE_WRAPPERS(ElementShadow) 381 DEFINE_TRACE_WRAPPERS(ElementShadow)
386 { 382 {
387 visitor->traceWrappers(m_shadowRoot); 383 visitor->traceWrappers(m_shadowRoot);
388 } 384 }
389 385
390 } // namespace blink 386 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Node.cpp ('k') | third_party/WebKit/Source/core/dom/shadow/FlatTreeTraversal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698