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

Unified Diff: Source/core/dom/StyleEngine.cpp

Issue 28553005: Avoid parsing css text if there are identical inline style blocks. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Added StyleSheetContentsCache class Created 7 years, 2 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
« Source/core/dom/StyleEngine.h ('K') | « Source/core/dom/StyleEngine.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/StyleEngine.cpp
diff --git a/Source/core/dom/StyleEngine.cpp b/Source/core/dom/StyleEngine.cpp
index 25f033737f28e93a14dc0368016b6865301dddad..4dea159ad16c33d98c12817547a088c72de7959f 100644
--- a/Source/core/dom/StyleEngine.cpp
+++ b/Source/core/dom/StyleEngine.cpp
@@ -464,4 +464,19 @@ void StyleEngine::appendActiveAuthorStyleSheets(StyleResolver* styleResolver)
styleResolver->setBuildScopedStyleTreeInDocumentOrder(false);
}
+StyleSheetContents* StyleEngine::findStyleSheetContents(const AtomicString& sheetText)
+{
+ return m_styleSheetContentsCache.find(sheetText);
+}
+
+void StyleEngine::registerStyleSheetContents(const AtomicString& sheetText, StyleSheetContents* contents)
+{
+ m_styleSheetContentsCache.add(sheetText, contents);
+}
+
+void StyleEngine::unregisterStyleSheetContents(const AtomicString& sheetText)
+{
+ m_styleSheetContentsCache.remove(sheetText);
+}
+
}
« Source/core/dom/StyleEngine.h ('K') | « Source/core/dom/StyleEngine.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698