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

Unified Diff: Source/core/css/CSSStyleSheet.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: Patch for landing 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
« no previous file with comments | « PerformanceTests/ShadowDOM/StyleSheetInsert.html ('k') | Source/core/css/CSSStyleSheet.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSStyleSheet.h
diff --git a/Source/core/css/CSSStyleSheet.h b/Source/core/css/CSSStyleSheet.h
index f27a068c81f621129dbf9497cb8abae9fc274108..13ab90f561e6ec988b7921b845105d53f02ea41d 100644
--- a/Source/core/css/CSSStyleSheet.h
+++ b/Source/core/css/CSSStyleSheet.h
@@ -51,6 +51,7 @@ public:
static PassRefPtr<CSSStyleSheet> create(PassRefPtr<StyleSheetContents>, CSSImportRule* ownerRule = 0);
static PassRefPtr<CSSStyleSheet> create(PassRefPtr<StyleSheetContents>, Node* ownerNode);
static PassRefPtr<CSSStyleSheet> createInline(Node*, const KURL&, const TextPosition& startPosition = TextPosition::minimumPosition(), const String& encoding = String());
+ static PassRefPtr<CSSStyleSheet> createInline(PassRefPtr<StyleSheetContents>, Node* ownerNode, const TextPosition& startPosition = TextPosition::minimumPosition());
virtual ~CSSStyleSheet();
@@ -110,6 +111,10 @@ public:
bool isInline() const { return m_isInlineStylesheet; }
TextPosition startPositionInSource() const { return m_startPosition; }
+ bool sheetLoaded();
+ bool loadCompleted() const { return m_loadCompleted; }
+ void startLoadingDynamicSheet();
+
private:
CSSStyleSheet(PassRefPtr<StyleSheetContents>, CSSImportRule* ownerRule);
CSSStyleSheet(PassRefPtr<StyleSheetContents>, Node* ownerNode, bool isInlineStylesheet, const TextPosition& startPosition);
@@ -131,6 +136,7 @@ private:
CSSRule* m_ownerRule;
TextPosition m_startPosition;
+ bool m_loadCompleted;
mutable RefPtr<MediaList> m_mediaCSSOMWrapper;
mutable Vector<RefPtr<CSSRule> > m_childRuleCSSOMWrappers;
« no previous file with comments | « PerformanceTests/ShadowDOM/StyleSheetInsert.html ('k') | Source/core/css/CSSStyleSheet.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698