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

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

Issue 1925043002: Clean up ShadowRootRareData, ShadowRoot and SlotAssignment (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed Created 4 years, 7 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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 } 227 }
228 228
229 bool ElementShadow::hasSameStyles(const ElementShadow* other) const 229 bool ElementShadow::hasSameStyles(const ElementShadow* other) const
230 { 230 {
231 ShadowRoot* root = &youngestShadowRoot(); 231 ShadowRoot* root = &youngestShadowRoot();
232 ShadowRoot* otherRoot = &other->youngestShadowRoot(); 232 ShadowRoot* otherRoot = &other->youngestShadowRoot();
233 while (root || otherRoot) { 233 while (root || otherRoot) {
234 if (!root || !otherRoot) 234 if (!root || !otherRoot)
235 return false; 235 return false;
236 236
237 StyleSheetList* list = root->styleSheets(); 237 StyleSheetList& list = root->styleSheets();
238 StyleSheetList* otherList = otherRoot->styleSheets(); 238 StyleSheetList& otherList = otherRoot->styleSheets();
239 239
240 if (list->length() != otherList->length()) 240 if (list.length() != otherList.length())
241 return false; 241 return false;
242 242
243 for (size_t i = 0; i < list->length(); i++) { 243 for (size_t i = 0; i < list.length(); i++) {
244 if (toCSSStyleSheet(list->item(i))->contents() != toCSSStyleSheet(ot herList->item(i))->contents()) 244 if (toCSSStyleSheet(list.item(i))->contents() != toCSSStyleSheet(oth erList.item(i))->contents())
245 return false; 245 return false;
246 } 246 }
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
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 } 376 }
377 377
378 DEFINE_TRACE(ElementShadow) 378 DEFINE_TRACE(ElementShadow)
379 { 379 {
380 visitor->trace(m_nodeToInsertionPoints); 380 visitor->trace(m_nodeToInsertionPoints);
381 visitor->trace(m_selectFeatures); 381 visitor->trace(m_selectFeatures);
382 visitor->trace(m_shadowRoot); 382 visitor->trace(m_shadowRoot);
383 } 383 }
384 384
385 } // namespace blink 385 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/DocumentOrShadowRoot.h ('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