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

Unified Diff: Source/core/dom/StyleEngine.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: Added StyleSheetContentsCache class Created 7 years, 2 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/dom/StyleEngine.h
diff --git a/Source/core/dom/StyleEngine.h b/Source/core/dom/StyleEngine.h
index b7bfd7812150847bf216c8eb70bb73de667f6ba6..6a1d748315c861db84d752a0b5340f37d5d59e10 100644
--- a/Source/core/dom/StyleEngine.h
+++ b/Source/core/dom/StyleEngine.h
@@ -28,6 +28,7 @@
#ifndef StyleEngine_h
#define StyleEngine_h
+#include "core/css/StyleSheetContentsCache.h"
#include "core/dom/Document.h"
#include "core/dom/DocumentOrderedList.h"
#include "core/dom/DocumentStyleSheetCollection.h"
@@ -35,6 +36,7 @@
#include "wtf/ListHashSet.h"
#include "wtf/RefPtr.h"
#include "wtf/Vector.h"
+#include "wtf/text/AtomicString.h"
#include "wtf/text/WTFString.h"
namespace WebCore {
@@ -111,6 +113,10 @@ public:
void appendActiveAuthorStyleSheets(StyleResolver*);
void getActiveAuthorStyleSheets(Vector<const Vector<RefPtr<CSSStyleSheet> >*>& activeAuthorStyleSheets) const;
+ StyleSheetContents* findStyleSheetContents(const AtomicString&);
dglazkov 2013/10/21 18:24:10 Now that you have nice Cache member, why not just
tasak 2013/10/25 05:23:13 Done.
+ void registerStyleSheetContents(const AtomicString&, StyleSheetContents*);
+ void unregisterStyleSheetContents(const AtomicString&);
+
private:
StyleEngine(Document&);
@@ -155,6 +161,8 @@ private:
bool m_usesFirstLineRules;
bool m_usesFirstLetterRules;
bool m_usesRemUnits;
+
+ StyleSheetContentsCache m_styleSheetContentsCache;
};
}

Powered by Google App Engine
This is Rietveld 408576698