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

Unified Diff: third_party/WebKit/Source/core/css/resolver/ViewportStyleResolver.h

Issue 2424823002: Implement collection of @viewport rules from DocumentStyleCollection. (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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/resolver/ViewportStyleResolver.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/css/resolver/ViewportStyleResolver.h
diff --git a/third_party/WebKit/Source/core/css/resolver/ViewportStyleResolver.h b/third_party/WebKit/Source/core/css/resolver/ViewportStyleResolver.h
index 913bbc2c660c328050ca9b68cfffec8cb8d4b099..4261e1bb7dba0a252de82208838b21c0753b623e 100644
--- a/third_party/WebKit/Source/core/css/resolver/ViewportStyleResolver.h
+++ b/third_party/WebKit/Source/core/css/resolver/ViewportStyleResolver.h
@@ -38,6 +38,7 @@
namespace blink {
class Document;
+class DocumentStyleSheetCollection;
class MutableStylePropertySet;
class StyleRuleViewport;
@@ -48,29 +49,45 @@ class CORE_EXPORT ViewportStyleResolver
return new ViewportStyleResolver(document);
}
+ void initialViewportChanged();
+ void setNeedsCollectRules();
+ void updateViewport(DocumentStyleSheetCollection&);
+
+ void collectViewportRulesFromAuthorSheet(const CSSStyleSheet&);
+
enum Origin { UserAgentOrigin, AuthorOrigin };
void collectViewportRules();
void collectViewportRules(RuleSet*, Origin);
- void resolve();
DECLARE_TRACE();
private:
explicit ViewportStyleResolver(Document&);
+ void reset();
+ void resolve();
+
+ enum UpdateType { NoUpdate, Resolve, CollectRules };
+
void collectViewportRulesFromUASheets();
void collectViewportChildRules(const HeapVector<Member<StyleRuleBase>>&,
Origin);
+ void collectViewportRulesFromImports(StyleSheetContents&);
+ void collectViewportRulesFromAuthorSheetContents(StyleSheetContents&);
void addViewportRule(StyleRuleViewport&, Origin);
float viewportArgumentValue(CSSPropertyID) const;
- Length viewportLengthValue(CSSPropertyID) const;
+ Length viewportLengthValue(CSSPropertyID);
Member<Document> m_document;
Member<MutableStylePropertySet> m_propertySet;
Member<MediaQueryEvaluator> m_initialViewportMedium;
- bool m_hasAuthorStyle;
+ MediaQueryResultList m_viewportDependentMediaQueryResults;
+ MediaQueryResultList m_deviceDependentMediaQueryResults;
+ bool m_hasAuthorStyle = false;
+ bool m_hasViewportUnits = false;
+ UpdateType m_needsUpdate = CollectRules;
};
} // namespace blink
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/resolver/ViewportStyleResolver.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698