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

Side by Side Diff: Source/core/css/MediaValuesDynamic.cpp

Issue 335313003: MediaQueryEvaluator getting mediaType from MediaValues (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed a bug and added tests Created 6 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "core/css/MediaValuesDynamic.h" 6 #include "core/css/MediaValuesDynamic.h"
7 7
8 #include "core/css/CSSHelper.h" 8 #include "core/css/CSSHelper.h"
9 #include "core/css/CSSPrimitiveValue.h" 9 #include "core/css/CSSPrimitiveValue.h"
10 #include "core/css/CSSToLengthConversionData.h" 10 #include "core/css/CSSToLengthConversionData.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 MediaValues::PointerDeviceType MediaValuesDynamic::pointer() const 91 MediaValues::PointerDeviceType MediaValuesDynamic::pointer() const
92 { 92 {
93 return calculateLeastCapablePrimaryPointerDeviceType(m_frame); 93 return calculateLeastCapablePrimaryPointerDeviceType(m_frame);
94 } 94 }
95 95
96 bool MediaValuesDynamic::threeDEnabled() const 96 bool MediaValuesDynamic::threeDEnabled() const
97 { 97 {
98 return calculateThreeDEnabled(m_frame); 98 return calculateThreeDEnabled(m_frame);
99 } 99 }
100 100
101 bool MediaValuesDynamic::scanMediaType() const 101 const String MediaValuesDynamic::mediaType() const
102 { 102 {
103 return calculateScanMediaType(m_frame); 103 return calculateMediaType(m_frame);
104 }
105
106 bool MediaValuesDynamic::screenMediaType() const
107 {
108 return calculateScreenMediaType(m_frame);
109 }
110
111 bool MediaValuesDynamic::printMediaType() const
112 {
113 return calculatePrintMediaType(m_frame);
114 } 104 }
115 105
116 bool MediaValuesDynamic::strictMode() const 106 bool MediaValuesDynamic::strictMode() const
117 { 107 {
118 return calculateStrictMode(m_frame); 108 return calculateStrictMode(m_frame);
119 } 109 }
120 110
121 Document* MediaValuesDynamic::document() const 111 Document* MediaValuesDynamic::document() const
122 { 112 {
123 return m_frame->document(); 113 return m_frame->document();
124 } 114 }
125 115
126 bool MediaValuesDynamic::hasValues() const 116 bool MediaValuesDynamic::hasValues() const
127 { 117 {
128 return m_frame; 118 return m_frame;
129 } 119 }
130 120
131 } // namespace 121 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698