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

Unified Diff: Source/core/css/StyleSheetContents.h

Issue 179873014: Move StyleSheetContents cache to StyleEngine. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Patch for landing Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/css/CSSStyleSheet.cpp ('k') | Source/core/css/StyleSheetContents.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/StyleSheetContents.h
diff --git a/Source/core/css/StyleSheetContents.h b/Source/core/css/StyleSheetContents.h
index 8090f8e4b4df48c115f1d95bd2819a51c0266376..90acc818cd9c85ab313221d08a4defd2cfbeb9a1 100644
--- a/Source/core/css/StyleSheetContents.h
+++ b/Source/core/css/StyleSheetContents.h
@@ -139,13 +139,16 @@ public:
void registerClient(CSSStyleSheet*);
void unregisterClient(CSSStyleSheet*);
- bool hasOneClient() { return (m_loadingClients.size() + m_completedClients.size()) == 1; }
+ size_t clientSize() const { return m_loadingClients.size() + m_completedClients.size(); }
+ bool hasOneClient() { return clientSize() == 1; }
void clientLoadCompleted(CSSStyleSheet*);
void clientLoadStarted(CSSStyleSheet*);
bool isMutable() const { return m_isMutable; }
void setMutable() { m_isMutable = true; }
+ void removeSheetFromCache(Document*);
+
bool isInMemoryCache() const { return m_isInMemoryCache; }
void addedToMemoryCache();
void removedFromMemoryCache();
@@ -165,6 +168,7 @@ private:
StyleSheetContents(const StyleSheetContents&);
void notifyRemoveFontFaceRule(const StyleRuleFontFace*);
+ Document* clientSingleOwnerDocument() const;
void clearCharsetRule();
RawPtrWillBeMember<StyleRuleImport> m_ownerRule;
@@ -184,6 +188,7 @@ private:
bool m_isInMemoryCache : 1;
bool m_hasFontFaceRule : 1;
bool m_hasMediaQueries : 1;
+ bool m_hasSingleOwnerDocument : 1;
CSSParserContext m_parserContext;
« no previous file with comments | « Source/core/css/CSSStyleSheet.cpp ('k') | Source/core/css/StyleSheetContents.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698