Index: Source/core/fetch/CSSStyleSheetResource.cpp |
diff --git a/Source/core/fetch/CSSStyleSheetResource.cpp b/Source/core/fetch/CSSStyleSheetResource.cpp |
index 869d7ca543715dce7f4a7c78d1f82958ea7da477..7281e1ead5ba6d27217131cb60f303d6d48f0d43 100644 |
--- a/Source/core/fetch/CSSStyleSheetResource.cpp |
+++ b/Source/core/fetch/CSSStyleSheetResource.cpp |
@@ -77,11 +77,11 @@ void CSSStyleSheetResource::didAddClient(ResourceClient* c) |
static_cast<StyleSheetResourceClient*>(c)->setCSSStyleSheet(m_resourceRequest.url(), m_response.url(), encoding(), this); |
} |
-const String CSSStyleSheetResource::sheetText(bool enforceMIMEType, bool* hasValidMIMEType) const |
+const String CSSStyleSheetResource::sheetText(bool* hasValidMIMEType) const |
{ |
ASSERT(!isPurgeable()); |
- if (!m_data || m_data->isEmpty() || !canUseSheet(enforceMIMEType, hasValidMIMEType)) |
+ if (!m_data || m_data->isEmpty() || !canUseSheet(hasValidMIMEType)) |
return String(); |
if (!m_decodedSheetText.isNull()) |
@@ -125,14 +125,11 @@ void CSSStyleSheetResource::destroyDecodedDataIfPossible() |
setDecodedSize(0); |
} |
-bool CSSStyleSheetResource::canUseSheet(bool enforceMIMEType, bool* hasValidMIMEType) const |
+bool CSSStyleSheetResource::canUseSheet(bool* hasValidMIMEType) const |
{ |
if (errorOccurred()) |
return false; |
- if (!enforceMIMEType && !hasValidMIMEType) |
- return true; |
- |
// This check exactly matches Firefox. Note that we grab the Content-Type |
// header directly because we want to see what the value is BEFORE content |
// sniffing. Firefox does this by setting a "type hint" on the channel. |
@@ -143,8 +140,6 @@ bool CSSStyleSheetResource::canUseSheet(bool enforceMIMEType, bool* hasValidMIME |
bool typeOK = mimeType().isEmpty() || equalIgnoringCase(mimeType(), "text/css") || equalIgnoringCase(mimeType(), "application/x-unknown-content-type"); |
if (hasValidMIMEType) |
*hasValidMIMEType = typeOK; |
- if (!enforceMIMEType) |
- return true; |
return typeOK; |
} |