Index: third_party/WebKit/Source/core/css/CSSStyleSheet.cpp |
diff --git a/third_party/WebKit/Source/core/css/CSSStyleSheet.cpp b/third_party/WebKit/Source/core/css/CSSStyleSheet.cpp |
index b02b81df3a76c6daa27eb9c8061d20bc6d2201b3..56a7481a7f7acc29ba2df185e4530fccc393e140 100644 |
--- a/third_party/WebKit/Source/core/css/CSSStyleSheet.cpp |
+++ b/third_party/WebKit/Source/core/css/CSSStyleSheet.cpp |
@@ -147,10 +147,8 @@ static bool isStyleElement(const Node* node) |
void CSSStyleSheet::willMutateRules() |
{ |
// If we are the only client it is safe to mutate. |
- if (m_contents->clientSize() <= 1 && !m_contents->isReferencedFromResource()) { |
+ if (!m_contents->isUsedFromTextCache() && !m_contents->isReferencedFromResource()) { |
m_contents->clearRuleSet(); |
- if (Document* document = ownerDocument()) |
- m_contents->removeSheetFromCache(document); |
m_contents->setMutable(); |
return; |
} |