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

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

Issue 1496683002: Avoid rounding down viewport dimensions in Media Queries (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved to double Created 5 years 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
« no previous file with comments | « third_party/WebKit/Source/core/css/MediaValuesDynamic.h ('k') | no next file » | 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/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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 calculateViewportWidth(m_frame), 55 calculateViewportWidth(m_frame),
56 calculateViewportHeight(m_frame), 56 calculateViewportHeight(m_frame),
57 result); 57 result);
58 } 58 }
59 59
60 bool MediaValuesDynamic::isSafeToSendToAnotherThread() const 60 bool MediaValuesDynamic::isSafeToSendToAnotherThread() const
61 { 61 {
62 return false; 62 return false;
63 } 63 }
64 64
65 int MediaValuesDynamic::viewportWidth() const 65 double MediaValuesDynamic::viewportWidth() const
66 { 66 {
67 return calculateViewportWidth(m_frame); 67 return calculateViewportWidth(m_frame);
68 } 68 }
69 69
70 int MediaValuesDynamic::viewportHeight() const 70 double MediaValuesDynamic::viewportHeight() const
71 { 71 {
72 return calculateViewportHeight(m_frame); 72 return calculateViewportHeight(m_frame);
73 } 73 }
74 74
75 int MediaValuesDynamic::deviceWidth() const 75 int MediaValuesDynamic::deviceWidth() const
76 { 76 {
77 return calculateDeviceWidth(m_frame); 77 return calculateDeviceWidth(m_frame);
78 } 78 }
79 79
80 int MediaValuesDynamic::deviceHeight() const 80 int MediaValuesDynamic::deviceHeight() const
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 return m_frame; 147 return m_frame;
148 } 148 }
149 149
150 DEFINE_TRACE(MediaValuesDynamic) 150 DEFINE_TRACE(MediaValuesDynamic)
151 { 151 {
152 visitor->trace(m_frame); 152 visitor->trace(m_frame);
153 MediaValues::trace(visitor); 153 MediaValues::trace(visitor);
154 } 154 }
155 155
156 } // namespace 156 } // namespace
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/MediaValuesDynamic.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698