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

Unified Diff: sky/engine/core/css/StyleSheetContents.cpp

Issue 800083003: Remove hasSyntacticallyValidCSSHeader. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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 | « sky/engine/core/css/StyleSheetContents.h ('k') | sky/engine/core/css/parser/BisonCSSParser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/css/StyleSheetContents.cpp
diff --git a/sky/engine/core/css/StyleSheetContents.cpp b/sky/engine/core/css/StyleSheetContents.cpp
index ef8923fbc8bb1f2276e79fff68fd2cfb28228e87..f84cfa3cd93641033c6ef6e8322b43cbf4376244 100644
--- a/sky/engine/core/css/StyleSheetContents.cpp
+++ b/sky/engine/core/css/StyleSheetContents.cpp
@@ -36,8 +36,7 @@
namespace blink {
StyleSheetContents::StyleSheetContents(const String& originalURL, const CSSParserContext& context)
- : m_hasSyntacticallyValidCSSHeader(true)
- , m_usesRemUnits(false)
+ : m_usesRemUnits(false)
, m_hasMediaQueries(false)
, m_hasSingleOwnerDocument(true)
, m_originalURL(originalURL)
@@ -52,15 +51,6 @@ StyleSheetContents::~StyleSheetContents()
#endif
}
-void StyleSheetContents::setHasSyntacticallyValidCSSHeader(bool isValidCss)
-{
- if (!isValidCss) {
- if (Document* document = clientSingleOwnerDocument())
- removeSheetFromCache(document);
- }
- m_hasSyntacticallyValidCSSHeader = isValidCss;
-}
-
bool StyleSheetContents::isCacheable() const
{
// FIXME: StyleSheets with media queries can't be cached because their RuleSet
@@ -70,10 +60,6 @@ bool StyleSheetContents::isCacheable() const
// agnostic, we can restore sharing of StyleSheetContents with medea queries.
if (m_hasMediaQueries)
return false;
- // If the header is valid we are not going to need to check the SecurityOrigin.
- // FIXME: Valid mime type avoids the check too.
- if (!m_hasSyntacticallyValidCSSHeader)
- return false;
return true;
}
« no previous file with comments | « sky/engine/core/css/StyleSheetContents.h ('k') | sky/engine/core/css/parser/BisonCSSParser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698