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

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

Issue 853483003: Add support for 'display-mode' MQ defined in Manifest spec (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 5 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/css/MediaValuesCached.h ('k') | Source/core/css/MediaValuesDynamic.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/MediaValuesCached.h" 6 #include "core/css/MediaValuesCached.h"
7 7
8 #include "core/css/CSSPrimitiveValue.h" 8 #include "core/css/CSSPrimitiveValue.h"
9 #include "core/dom/Document.h" 9 #include "core/dom/Document.h"
10 #include "core/frame/LocalFrame.h" 10 #include "core/frame/LocalFrame.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 m_data.devicePixelRatio = calculateDevicePixelRatio(frame); 54 m_data.devicePixelRatio = calculateDevicePixelRatio(frame);
55 m_data.colorBitsPerComponent = calculateColorBitsPerComponent(frame); 55 m_data.colorBitsPerComponent = calculateColorBitsPerComponent(frame);
56 m_data.monochromeBitsPerComponent = calculateMonochromeBitsPerComponent(fram e); 56 m_data.monochromeBitsPerComponent = calculateMonochromeBitsPerComponent(fram e);
57 m_data.primaryPointerType = calculatePrimaryPointerType(frame); 57 m_data.primaryPointerType = calculatePrimaryPointerType(frame);
58 m_data.availablePointerTypes = calculateAvailablePointerTypes(frame); 58 m_data.availablePointerTypes = calculateAvailablePointerTypes(frame);
59 m_data.primaryHoverType = calculatePrimaryHoverType(frame); 59 m_data.primaryHoverType = calculatePrimaryHoverType(frame);
60 m_data.availableHoverTypes = calculateAvailableHoverTypes(frame); 60 m_data.availableHoverTypes = calculateAvailableHoverTypes(frame);
61 m_data.defaultFontSize = calculateDefaultFontSize(frame); 61 m_data.defaultFontSize = calculateDefaultFontSize(frame);
62 m_data.threeDEnabled = calculateThreeDEnabled(frame); 62 m_data.threeDEnabled = calculateThreeDEnabled(frame);
63 m_data.strictMode = calculateStrictMode(frame); 63 m_data.strictMode = calculateStrictMode(frame);
64 m_data.displayMode = calculateDisplayMode(frame);
64 const String mediaType = calculateMediaType(frame); 65 const String mediaType = calculateMediaType(frame);
65 if (!mediaType.isEmpty()) 66 if (!mediaType.isEmpty())
66 m_data.mediaType = mediaType.isolatedCopy(); 67 m_data.mediaType = mediaType.isolatedCopy();
67 } 68 }
68 69
69 MediaValuesCached::MediaValuesCached(const MediaValuesCachedData& data) 70 MediaValuesCached::MediaValuesCached(const MediaValuesCachedData& data)
70 : m_data(data) 71 : m_data(data)
71 { 72 {
72 } 73 }
73 74
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 149
149 bool MediaValuesCached::threeDEnabled() const 150 bool MediaValuesCached::threeDEnabled() const
150 { 151 {
151 return m_data.threeDEnabled; 152 return m_data.threeDEnabled;
152 } 153 }
153 154
154 bool MediaValuesCached::strictMode() const 155 bool MediaValuesCached::strictMode() const
155 { 156 {
156 return m_data.strictMode; 157 return m_data.strictMode;
157 } 158 }
159
158 const String MediaValuesCached::mediaType() const 160 const String MediaValuesCached::mediaType() const
159 { 161 {
160 return m_data.mediaType; 162 return m_data.mediaType;
161 } 163 }
162 164
165 DisplayMode MediaValuesCached::displayMode() const
166 {
167 return m_data.displayMode;
168 }
169
163 Document* MediaValuesCached::document() const 170 Document* MediaValuesCached::document() const
164 { 171 {
165 return 0; 172 return 0;
166 } 173 }
167 174
168 bool MediaValuesCached::hasValues() const 175 bool MediaValuesCached::hasValues() const
169 { 176 {
170 return true; 177 return true;
171 } 178 }
172 179
173 } // namespace 180 } // namespace
OLDNEW
« no previous file with comments | « Source/core/css/MediaValuesCached.h ('k') | Source/core/css/MediaValuesDynamic.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698