Chromium Code Reviews| Index: Source/core/dom/StyleEngine.h |
| diff --git a/Source/core/dom/StyleEngine.h b/Source/core/dom/StyleEngine.h |
| index 2c70a5b0d150107b4e0c705204e39886ae2aa23c..7851ef946b3ff49dffeb05f2e4c95d85c2b590bc 100644 |
| --- a/Source/core/dom/StyleEngine.h |
| +++ b/Source/core/dom/StyleEngine.h |
| @@ -35,6 +35,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 { |
| @@ -110,6 +111,11 @@ public: |
| void appendActiveAuthorStyleSheets(StyleResolver*); |
| void getActiveAuthorStyleSheets(Vector<const Vector<RefPtr<CSSStyleSheet> >*>& activeAuthorStyleSheets) const; |
| + // CSSStyleContents cache. |
| + StyleSheetContents* findStyleSheetContents(const AtomicString&); |
| + void registerStyleSheetContents(const AtomicString&, StyleSheetContents*); |
| + void unregisterStyleSheetContents(const AtomicString&); |
| + |
| private: |
| StyleEngine(Document&); |
| @@ -154,6 +160,9 @@ private: |
| bool m_usesFirstLineRules; |
| bool m_usesFirstLetterRules; |
| bool m_usesRemUnits; |
| + |
| + // Mapping from textContents of StyleElement to a pair of StyleSheetContent(second) and its usages(first). |
|
dglazkov
2013/10/18 16:56:19
Can we move this into a separate class, which is c
tasak
2013/10/21 12:27:37
Done.
|
| + HashMap<AtomicString, std::pair<unsigned, RefPtr<StyleSheetContents> > > m_styleSheetContentsCache; |
| }; |
| } |