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

Unified Diff: third_party/WebKit/Source/core/css/CSSStyleSheet.cpp

Issue 2528633003: Move MediaQueryResults to RuleFeatureSet. (Closed)
Patch Set: Removed members. Created 4 years, 1 month 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/CSSStyleSheet.cpp
diff --git a/third_party/WebKit/Source/core/css/CSSStyleSheet.cpp b/third_party/WebKit/Source/core/css/CSSStyleSheet.cpp
index 9c42a7fd73527b5f3baee17b206c8704c0afef3a..ea4afe751587a5f1edde4118522c55f90b56c027 100644
--- a/third_party/WebKit/Source/core/css/CSSStyleSheet.cpp
+++ b/third_party/WebKit/Source/core/css/CSSStyleSheet.cpp
@@ -197,6 +197,16 @@ void CSSStyleSheet::setMediaQueries(MediaQuerySet* mediaQueries) {
m_mediaCSSOMWrapper->reattach(m_mediaQueries.get());
}
+bool CSSStyleSheet::matchesMediaQueries(const MediaQueryEvaluator& evaluator) {
+ m_viewportDependentMediaQueryResults.clear();
+ m_deviceDependentMediaQueryResults.clear();
+
+ if (!m_mediaQueries)
+ return true;
+ return evaluator.eval(m_mediaQueries, &m_viewportDependentMediaQueryResults,
+ &m_deviceDependentMediaQueryResults);
+}
+
unsigned CSSStyleSheet::length() const {
return m_contents->ruleCount();
}
@@ -424,6 +434,8 @@ void CSSStyleSheet::setText(const String& text) {
DEFINE_TRACE(CSSStyleSheet) {
visitor->trace(m_contents);
visitor->trace(m_mediaQueries);
+ visitor->trace(m_viewportDependentMediaQueryResults);
+ visitor->trace(m_deviceDependentMediaQueryResults);
visitor->trace(m_ownerNode);
visitor->trace(m_ownerRule);
visitor->trace(m_mediaCSSOMWrapper);
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSStyleSheet.h ('k') | third_party/WebKit/Source/core/css/RuleFeature.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698