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

Side by Side Diff: sky/engine/core/dom/StyleEngine.h

Issue 812593004: Remove dirtyTreeScopes tracking code from StyleEngine. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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 unified diff | Download patch
« no previous file with comments | « sky/engine/core/dom/Document.cpp ('k') | sky/engine/core/dom/StyleEngine.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
9 * Copyright (C) 2011 Google Inc. All rights reserved. 9 * Copyright (C) 2011 Google Inc. All rights reserved.
10 * 10 *
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 friend class IgnoringPendingStylesheet; 65 friend class IgnoringPendingStylesheet;
66 66
67 static PassOwnPtr<StyleEngine> create(Document& document) { return adoptPtr( new StyleEngine(document)); } 67 static PassOwnPtr<StyleEngine> create(Document& document) { return adoptPtr( new StyleEngine(document)); }
68 68
69 ~StyleEngine(); 69 ~StyleEngine();
70 70
71 void detachFromDocument(); 71 void detachFromDocument();
72 72
73 const Vector<RefPtr<CSSStyleSheet>>& activeAuthorStyleSheetsFor(TreeScope&); 73 const Vector<RefPtr<CSSStyleSheet>>& activeAuthorStyleSheetsFor(TreeScope&);
74 74
75 void modifiedStyleSheet(CSSStyleSheet*);
76 void addStyleSheetCandidateNode(Node*, bool createdByParser); 75 void addStyleSheetCandidateNode(Node*, bool createdByParser);
77 void removeStyleSheetCandidateNode(Node*, ContainerNode* scopingNode, TreeSc ope&); 76 void removeStyleSheetCandidateNode(Node*, ContainerNode* scopingNode, TreeSc ope&);
78 77
79 void updateActiveStyleSheets(); 78 void updateActiveStyleSheets();
80 79
81 bool ignoringPendingStylesheets() const { return m_ignorePendingStylesheets; } 80 bool ignoringPendingStylesheets() const { return m_ignorePendingStylesheets; }
82 81
83 // FIXME(sky): Remove this and ::first-line. 82 // FIXME(sky): Remove this and ::first-line.
84 bool usesFirstLineRules() const { return false; } 83 bool usesFirstLineRules() const { return false; }
85 84
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 private: 121 private:
123 // CSSFontSelectorClient implementation. 122 // CSSFontSelectorClient implementation.
124 virtual void fontsNeedUpdate(CSSFontSelector*) override; 123 virtual void fontsNeedUpdate(CSSFontSelector*) override;
125 124
126 private: 125 private:
127 StyleEngine(Document&); 126 StyleEngine(Document&);
128 127
129 StyleSheetCollection* ensureStyleSheetCollectionFor(TreeScope&); 128 StyleSheetCollection* ensureStyleSheetCollectionFor(TreeScope&);
130 StyleSheetCollection* styleSheetCollectionFor(TreeScope&); 129 StyleSheetCollection* styleSheetCollectionFor(TreeScope&);
131 130
132 void markTreeScopeDirty(TreeScope&);
133
134 void createResolver(); 131 void createResolver();
135 132
136 const StyleSheetCollection* documentStyleSheetCollection() const 133 const StyleSheetCollection* documentStyleSheetCollection() const
137 { 134 {
138 return m_documentStyleSheetCollection.get(); 135 return m_documentStyleSheetCollection.get();
139 } 136 }
140 137
141 StyleSheetCollection* documentStyleSheetCollection() 138 StyleSheetCollection* documentStyleSheetCollection()
142 { 139 {
143 return m_documentStyleSheetCollection.get(); 140 return m_documentStyleSheetCollection.get();
144 } 141 }
145 142
146 RawPtr<Document> m_document; 143 RawPtr<Document> m_document;
147 144
148 // TODO(esprehn): Remove special separate collection for document. 145 // TODO(esprehn): Remove special separate collection for document.
149 OwnPtr<StyleSheetCollection> m_documentStyleSheetCollection; 146 OwnPtr<StyleSheetCollection> m_documentStyleSheetCollection;
150 147
151 typedef HashMap<RawPtr<TreeScope>, OwnPtr<StyleSheetCollection> > StyleSheet CollectionMap; 148 typedef HashMap<RawPtr<TreeScope>, OwnPtr<StyleSheetCollection> > StyleSheet CollectionMap;
152 StyleSheetCollectionMap m_styleSheetCollectionMap; 149 StyleSheetCollectionMap m_styleSheetCollectionMap;
153 150
154 typedef ListHashSet<TreeScope*, 16> TreeScopeSet; 151 typedef ListHashSet<TreeScope*, 16> TreeScopeSet;
155 TreeScopeSet m_dirtyTreeScopes;
156 TreeScopeSet m_activeTreeScopes; 152 TreeScopeSet m_activeTreeScopes;
157 153
158 bool m_ignorePendingStylesheets; 154 bool m_ignorePendingStylesheets;
159 OwnPtr<StyleResolver> m_resolver; 155 OwnPtr<StyleResolver> m_resolver;
160 156
161 RefPtr<CSSFontSelector> m_fontSelector; 157 RefPtr<CSSFontSelector> m_fontSelector;
162 158
163 HashMap<AtomicString, StyleSheetContents*> m_textToSheetCache; 159 HashMap<AtomicString, StyleSheetContents*> m_textToSheetCache;
164 HashMap<StyleSheetContents*, AtomicString> m_sheetToTextCache; 160 HashMap<StyleSheetContents*, AtomicString> m_sheetToTextCache;
165 }; 161 };
166 162
167 } 163 }
168 164
169 #endif // SKY_ENGINE_CORE_DOM_STYLEENGINE_H_ 165 #endif // SKY_ENGINE_CORE_DOM_STYLEENGINE_H_
OLDNEW
« no previous file with comments | « sky/engine/core/dom/Document.cpp ('k') | sky/engine/core/dom/StyleEngine.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698