Index: Source/core/css/StyleSheetContents.cpp |
diff --git a/Source/core/css/StyleSheetContents.cpp b/Source/core/css/StyleSheetContents.cpp |
index 98f378dd6abe174e4e4f6569ac238c65a092ba23..ab2038075ef8c5c8300bb439742900ce266dbabd 100644 |
--- a/Source/core/css/StyleSheetContents.cpp |
+++ b/Source/core/css/StyleSheetContents.cpp |
@@ -113,8 +113,11 @@ void StyleSheetContents::setHasSyntacticallyValidCSSHeader(bool isValidCss) |
m_hasSyntacticallyValidCSSHeader = isValidCss; |
} |
-bool StyleSheetContents::maybeCacheable() const |
+bool StyleSheetContents::isCacheable() const |
{ |
+ // This would require dealing with multiple clients for load callbacks. |
+ if (!loadCompleted()) |
+ return false; |
// FIXME: StyleSheets with media queries can't be cached because their RuleSet |
// is processed differently based off the media queries, which might resolve |
// differently depending on the context of the parent CSSStyleSheet (e.g. |
@@ -140,14 +143,6 @@ bool StyleSheetContents::maybeCacheable() const |
return true; |
} |
-bool StyleSheetContents::isCacheable() const |
-{ |
- // This would require dealing with multiple clients for load callbacks. |
- if (!loadCompleted()) |
- return false; |
- return maybeCacheable(); |
-} |
- |
void StyleSheetContents::parserAppendRule(PassRefPtrWillBeRawPtr<StyleRuleBase> rule) |
{ |
ASSERT(!rule->isCharsetRule()); |
@@ -588,8 +583,6 @@ void StyleSheetContents::clientLoadStarted(CSSStyleSheet* sheet) |
void StyleSheetContents::removeSheetFromCache(Document* document) |
{ |
- if (!maybeCacheable()) |
- return; |
if (!document || !document->isActive()) |
return; |
document->styleEngine()->removeSheet(this); |