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

Unified Diff: Source/core/fetch/CSSStyleSheetResource.h

Issue 1169713004: Allow lax MIME type parsing for same-origin CSS in quirks mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Comment. Created 5 years, 6 months 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
« no previous file with comments | « Source/core/css/StyleSheetContents.cpp ('k') | Source/core/fetch/CSSStyleSheetResource.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/fetch/CSSStyleSheetResource.h
diff --git a/Source/core/fetch/CSSStyleSheetResource.h b/Source/core/fetch/CSSStyleSheetResource.h
index 2ce492d91b21c12b6e0d269016d8ff3ff027d153..ee898afb5b58ea1d17c8b381df699c938f43d2e4 100644
--- a/Source/core/fetch/CSSStyleSheetResource.h
+++ b/Source/core/fetch/CSSStyleSheetResource.h
@@ -38,11 +38,13 @@ class StyleSheetContents;
class CSSStyleSheetResource final : public StyleSheetResource {
public:
+ enum class MIMETypeCheck { Strict, Lax };
+
CSSStyleSheetResource(const ResourceRequest&, const String& charset);
virtual ~CSSStyleSheetResource();
DECLARE_VIRTUAL_TRACE();
- const String sheetText(bool* hasValidMIMEType = 0) const;
+ const String sheetText(MIMETypeCheck = MIMETypeCheck::Strict) const;
const AtomicString mimeType() const;
@@ -56,7 +58,7 @@ protected:
virtual void destroyDecodedDataIfPossible() override;
private:
- bool canUseSheet(bool* hasValidMIMEType) const;
+ bool canUseSheet(MIMETypeCheck) const;
virtual void dispose() override;
virtual void checkNotify() override;
« no previous file with comments | « Source/core/css/StyleSheetContents.cpp ('k') | Source/core/fetch/CSSStyleSheetResource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698