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

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

Issue 837883002: Store features in the ScopedStyleResoolver. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Simpler even. Created 5 years, 11 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
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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 void clearFontCache(); 101 void clearFontCache();
102 // updateGenericFontFamilySettings is used from WebSettingsImpl. 102 // updateGenericFontFamilySettings is used from WebSettingsImpl.
103 void updateGenericFontFamilySettings(); 103 void updateGenericFontFamilySettings();
104 104
105 void resolverChanged(); 105 void resolverChanged();
106 unsigned resolverAccessCount() const; 106 unsigned resolverAccessCount() const;
107 107
108 PassRefPtr<CSSStyleSheet> createSheet(Element*, const String& text); 108 PassRefPtr<CSSStyleSheet> createSheet(Element*, const String& text);
109 void removeSheet(StyleSheetContents*); 109 void removeSheet(StyleSheetContents*);
110 110
111 void collectScopedStyleFeaturesTo(RuleFeatureSet&) const;
112
113 private: 111 private:
114 // CSSFontSelectorClient implementation. 112 // CSSFontSelectorClient implementation.
115 virtual void fontsNeedUpdate(CSSFontSelector*) override; 113 virtual void fontsNeedUpdate(CSSFontSelector*) override;
116 114
117 private: 115 private:
118 explicit StyleEngine(Document&); 116 explicit StyleEngine(Document&);
119 117
120 void createResolver(); 118 void createResolver();
121 119
122 RawPtr<Document> m_document; 120 RawPtr<Document> m_document;
123 121
124 typedef ListHashSet<TreeScope*, 16> TreeScopeSet; 122 typedef ListHashSet<TreeScope*, 16> TreeScopeSet;
125 TreeScopeSet m_activeTreeScopes; 123 TreeScopeSet m_activeTreeScopes;
126 124
127 bool m_ignorePendingStylesheets; 125 bool m_ignorePendingStylesheets;
128 OwnPtr<StyleResolver> m_resolver; 126 OwnPtr<StyleResolver> m_resolver;
129 127
130 RefPtr<CSSFontSelector> m_fontSelector; 128 RefPtr<CSSFontSelector> m_fontSelector;
131 129
132 HashMap<AtomicString, StyleSheetContents*> m_textToSheetCache; 130 HashMap<AtomicString, StyleSheetContents*> m_textToSheetCache;
133 HashMap<StyleSheetContents*, AtomicString> m_sheetToTextCache; 131 HashMap<StyleSheetContents*, AtomicString> m_sheetToTextCache;
134 }; 132 };
135 133
136 } 134 }
137 135
138 #endif // SKY_ENGINE_CORE_DOM_STYLEENGINE_H_ 136 #endif // SKY_ENGINE_CORE_DOM_STYLEENGINE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698