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

Side by Side Diff: sky/engine/core/dom/TreeScope.cpp

Issue 803673003: Delete StyleSheetList and support code. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All Rights Reserved. 2 * Copyright (C) 2011 Google Inc. All Rights Reserved.
3 * Copyright (C) 2012 Apple Inc. All rights reserved. 3 * Copyright (C) 2012 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 10 matching lines...) Expand all
21 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 21 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
22 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 * 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 #include "sky/engine/config.h" 27 #include "sky/engine/config.h"
28 #include "sky/engine/core/dom/TreeScope.h" 28 #include "sky/engine/core/dom/TreeScope.h"
29 29
30 #include "gen/sky/core/HTMLNames.h" 30 #include "gen/sky/core/HTMLNames.h"
31 #include "sky/engine/core/css/StyleSheetList.h"
32 #include "sky/engine/core/css/resolver/ScopedStyleResolver.h" 31 #include "sky/engine/core/css/resolver/ScopedStyleResolver.h"
33 #include "sky/engine/core/dom/ContainerNode.h" 32 #include "sky/engine/core/dom/ContainerNode.h"
34 #include "sky/engine/core/dom/Document.h" 33 #include "sky/engine/core/dom/Document.h"
35 #include "sky/engine/core/dom/Element.h" 34 #include "sky/engine/core/dom/Element.h"
36 #include "sky/engine/core/dom/ElementTraversal.h" 35 #include "sky/engine/core/dom/ElementTraversal.h"
37 #include "sky/engine/core/dom/NodeRenderStyle.h" 36 #include "sky/engine/core/dom/NodeRenderStyle.h"
38 #include "sky/engine/core/dom/TreeScopeAdopter.h" 37 #include "sky/engine/core/dom/TreeScopeAdopter.h"
39 #include "sky/engine/core/dom/shadow/ElementShadow.h" 38 #include "sky/engine/core/dom/shadow/ElementShadow.h"
40 #include "sky/engine/core/dom/shadow/ShadowRoot.h" 39 #include "sky/engine/core/dom/shadow/ShadowRoot.h"
41 #include "sky/engine/core/editing/DOMSelection.h" 40 #include "sky/engine/core/editing/DOMSelection.h"
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 RenderStyle* style = element->renderStyle(); 417 RenderStyle* style = element->renderStyle();
419 if (style && style->hasViewportUnits()) 418 if (style && style->hasViewportUnits())
420 element->setNeedsStyleRecalc(LocalStyleChange); 419 element->setNeedsStyleRecalc(LocalStyleChange);
421 } 420 }
422 } 421 }
423 422
424 bool TreeScope::hasSameStyles(TreeScope& other) 423 bool TreeScope::hasSameStyles(TreeScope& other)
425 { 424 {
426 if (this == &other) 425 if (this == &other)
427 return true; 426 return true;
428 const Vector<RefPtr<blink::CSSStyleSheet> >& list = document().styleEngine() ->styleSheetsForStyleSheetList(*this); 427 const Vector<RefPtr<blink::CSSStyleSheet> >& list = document().styleEngine() ->activeAuthorStyleSheetsFor(*this);
429 const Vector<RefPtr<blink::CSSStyleSheet> >& otherList = document().styleEng ine()->styleSheetsForStyleSheetList(other); 428 const Vector<RefPtr<blink::CSSStyleSheet> >& otherList = document().styleEng ine()->activeAuthorStyleSheetsFor(other);
430 429
431 if (list.size() != otherList.size()) 430 if (list.size() != otherList.size())
432 return false; 431 return false;
433 432
434 for (size_t i = 0; i < list.size(); i++) { 433 for (size_t i = 0; i < list.size(); i++) {
435 if (list[i]->contents() != otherList[i]->contents()) 434 if (list[i]->contents() != otherList[i]->contents())
436 return false; 435 return false;
437 } 436 }
438 437
439 return true; 438 return true;
440 } 439 }
441 440
442 } // namespace blink 441 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698