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

Side by Side Diff: Source/core/dom/StyleEngine.h

Issue 304083003: Made StyleEngine CSSFontSelectorClient instead of StyleResolver. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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/css/resolver/StyleResolver.cpp ('k') | Source/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 10 matching lines...) Expand all
21 * You should have received a copy of the GNU Library General Public License 21 * You should have received a copy of the GNU Library General Public License
22 * along with this library; see the file COPYING.LIB. If not, write to 22 * along with this library; see the file COPYING.LIB. If not, write to
23 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 23 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
24 * Boston, MA 02110-1301, USA. 24 * Boston, MA 02110-1301, USA.
25 * 25 *
26 */ 26 */
27 27
28 #ifndef StyleEngine_h 28 #ifndef StyleEngine_h
29 #define StyleEngine_h 29 #define StyleEngine_h
30 30
31 #include "core/css/CSSFontSelectorClient.h"
31 #include "core/css/resolver/StyleResolver.h" 32 #include "core/css/resolver/StyleResolver.h"
32 #include "core/dom/Document.h" 33 #include "core/dom/Document.h"
33 #include "core/dom/DocumentOrderedList.h" 34 #include "core/dom/DocumentOrderedList.h"
34 #include "core/dom/DocumentStyleSheetCollection.h" 35 #include "core/dom/DocumentStyleSheetCollection.h"
35 #include "platform/heap/Handle.h" 36 #include "platform/heap/Handle.h"
36 #include "wtf/FastAllocBase.h" 37 #include "wtf/FastAllocBase.h"
37 #include "wtf/ListHashSet.h" 38 #include "wtf/ListHashSet.h"
38 #include "wtf/RefPtr.h" 39 #include "wtf/RefPtr.h"
39 #include "wtf/TemporaryChange.h" 40 #include "wtf/TemporaryChange.h"
40 #include "wtf/Vector.h" 41 #include "wtf/Vector.h"
(...skipping 24 matching lines...) Expand all
65 bool needsRepaint() const { return m_needsRepaint; } 66 bool needsRepaint() const { return m_needsRepaint; }
66 bool needsStyleRecalc() const { return m_needsStyleRecalc; } 67 bool needsStyleRecalc() const { return m_needsStyleRecalc; }
67 void setNeedsRepaint() { m_needsRepaint = true; } 68 void setNeedsRepaint() { m_needsRepaint = true; }
68 void setNeedsStyleRecalc() { m_needsStyleRecalc = true; } 69 void setNeedsStyleRecalc() { m_needsStyleRecalc = true; }
69 70
70 private: 71 private:
71 bool m_needsRepaint; 72 bool m_needsRepaint;
72 bool m_needsStyleRecalc; 73 bool m_needsStyleRecalc;
73 }; 74 };
74 75
75 class StyleEngine : public NoBaseWillBeGarbageCollectedFinalized<StyleEngine> { 76 class StyleEngine FINAL : public CSSFontSelectorClient {
76 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED; 77 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED;
77 public: 78 public:
78 79
79 class IgnoringPendingStylesheet : public TemporaryChange<bool> { 80 class IgnoringPendingStylesheet : public TemporaryChange<bool> {
80 public: 81 public:
81 IgnoringPendingStylesheet(StyleEngine* engine) 82 IgnoringPendingStylesheet(StyleEngine* engine)
82 : TemporaryChange<bool>(engine->m_ignorePendingStylesheets, true) 83 : TemporaryChange<bool>(engine->m_ignorePendingStylesheets, true)
83 { 84 {
84 } 85 }
85 }; 86 };
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 void didDetach(); 181 void didDetach();
181 bool shouldClearResolver() const; 182 bool shouldClearResolver() const;
182 StyleResolverChange resolverChanged(StyleResolverUpdateMode); 183 StyleResolverChange resolverChanged(StyleResolverUpdateMode);
183 unsigned resolverAccessCount() const; 184 unsigned resolverAccessCount() const;
184 185
185 void markDocumentDirty(); 186 void markDocumentDirty();
186 187
187 PassRefPtrWillBeRawPtr<CSSStyleSheet> createSheet(Element*, const String& te xt, TextPosition startPosition, bool createdByParser); 188 PassRefPtrWillBeRawPtr<CSSStyleSheet> createSheet(Element*, const String& te xt, TextPosition startPosition, bool createdByParser);
188 void removeSheet(StyleSheetContents*); 189 void removeSheet(StyleSheetContents*);
189 190
190 void trace(Visitor*); 191 virtual void trace(Visitor*) OVERRIDE;
192
193 private:
194 // CSSFontSelectorClient implementation.
195 virtual void fontsNeedUpdate(CSSFontSelector*) OVERRIDE;
191 196
192 private: 197 private:
193 StyleEngine(Document&); 198 StyleEngine(Document&);
194 199
195 TreeScopeStyleSheetCollection* ensureStyleSheetCollectionFor(TreeScope&); 200 TreeScopeStyleSheetCollection* ensureStyleSheetCollectionFor(TreeScope&);
196 TreeScopeStyleSheetCollection* styleSheetCollectionFor(TreeScope&); 201 TreeScopeStyleSheetCollection* styleSheetCollectionFor(TreeScope&);
197 bool shouldUpdateShadowTreeStyleSheetCollection(StyleResolverUpdateMode); 202 bool shouldUpdateShadowTreeStyleSheetCollection(StyleResolverUpdateMode);
198 203
199 void markTreeScopeDirty(TreeScope&); 204 void markTreeScopeDirty(TreeScope&);
200 205
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 276
272 RefPtrWillBeMember<CSSFontSelector> m_fontSelector; 277 RefPtrWillBeMember<CSSFontSelector> m_fontSelector;
273 278
274 WillBeHeapHashMap<AtomicString, RawPtrWillBeMember<StyleSheetContents> > m_t extToSheetCache; 279 WillBeHeapHashMap<AtomicString, RawPtrWillBeMember<StyleSheetContents> > m_t extToSheetCache;
275 WillBeHeapHashMap<RawPtrWillBeMember<StyleSheetContents>, AtomicString> m_sh eetToTextCache; 280 WillBeHeapHashMap<RawPtrWillBeMember<StyleSheetContents>, AtomicString> m_sh eetToTextCache;
276 }; 281 };
277 282
278 } 283 }
279 284
280 #endif 285 #endif
OLDNEW
« no previous file with comments | « Source/core/css/resolver/StyleResolver.cpp ('k') | Source/core/dom/StyleEngine.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698