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

Unified Diff: third_party/WebKit/Source/core/css/resolver/ViewportStyleResolver.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/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 6af05ee6565b0a6b5402575d976850f362c8116c..d07be56852a1055ea3f8a47d413b0f2668219efb 100644
--- a/third_party/WebKit/Source/core/css/resolver/ViewportStyleResolver.h
+++ b/third_party/WebKit/Source/core/css/resolver/ViewportStyleResolver.h
@@ -32,6 +32,7 @@
#include "core/CSSPropertyNames.h"
#include "core/CoreExport.h"
+#include "core/css/MediaQueryEvaluator.h"
#include "core/css/RuleSet.h"
#include "platform/Length.h"
@@ -48,25 +49,33 @@ class CORE_EXPORT ViewportStyleResolver
return new ViewportStyleResolver(document);
}
- enum Origin { UserAgentOrigin, AuthorOrigin };
-
- void collectViewportRules();
- void collectViewportRules(RuleSet*, Origin);
+ void reset();
+ void collectViewportRulesFromUASheets();
+ void collectViewportRulesFromAuthorSheet(const CSSStyleSheet&);
void resolve();
+ bool isAffectedByInitialViewportChange();
DECLARE_TRACE();
private:
explicit ViewportStyleResolver(Document*);
- void addViewportRule(StyleRuleViewport*, Origin);
+ enum Origin { UserAgentOrigin, AuthorOrigin };
+
+ void collectViewportChildRules(const HeapVector<Member<StyleRuleBase>>&,
+ Origin);
+ void addViewportRule(StyleRuleViewport&, Origin);
float viewportArgumentValue(CSSPropertyID) const;
- Length viewportLengthValue(CSSPropertyID) const;
+ Length viewportLengthValue(CSSPropertyID);
Member<Document> m_document;
Member<MutableStylePropertySet> m_propertySet;
- bool m_hasAuthorStyle;
+ Member<MediaQueryEvaluator> m_initialViewportMedium;
+ MediaQueryResultList m_viewportDependentMediaQueryResults;
+ MediaQueryResultList m_deviceDependentMediaQueryResults;
+ bool m_hasAuthorStyle = false;
+ bool m_hasViewportUnits = false;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698