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 9cd0ab14b152570f0c7e86dd25c4e07bb50e3948..390bcd80d796a59be07eb0213f50175944fca19c 100644 |
--- a/third_party/WebKit/Source/core/dom/StyleEngine.h |
+++ b/third_party/WebKit/Source/core/dom/StyleEngine.h |
@@ -99,7 +99,7 @@ |
} |
CSSStyleSheet* inspectorStyleSheet() const { return m_inspectorStyleSheet; } |
- const ActiveStyleSheetVector activeStyleSheetsForInspector(); |
+ const HeapVector<Member<CSSStyleSheet>> activeStyleSheetsForInspector() const; |
bool needsActiveStyleUpdate() const; |
void setNeedsActiveStyleUpdate(TreeScope&); |
@@ -121,6 +121,7 @@ |
RuleSet* ruleSetForSheet(CSSStyleSheet&); |
void mediaQueryAffectingValueChanged(); |
void updateStyleSheetsInImport(DocumentStyleSheetCollector& parentCollector); |
+ void updateActiveStyleSheets(StyleResolverUpdateMode); |
void updateActiveStyle(); |
void markAllTreeScopesDirty() { m_allTreeScopesDirty = true; } |
@@ -182,13 +183,20 @@ |
StyleResolver& ensureResolver() { |
updateActiveStyle(); |
- if (!m_resolver) |
+ if (!m_resolver) { |
createResolver(); |
+ } else if (m_resolver->hasPendingAuthorStyleSheets()) { |
+ m_resolver->appendPendingAuthorStyleSheets(); |
+ finishAppendAuthorStyleSheets(); |
+ } else if (m_globalRuleSet.isDirty()) { |
+ m_globalRuleSet.update(document()); |
+ } |
return *m_resolver; |
} |
bool hasResolver() const { return m_resolver; } |
void clearResolver(); |
+ void clearMasterResolver(); |
StyleInvalidator& styleInvalidator() { return m_styleInvalidator; } |
bool mediaQueryAffectedByViewportChange(); |
@@ -208,7 +216,8 @@ |
void updateGenericFontFamilySettings(); |
void didDetach(); |
- void resolverChanged(StyleResolverUpdateMode) {} |
+ bool shouldClearResolver() const; |
+ void resolverChanged(StyleResolverUpdateMode); |
CSSStyleSheet* createSheet(Element&, |
const String& text, |
@@ -289,6 +298,8 @@ |
} |
void createResolver(); |
+ void appendActiveAuthorStyleSheets(); |
+ void finishAppendAuthorStyleSheets(); |
CSSStyleSheet* parseSheet(Element&, |
const String& text, |
@@ -305,6 +316,7 @@ |
} |
void updateActiveStyleSheetsInShadow( |
+ StyleResolverUpdateMode, |
TreeScope*, |
UnorderedTreeScopeSet& treeScopesRemoved); |
@@ -336,9 +348,9 @@ |
Member<StyleRuleUsageTracker> m_tracker; |
- using StyleSheetCollectionMap = |
- HeapHashMap<WeakMember<TreeScope>, |
- Member<ShadowTreeStyleSheetCollection>>; |
+ typedef HeapHashMap<WeakMember<TreeScope>, |
+ Member<ShadowTreeStyleSheetCollection>> |
+ StyleSheetCollectionMap; |
StyleSheetCollectionMap m_styleSheetCollectionMap; |
bool m_documentScopeDirty = true; |
@@ -354,6 +366,7 @@ |
bool m_usesRemUnits = false; |
bool m_ignorePendingStylesheets = false; |
+ bool m_didCalculateResolver = false; |
Member<StyleResolver> m_resolver; |
Member<ViewportStyleResolver> m_viewportResolver; |