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

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

Issue 2484863003: Make updateStyleAndLayoutTree ready for async stylesheet update. (Closed)
Patch Set: Rebased 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
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 c3f47d518bb2967c88dc0a975c55b7c6441f08d5..208b0aa8d65d0fc8af37d73974c623e8f24cbd39 100644
--- a/third_party/WebKit/Source/core/dom/StyleEngine.h
+++ b/third_party/WebKit/Source/core/dom/StyleEngine.h
@@ -101,6 +101,7 @@ class CORE_EXPORT StyleEngine final
const HeapVector<Member<CSSStyleSheet>> activeStyleSheetsForInspector() const;
+ bool needsActiveStyleUpdate() const;
void setNeedsActiveStyleUpdate(StyleSheet*, StyleResolverUpdateMode);
void addStyleSheetCandidateNode(Node&);
void removeStyleSheetCandidateNode(Node&);
@@ -119,6 +120,7 @@ class CORE_EXPORT StyleEngine final
void clearMediaQueryRuleSetStyleSheets();
void updateStyleSheetsInImport(DocumentStyleSheetCollector& parentCollector);
void updateActiveStyleSheets(StyleResolverUpdateMode);
+ void updateActiveStyle();
enum ActiveSheetsUpdate { DontUpdateActiveSheets, UpdateActiveSheets };
String preferredStylesheetSetName() const {
@@ -177,10 +179,10 @@ class CORE_EXPORT StyleEngine final
void setRuleUsageTracker(StyleRuleUsageTracker*);
StyleResolver& ensureResolver() {
+ updateActiveStyle();
if (!m_resolver) {
createResolver();
} else if (m_resolver->hasPendingAuthorStyleSheets()) {
- viewportRulesChanged();
m_resolver->appendPendingAuthorStyleSheets();
finishAppendAuthorStyleSheets();
} else if (m_globalRuleSet.isDirty()) {
@@ -311,6 +313,9 @@ class CORE_EXPORT StyleEngine final
const HeapVector<Member<RuleSet>>&);
void invalidateSlottedElements(HTMLSlotElement&);
+ void updateViewport();
+ void updateActiveStyleSheets();
+
Member<Document> m_document;
bool m_isMaster;

Powered by Google App Engine
This is Rietveld 408576698