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

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

Issue 1474253002: Remove CSSPrimitiveValue::isDotsPer{Inch,Pixel,Centimeter} functions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSPrimitiveValue.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/css/MediaQueryEvaluator.cpp
diff --git a/third_party/WebKit/Source/core/css/MediaQueryEvaluator.cpp b/third_party/WebKit/Source/core/css/MediaQueryEvaluator.cpp
index d9a6db185134bde850ef0deb1d3d2e36bd580670..98118690a79eaae4698e9b488217ef495675d155 100644
--- a/third_party/WebKit/Source/core/css/MediaQueryEvaluator.cpp
+++ b/third_party/WebKit/Source/core/css/MediaQueryEvaluator.cpp
@@ -314,7 +314,7 @@ static bool evalResolution(const MediaQueryExpValue& value, MediaFeaturePrefix o
double canonicalFactor = CSSPrimitiveValue::conversionToCanonicalUnitsScaleFactor(value.unit);
double dppxFactor = CSSPrimitiveValue::conversionToCanonicalUnitsScaleFactor(CSSPrimitiveValue::UnitType::DotsPerPixel);
float valueInDppx = clampTo<float>(value.value * (canonicalFactor / dppxFactor));
- if (CSSPrimitiveValue::isDotsPerCentimeter(value.unit)) {
+ if (value.unit == CSSPrimitiveValue::UnitType::DotsPerCentimeter) {
// To match DPCM to DPPX values, we limit to 2 decimal points.
// The http://dev.w3.org/csswg/css3-values/#absolute-lengths recommends
// "that the pixel unit refer to the whole number of device pixels that best
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSPrimitiveValue.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698