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

Unified Diff: Source/core/dom/StyleEngine.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/dom/StyleElement.cpp ('k') | Source/core/dom/StyleEngine.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/StyleEngine.h
diff --git a/Source/core/dom/StyleEngine.h b/Source/core/dom/StyleEngine.h
index 57daab1cade6ba1b987d4179738d3174c7282a65..2cfe1d4bc7b1e137c062c12c280a6d3ff4e72071 100644
--- a/Source/core/dom/StyleEngine.h
+++ b/Source/core/dom/StyleEngine.h
@@ -184,8 +184,8 @@ public:
void markDocumentDirty();
- static PassRefPtr<CSSStyleSheet> createSheet(Element*, const String& text, TextPosition startPosition, bool createdByParser);
- static void removeSheet(StyleSheetContents*);
+ PassRefPtr<CSSStyleSheet> createSheet(Element*, const String& text, TextPosition startPosition, bool createdByParser);
+ void removeSheet(StyleSheetContents*);
void trace(Visitor*);
@@ -245,6 +245,9 @@ private:
OwnPtr<StyleResolver> m_resolver;
RefPtr<CSSFontSelector> m_fontSelector;
+
+ HashMap<AtomicString, StyleSheetContents*> m_textToSheetCache;
+ HashMap<StyleSheetContents*, AtomicString> m_sheetToTextCache;
};
}
« no previous file with comments | « Source/core/dom/StyleElement.cpp ('k') | Source/core/dom/StyleEngine.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698