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

Side by Side Diff: Source/core/dom/ShadowTreeStyleSheetCollection.cpp

Issue 23516012: Rename StyleSheetCollections to StyleEngine. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/ShadowTreeStyleSheetCollection.h ('k') | Source/core/dom/StyleElement.cpp » ('j') | 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
9 * Copyright (C) 2013 Google Inc. All rights reserved. 9 * Copyright (C) 2013 Google Inc. All rights reserved.
10 * 10 *
(...skipping 14 matching lines...) Expand all
25 */ 25 */
26 26
27 #include "config.h" 27 #include "config.h"
28 #include "core/dom/ShadowTreeStyleSheetCollection.h" 28 #include "core/dom/ShadowTreeStyleSheetCollection.h"
29 29
30 #include "HTMLNames.h" 30 #include "HTMLNames.h"
31 #include "core/css/CSSStyleSheet.h" 31 #include "core/css/CSSStyleSheet.h"
32 #include "core/css/resolver/StyleResolver.h" 32 #include "core/css/resolver/StyleResolver.h"
33 #include "core/dom/Document.h" 33 #include "core/dom/Document.h"
34 #include "core/dom/Element.h" 34 #include "core/dom/Element.h"
35 #include "core/dom/StyleSheetCollections.h" 35 #include "core/dom/StyleEngine.h"
36 #include "core/dom/shadow/ShadowRoot.h" 36 #include "core/dom/shadow/ShadowRoot.h"
37 #include "core/html/HTMLStyleElement.h" 37 #include "core/html/HTMLStyleElement.h"
38 #include "core/page/Settings.h" 38 #include "core/page/Settings.h"
39 39
40 namespace WebCore { 40 namespace WebCore {
41 41
42 using namespace HTMLNames; 42 using namespace HTMLNames;
43 43
44 ShadowTreeStyleSheetCollection::ShadowTreeStyleSheetCollection(ShadowRoot& shado wRoot) 44 ShadowTreeStyleSheetCollection::ShadowTreeStyleSheetCollection(ShadowRoot& shado wRoot)
45 : StyleSheetCollection(shadowRoot) 45 : StyleSheetCollection(shadowRoot)
46 { 46 {
47 } 47 }
48 48
49 void ShadowTreeStyleSheetCollection::collectStyleSheets(StyleSheetCollections* c ollections, Vector<RefPtr<StyleSheet> >& styleSheets, Vector<RefPtr<CSSStyleShee t> >& activeSheets) 49 void ShadowTreeStyleSheetCollection::collectStyleSheets(StyleEngine* collections , Vector<RefPtr<StyleSheet> >& styleSheets, Vector<RefPtr<CSSStyleSheet> >& acti veSheets)
50 { 50 {
51 if (document()->settings() && !document()->settings()->authorAndUserStylesEn abled()) 51 if (document()->settings() && !document()->settings()->authorAndUserStylesEn abled())
52 return; 52 return;
53 53
54 DocumentOrderedList::iterator begin = m_styleSheetCandidateNodes.begin(); 54 DocumentOrderedList::iterator begin = m_styleSheetCandidateNodes.begin();
55 DocumentOrderedList::iterator end = m_styleSheetCandidateNodes.end(); 55 DocumentOrderedList::iterator end = m_styleSheetCandidateNodes.end();
56 for (DocumentOrderedList::iterator it = begin; it != end; ++it) { 56 for (DocumentOrderedList::iterator it = begin; it != end; ++it) {
57 Node* node = *it; 57 Node* node = *it;
58 StyleSheet* sheet = 0; 58 StyleSheet* sheet = 0;
59 CSSStyleSheet* activeSheet = 0; 59 CSSStyleSheet* activeSheet = 0;
(...skipping 27 matching lines...) Expand all
87 if (rel.contains("alternate") && title.isEmpty()) 87 if (rel.contains("alternate") && title.isEmpty())
88 activeSheet = 0; 88 activeSheet = 0;
89 89
90 if (sheet) 90 if (sheet)
91 styleSheets.append(sheet); 91 styleSheets.append(sheet);
92 if (activeSheet) 92 if (activeSheet)
93 activeSheets.append(activeSheet); 93 activeSheets.append(activeSheet);
94 } 94 }
95 } 95 }
96 96
97 bool ShadowTreeStyleSheetCollection::updateActiveStyleSheets(StyleSheetCollectio ns* collections, StyleResolverUpdateMode updateMode) 97 bool ShadowTreeStyleSheetCollection::updateActiveStyleSheets(StyleEngine* collec tions, StyleResolverUpdateMode updateMode)
98 { 98 {
99 Vector<RefPtr<StyleSheet> > styleSheets; 99 Vector<RefPtr<StyleSheet> > styleSheets;
100 Vector<RefPtr<CSSStyleSheet> > activeCSSStyleSheets; 100 Vector<RefPtr<CSSStyleSheet> > activeCSSStyleSheets;
101 collectStyleSheets(collections, styleSheets, activeCSSStyleSheets); 101 collectStyleSheets(collections, styleSheets, activeCSSStyleSheets);
102 102
103 bool requiresFullStyleRecalc = true; 103 bool requiresFullStyleRecalc = true;
104 104
105 // If we have already decided to destroy StyleResolver, we don't need to ana lyze. Reconstruction will take care. 105 // If we have already decided to destroy StyleResolver, we don't need to ana lyze. Reconstruction will take care.
106 if (StyleResolver* styleResolver = document()->styleResolverIfExists()) { 106 if (StyleResolver* styleResolver = document()->styleResolverIfExists()) {
107 StyleResolverUpdateType styleResolverUpdateType; 107 StyleResolverUpdateType styleResolverUpdateType;
(...skipping 15 matching lines...) Expand all
123 } 123 }
124 m_scopingNodesForStyleScoped.didRemoveScopingNodes(); 124 m_scopingNodesForStyleScoped.didRemoveScopingNodes();
125 m_activeAuthorStyleSheets.swap(activeCSSStyleSheets); 125 m_activeAuthorStyleSheets.swap(activeCSSStyleSheets);
126 m_styleSheetsForStyleSheetList.swap(styleSheets); 126 m_styleSheetsForStyleSheetList.swap(styleSheets);
127 updateUsesRemUnits(); 127 updateUsesRemUnits();
128 128
129 return requiresFullStyleRecalc; 129 return requiresFullStyleRecalc;
130 } 130 }
131 131
132 } 132 }
OLDNEW
« no previous file with comments | « Source/core/dom/ShadowTreeStyleSheetCollection.h ('k') | Source/core/dom/StyleElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698