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

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

Issue 2420413005: Collect @viewport before constructing RuleSets. (Closed)
Patch Set: Rebased Created 4 years, 2 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
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 7529ec1ec0dcbcab4038b163885a160aed1c80cb..fdd320beddde2b5525df8a7fb4fbbefea2316f28 100644
--- a/third_party/WebKit/Source/core/dom/StyleEngine.h
+++ b/third_party/WebKit/Source/core/dom/StyleEngine.h
@@ -58,6 +58,7 @@ class ShadowTreeStyleSheetCollection;
class StyleRuleFontFace;
class StyleSheet;
class StyleSheetContents;
+class ViewportStyleResolver;
class CORE_EXPORT StyleEngine final
: public GarbageCollectedFinalized<StyleEngine>,
@@ -100,6 +101,8 @@ class CORE_EXPORT StyleEngine final
void removeStyleSheetCandidateNode(Node&, TreeScope&);
void modifiedStyleSheetCandidateNode(Node&);
void watchedSelectorsChanged();
+ void initialViewportChanged();
+ void viewportRulesChanged();
void injectAuthorSheet(StyleSheetContents* authorSheet);
CSSStyleSheet& ensureInspectorStyleSheet();
@@ -161,6 +164,7 @@ class CORE_EXPORT StyleEngine final
if (!m_resolver) {
createResolver();
} else if (m_resolver->hasPendingAuthorStyleSheets()) {
+ viewportRulesChanged();
m_resolver->appendPendingAuthorStyleSheets();
}
return *m_resolver.get();
@@ -313,6 +317,7 @@ class CORE_EXPORT StyleEngine final
bool m_didCalculateResolver = false;
Member<StyleResolver> m_resolver;
+ Member<ViewportStyleResolver> m_viewportResolver;
StyleInvalidator m_styleInvalidator;
Member<CSSFontSelector> m_fontSelector;

Powered by Google App Engine
This is Rietveld 408576698