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

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

Issue 644813005: Floating point MQs should not match. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added max/min tests Created 6 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 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 29 matching lines...) Expand all
40 bool MediaValuesDynamic::computeLength(double value, CSSPrimitiveValue::UnitType type, int& result) const 40 bool MediaValuesDynamic::computeLength(double value, CSSPrimitiveValue::UnitType type, int& result) const
41 { 41 {
42 return MediaValues::computeLength(value, 42 return MediaValues::computeLength(value,
43 type, 43 type,
44 calculateDefaultFontSize(m_frame), 44 calculateDefaultFontSize(m_frame),
45 calculateViewportWidth(m_frame), 45 calculateViewportWidth(m_frame),
46 calculateViewportHeight(m_frame), 46 calculateViewportHeight(m_frame),
47 result); 47 result);
48 } 48 }
49 49
50 bool MediaValuesDynamic::computeLength(double value, CSSPrimitiveValue::UnitType type, double& result) const 50 bool MediaValuesDynamic::computeLength(double value, CSSPrimitiveValue::UnitType type, float& result) const
51 { 51 {
52 return MediaValues::computeLength(value, 52 return MediaValues::computeLength(value,
53 type, 53 type,
54 calculateDefaultFontSize(m_frame), 54 calculateDefaultFontSize(m_frame),
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
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 { 136 {
137 return m_frame->document(); 137 return m_frame->document();
138 } 138 }
139 139
140 bool MediaValuesDynamic::hasValues() const 140 bool MediaValuesDynamic::hasValues() const
141 { 141 {
142 return m_frame; 142 return m_frame;
143 } 143 }
144 144
145 } // namespace 145 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698