Chromium Code Reviews| Index: third_party/WebKit/Source/core/css/StyleSheetContents.cpp |
| diff --git a/third_party/WebKit/Source/core/css/StyleSheetContents.cpp b/third_party/WebKit/Source/core/css/StyleSheetContents.cpp |
| index a3a7b8ff31a319af23ec78c0e0546a2d33e254b9..9ad890082c3cc4b20fc52366b5317ba5fd16ad06 100644 |
| --- a/third_party/WebKit/Source/core/css/StyleSheetContents.cpp |
| +++ b/third_party/WebKit/Source/core/css/StyleSheetContents.cpp |
| @@ -65,6 +65,7 @@ StyleSheetContents::StyleSheetContents(StyleRuleImport* ownerRule, const String& |
| , m_hasFontFaceRule(false) |
| , m_hasMediaQueries(false) |
| , m_hasSingleOwnerDocument(true) |
| + , m_isUsedFromTextCache(false) |
| , m_parserContext(context) |
| { |
| } |
| @@ -83,6 +84,7 @@ StyleSheetContents::StyleSheetContents(const StyleSheetContents& o) |
| , m_hasFontFaceRule(o.m_hasFontFaceRule) |
| , m_hasMediaQueries(o.m_hasMediaQueries) |
| , m_hasSingleOwnerDocument(true) |
| + , m_isUsedFromTextCache(false) |
| , m_parserContext(o.m_parserContext) |
| { |
| // FIXME: Copy import rules. |
| @@ -98,10 +100,6 @@ StyleSheetContents::~StyleSheetContents() |
| void StyleSheetContents::setHasSyntacticallyValidCSSHeader(bool isValidCss) |
| { |
| - if (!isValidCss) { |
| - if (Document* document = clientSingleOwnerDocument()) |
| - removeSheetFromCache(document); |
|
haraken
2016/08/03 01:01:18
For example, don't you need to explicitly remove t
rune
2016/08/03 09:20:05
I think that removeSheetFromCache here never remov
|
| - } |
| m_hasSyntacticallyValidCSSHeader = isValidCss; |
| } |
| @@ -546,8 +544,6 @@ void StyleSheetContents::unregisterClient(CSSStyleSheet* sheet) |
| if (!sheet->ownerDocument() || !m_loadingClients.isEmpty() || !m_completedClients.isEmpty()) |
| return; |
| - if (m_hasSingleOwnerDocument) |
| - removeSheetFromCache(sheet->ownerDocument()); |
| m_hasSingleOwnerDocument = true; |
| } |
| @@ -570,12 +566,6 @@ void StyleSheetContents::clientLoadStarted(CSSStyleSheet* sheet) |
| m_loadingClients.add(sheet); |
| } |
| -void StyleSheetContents::removeSheetFromCache(Document* document) |
| -{ |
| - ASSERT(document); |
| - document->styleEngine().removeSheet(this); |
| -} |
| - |
| void StyleSheetContents::setReferencedFromResource(CSSStyleSheetResource* resource) |
| { |
| DCHECK(resource); |