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

Side by Side Diff: sky/engine/core/dom/shadow/ElementShadow.cpp

Issue 778743003: Merge StyleSheet into CSSStyleSheet. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: sort headers. Created 6 years 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
« no previous file with comments | « sky/engine/core/dom/StyleSheetCollection.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 if (!root || !otherRoot) 212 if (!root || !otherRoot)
213 return false; 213 return false;
214 214
215 StyleSheetList* list = root->styleSheets(); 215 StyleSheetList* list = root->styleSheets();
216 StyleSheetList* otherList = otherRoot->styleSheets(); 216 StyleSheetList* otherList = otherRoot->styleSheets();
217 217
218 if (list->length() != otherList->length()) 218 if (list->length() != otherList->length())
219 return false; 219 return false;
220 220
221 for (size_t i = 0; i < list->length(); i++) { 221 for (size_t i = 0; i < list->length(); i++) {
222 if (toCSSStyleSheet(list->item(i))->contents() != toCSSStyleSheet(ot herList->item(i))->contents()) 222 if (list->item(i)->contents() != otherList->item(i)->contents())
223 return false; 223 return false;
224 } 224 }
225 } 225 }
226 226
227 return true; 227 return true;
228 } 228 }
229 229
230 const InsertionPoint* ElementShadow::finalDestinationInsertionPointFor(const Nod e* key) const 230 const InsertionPoint* ElementShadow::finalDestinationInsertionPointFor(const Nod e* key) const
231 { 231 {
232 ASSERT(key && !key->document().childNeedsDistributionRecalc()); 232 ASSERT(key && !key->document().childNeedsDistributionRecalc());
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 } 304 }
305 setNeedsDistributionRecalc(); 305 setNeedsDistributionRecalc();
306 } 306 }
307 307
308 void ElementShadow::clearDistribution() 308 void ElementShadow::clearDistribution()
309 { 309 {
310 m_nodeToInsertionPoints.clear(); 310 m_nodeToInsertionPoints.clear();
311 } 311 }
312 312
313 } // namespace 313 } // namespace
OLDNEW
« no previous file with comments | « sky/engine/core/dom/StyleSheetCollection.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698