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

Unified Diff: Source/core/dom/Document.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: Rebased Created 7 years, 1 month 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
Index: Source/core/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index ab1e4efa16585612da3153947a4803a48e31b440..d88b3622e9eb3cbe2b8ddf890e75727da5f7e4bd 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -496,6 +496,8 @@ Document::~Document()
ASSERT(!m_parentTreeScope);
ASSERT(!hasGuardRefCount());
+ StyleEngine::clearSheetCache();
esprehn 2013/11/15 10:27:37 You shouldn't need to clear the sheet cache like t
tasak 2014/01/09 09:24:50 Done.
+
if (m_templateDocument)
m_templateDocument->setTemplateDocumentHost(0); // balanced in templateDocument().
@@ -627,6 +629,7 @@ void Document::setCompatibilityMode(CompatibilityMode mode)
selectorQueryCache().invalidate();
if (inQuirksMode() != wasInQuirksMode) {
// All injected stylesheets have to reparse using the different mode.
+ StyleEngine::clearSheetCache();
esprehn 2013/11/15 10:27:37 Ditto.
tasak 2014/01/09 09:24:50 I think, quirks document cannot share stylesheets
m_styleEngine->invalidateInjectedStyleSheetCache();
}
}

Powered by Google App Engine
This is Rietveld 408576698