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

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

Issue 2405143003: Separate @viewport from other RuleSet construction. (Closed)
Patch Set: Missing resolve() 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 9d4e6a4c96581dfe2a76e7e6506904acd264e1c8..ca4160f3a6dbdf5bc2cd80a27622236ba81be7df 100644
--- a/third_party/WebKit/Source/core/dom/StyleEngine.h
+++ b/third_party/WebKit/Source/core/dom/StyleEngine.h
@@ -57,6 +57,7 @@ class ShadowTreeStyleSheetCollection;
class StyleRuleFontFace;
class StyleSheet;
class StyleSheetContents;
+class ViewportStyleResolver;
class CORE_EXPORT StyleEngine final
: public GarbageCollectedFinalized<StyleEngine>,
@@ -99,6 +100,7 @@ class CORE_EXPORT StyleEngine final
void removeStyleSheetCandidateNode(Node&, TreeScope&);
void modifiedStyleSheetCandidateNode(Node&);
void watchedSelectorsChanged();
+ void initialViewportChanged();
void injectAuthorSheet(StyleSheetContents* authorSheet);
CSSStyleSheet& ensureInspectorStyleSheet();
@@ -106,6 +108,7 @@ class CORE_EXPORT StyleEngine final
void clearMediaQueryRuleSetStyleSheets();
void updateStyleSheetsInImport(DocumentStyleSheetCollector& parentCollector);
void updateActiveStyleSheets(StyleResolverUpdateMode);
+ void updateViewport() { documentStyleSheetCollection().updateViewport(); }
enum ActiveSheetsUpdate { DontUpdateActiveSheets, UpdateActiveSheets };
String preferredStylesheetSetName() const {
@@ -160,6 +163,7 @@ class CORE_EXPORT StyleEngine final
if (!m_resolver) {
createResolver();
} else if (m_resolver->hasPendingAuthorStyleSheets()) {
+ updateViewport();
m_resolver->appendPendingAuthorStyleSheets();
}
return *m_resolver.get();
@@ -179,6 +183,8 @@ class CORE_EXPORT StyleEngine final
// updateGenericFontFamilySettings is used from WebSettingsImpl.
void updateGenericFontFamilySettings();
+ ViewportStyleResolver& ensureViewportStyleResolver();
+
void didDetach();
bool shouldClearResolver() const;
void resolverChanged(StyleResolverUpdateMode);
@@ -312,6 +318,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