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

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: Rebased Created 7 years, 1 month 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 184faaff1453748050892924ffbd913dc81a86a3..6d218b615e9c3a9e74fabf83e155dda87d276fd0 100644
--- a/Source/core/css/StyleSheetContents.h
+++ b/Source/core/css/StyleSheetContents.h
@@ -67,9 +67,11 @@ public:
bool parseStringAtPosition(const String&, const TextPosition&, bool);
bool isCacheable() const;
+ bool maybeCacheable() const;
bool isLoading() const;
+ void checkLoadedFor(PassRefPtr<Node>);
void checkLoaded();
void startLoadingDynamicSheet();
@@ -86,7 +88,7 @@ public:
KURL completeURL(const String& url) const;
void addSubresourceStyleURLs(ListHashSet<KURL>&);
- void setHasSyntacticallyValidCSSHeader(bool b) { m_hasSyntacticallyValidCSSHeader = b; }
+ void setHasSyntacticallyValidCSSHeader(bool isValidCss);
bool hasSyntacticallyValidCSSHeader() const { return m_hasSyntacticallyValidCSSHeader; }
void parserAddNamespace(const AtomicString& prefix, const AtomicString& uri);
@@ -131,7 +133,7 @@ public:
bool hasOneClient() { return m_clients.size() == 1; }
bool isMutable() const { return m_isMutable; }
- void setMutable() { m_isMutable = true; }
+ void setMutable();
bool isInMemoryCache() const { return m_isInMemoryCache; }
void addedToMemoryCache();
@@ -144,6 +146,7 @@ private:
StyleSheetContents(const StyleSheetContents&);
void clearCharsetRule();
+ void clearCache();
StyleRuleImport* m_ownerRule;

Powered by Google App Engine
This is Rietveld 408576698