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

Side by Side Diff: sky/engine/core/dom/StyleEngine.h

Issue 788113002: Simplify HTMLStyleElement. (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
« no previous file with comments | « sky/engine/core/dom/Element.h ('k') | sky/engine/core/dom/StyleEngine.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) 2011 Google Inc. All rights reserved. 9 * Copyright (C) 2011 Google Inc. All rights reserved.
10 * 10 *
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 void clearFontCache(); 119 void clearFontCache();
120 // updateGenericFontFamilySettings is used from WebSettingsImpl. 120 // updateGenericFontFamilySettings is used from WebSettingsImpl.
121 void updateGenericFontFamilySettings(); 121 void updateGenericFontFamilySettings();
122 122
123 void didDetach(); 123 void didDetach();
124 void resolverChanged(); 124 void resolverChanged();
125 unsigned resolverAccessCount() const; 125 unsigned resolverAccessCount() const;
126 126
127 void markDocumentDirty(); 127 void markDocumentDirty();
128 128
129 PassRefPtr<CSSStyleSheet> createSheet(Element*, const String& text, TextPosi tion startPosition, bool createdByParser); 129 PassRefPtr<CSSStyleSheet> createSheet(Element*, const String& text);
130 void removeSheet(StyleSheetContents*); 130 void removeSheet(StyleSheetContents*);
131 131
132 void addScopedStyleResolver(const ScopedStyleResolver* resolver) { m_scopedS tyleResolvers.add(resolver); } 132 void addScopedStyleResolver(const ScopedStyleResolver* resolver) { m_scopedS tyleResolvers.add(resolver); }
133 void removeScopedStyleResolver(const ScopedStyleResolver* resolver) { m_scop edStyleResolvers.remove(resolver); } 133 void removeScopedStyleResolver(const ScopedStyleResolver* resolver) { m_scop edStyleResolvers.remove(resolver); }
134 bool hasOnlyScopedResolverForDocument() const { return m_scopedStyleResolver s.size() == 1; } 134 bool hasOnlyScopedResolverForDocument() const { return m_scopedStyleResolver s.size() == 1; }
135 void collectScopedStyleFeaturesTo(RuleFeatureSet&) const; 135 void collectScopedStyleFeaturesTo(RuleFeatureSet&) const;
136 136
137 private: 137 private:
138 // CSSFontSelectorClient implementation. 138 // CSSFontSelectorClient implementation.
139 virtual void fontsNeedUpdate(CSSFontSelector*) override; 139 virtual void fontsNeedUpdate(CSSFontSelector*) override;
140 140
141 private: 141 private:
142 StyleEngine(Document&); 142 StyleEngine(Document&);
143 143
144 TreeScopeStyleSheetCollection* ensureStyleSheetCollectionFor(TreeScope&); 144 TreeScopeStyleSheetCollection* ensureStyleSheetCollectionFor(TreeScope&);
145 TreeScopeStyleSheetCollection* styleSheetCollectionFor(TreeScope&); 145 TreeScopeStyleSheetCollection* styleSheetCollectionFor(TreeScope&);
146 146
147 void markTreeScopeDirty(TreeScope&); 147 void markTreeScopeDirty(TreeScope&);
148 148
149 bool isMaster() const { return m_isMaster; } 149 bool isMaster() const { return m_isMaster; }
150 Document* master(); 150 Document* master();
151 Document& document() const { return *m_document; } 151 Document& document() const { return *m_document; }
152 152
153 typedef ListHashSet<TreeScope*, 16> TreeScopeSet; 153 typedef ListHashSet<TreeScope*, 16> TreeScopeSet;
154 static void insertTreeScopeInDocumentOrder(TreeScopeSet&, TreeScope*); 154 static void insertTreeScopeInDocumentOrder(TreeScopeSet&, TreeScope*);
155 void clearMediaQueryRuleSetOnTreeScopeStyleSheets(TreeScopeSet treeScopes); 155 void clearMediaQueryRuleSetOnTreeScopeStyleSheets(TreeScopeSet treeScopes);
156 156
157 void createResolver(); 157 void createResolver();
158 158
159 static PassRefPtr<CSSStyleSheet> parseSheet(Element*, const String& text, Te xtPosition startPosition, bool createdByParser);
160
161 const DocumentStyleSheetCollection* documentStyleSheetCollection() const 159 const DocumentStyleSheetCollection* documentStyleSheetCollection() const
162 { 160 {
163 return m_documentStyleSheetCollection.get(); 161 return m_documentStyleSheetCollection.get();
164 } 162 }
165 163
166 DocumentStyleSheetCollection* documentStyleSheetCollection() 164 DocumentStyleSheetCollection* documentStyleSheetCollection()
167 { 165 {
168 return m_documentStyleSheetCollection.get(); 166 return m_documentStyleSheetCollection.get();
169 } 167 }
170 168
(...skipping 20 matching lines...) Expand all
191 189
192 RefPtr<CSSFontSelector> m_fontSelector; 190 RefPtr<CSSFontSelector> m_fontSelector;
193 191
194 HashMap<AtomicString, RawPtr<StyleSheetContents> > m_textToSheetCache; 192 HashMap<AtomicString, RawPtr<StyleSheetContents> > m_textToSheetCache;
195 HashMap<RawPtr<StyleSheetContents>, AtomicString> m_sheetToTextCache; 193 HashMap<RawPtr<StyleSheetContents>, AtomicString> m_sheetToTextCache;
196 }; 194 };
197 195
198 } 196 }
199 197
200 #endif // SKY_ENGINE_CORE_DOM_STYLEENGINE_H_ 198 #endif // SKY_ENGINE_CORE_DOM_STYLEENGINE_H_
OLDNEW
« no previous file with comments | « sky/engine/core/dom/Element.h ('k') | sky/engine/core/dom/StyleEngine.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698