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

Unified Diff: Source/core/css/StyleSheetContents.h

Issue 28553005: Avoid parsing css text if there are identical inline style blocks. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 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
Index: Source/core/css/StyleSheetContents.h
diff --git a/Source/core/css/StyleSheetContents.h b/Source/core/css/StyleSheetContents.h
index 0a7bde9ef230f833a01536ed15dff83ce21e8926..415b41749d5e84cea053f480fabc9f0465b02182 100644
--- a/Source/core/css/StyleSheetContents.h
+++ b/Source/core/css/StyleSheetContents.h
@@ -70,6 +70,7 @@ public:
bool parseStringAtPosition(const String&, const TextPosition&, bool);
bool isCacheable() const;
+ bool maybeCacheable() const;
bool isLoading() const;
@@ -83,12 +84,12 @@ public:
const String& charset() const { return m_parserContext.charset(); }
- bool loadCompleted() const { return m_loadCompleted; }
+ bool loadCompleted() const;
bool hasFailedOrCanceledSubresources() const;
KURL completeURL(const String& url) const;
- void setHasSyntacticallyValidCSSHeader(bool b) { m_hasSyntacticallyValidCSSHeader = b; }
+ void setHasSyntacticallyValidCSSHeader(bool isValidCss);
bool hasSyntacticallyValidCSSHeader() const { return m_hasSyntacticallyValidCSSHeader; }
void setHasFontFaceRule(bool b) { m_hasFontFaceRule = b; }
@@ -157,6 +158,7 @@ private:
void notifyRemoveFontFaceRule(const StyleRuleFontFace*);
void clearCharsetRule();
+ void clearCache();
StyleRuleImport* m_ownerRule;
@@ -168,7 +170,6 @@ private:
typedef HashMap<AtomicString, AtomicString> PrefixNamespaceURIMap;
PrefixNamespaceURIMap m_namespaces;
- bool m_loadCompleted : 1;
bool m_hasSyntacticallyValidCSSHeader : 1;
bool m_didLoadErrorOccur : 1;
bool m_usesRemUnits : 1;

Powered by Google App Engine
This is Rietveld 408576698