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

Unified Diff: third_party/WebKit/Source/core/dom/StyleEngine.h

Issue 2534863002: Introduce markAllTreeScopesDirty. (Closed)
Patch Set: Created 4 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/StyleEngine.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/StyleEngine.h
diff --git a/third_party/WebKit/Source/core/dom/StyleEngine.h b/third_party/WebKit/Source/core/dom/StyleEngine.h
index 46f0c8e459c7020038602efc64537e77546c21c9..3e2352ea9c6fa5e631dbce08bb8cb2b1da373272 100644
--- a/third_party/WebKit/Source/core/dom/StyleEngine.h
+++ b/third_party/WebKit/Source/core/dom/StyleEngine.h
@@ -124,6 +124,7 @@ class CORE_EXPORT StyleEngine final
void updateStyleSheetsInImport(DocumentStyleSheetCollector& parentCollector);
void updateActiveStyleSheets(StyleResolverUpdateMode);
void updateActiveStyle();
+ void markAllTreeScopesDirty() { m_allTreeScopesDirty = true; }
enum ActiveSheetsUpdate { DontUpdateActiveSheets, UpdateActiveSheets };
String preferredStylesheetSetName() const {
@@ -273,12 +274,15 @@ class CORE_EXPORT StyleEngine final
private:
StyleEngine(Document&);
+ bool needsActiveStyleSheetUpdate() const {
+ return m_allTreeScopesDirty || m_documentScopeDirty ||
+ m_dirtyTreeScopes.size();
+ }
TreeScopeStyleSheetCollection* ensureStyleSheetCollectionFor(TreeScope&);
TreeScopeStyleSheetCollection* styleSheetCollectionFor(TreeScope&);
- bool shouldUpdateDocumentStyleSheetCollection(StyleResolverUpdateMode) const;
- bool shouldUpdateShadowTreeStyleSheetCollection(
- StyleResolverUpdateMode) const;
+ bool shouldUpdateDocumentStyleSheetCollection() const;
+ bool shouldUpdateShadowTreeStyleSheetCollection() const;
void markDocumentDirty();
void markTreeScopeDirty(TreeScope&);
@@ -351,6 +355,7 @@ class CORE_EXPORT StyleEngine final
StyleSheetCollectionMap m_styleSheetCollectionMap;
bool m_documentScopeDirty = true;
+ bool m_allTreeScopesDirty = false;
UnorderedTreeScopeSet m_dirtyTreeScopes;
UnorderedTreeScopeSet m_activeTreeScopes;
DocumentOrderedList m_treeBoundaryCrossingScopes;
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/StyleEngine.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698