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

Unified Diff: Source/core/dom/Document.h

Issue 14604003: When there are no more stylesheets schedule the recalc async (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Refactor based on review Created 7 years, 7 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 | « no previous file | Source/core/dom/Document.cpp » ('j') | Source/core/dom/Document.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Document.h
diff --git a/Source/core/dom/Document.h b/Source/core/dom/Document.h
index 14d4b4b88397d4e77bf647dbb0148a96e9d3aef3..8976bc8ae4b410e7dacf39b0a5b0700872e32421 100644
--- a/Source/core/dom/Document.h
+++ b/Source/core/dom/Document.h
@@ -174,7 +174,8 @@ enum PageshowEventPersistence {
PageshowEventPersisted = 1
};
-enum StyleResolverUpdateFlag { RecalcStyleImmediately, DeferRecalcStyle, RecalcStyleIfNeeded };
+enum StyleResolverUpdateType { RecalcStyleImmediately, DeferRecalcStyle };
+enum StyleResolverUpdateMode { FullStyleUpdate, OptimizedStyleUpdate };
enum NodeListInvalidationType {
DoNotInvalidateOnAttributeChanges = 0,
@@ -445,16 +446,8 @@ public:
bool gotoAnchorNeededAfterStylesheetsLoad() { return m_gotoAnchorNeededAfterStylesheetsLoad; }
void setGotoAnchorNeededAfterStylesheetsLoad(bool b) { m_gotoAnchorNeededAfterStylesheetsLoad = b; }
- /**
- * Called when one or more stylesheets in the document may have been added, removed or changed.
- *
- * Creates a new style resolver and assign it to this document. This is done by iterating through all nodes in
- * document (or those before <BODY> in a HTML document), searching for stylesheets. Stylesheets can be contained in
- * <LINK>, <STYLE> or <BODY> elements, as well as processing instructions (XML documents only). A list is
- * constructed from these which is used to create the a new style selector which collates all of the stylesheets
- * found and is used to calculate the derived styles for all rendering objects.
- */
- void styleResolverChanged(StyleResolverUpdateFlag);
+ // Called when one or more stylesheets in the document may have been added, removed or changed.
+ void styleResolverChanged(StyleResolverUpdateType, StyleResolverUpdateMode = FullStyleUpdate);
void didAccessStyleResolver();
« no previous file with comments | « no previous file | Source/core/dom/Document.cpp » ('j') | Source/core/dom/Document.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698