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

Unified Diff: third_party/WebKit/Source/core/css/MediaQueryEvaluator.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 side-by-side diff with in-line comments
Download patch
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 b2c7a684f433a72935a52ae22421604a84b378eb..161fece95aab49a03b1256202ad038728043f26f 100644
--- a/third_party/WebKit/Source/core/css/MediaQueryEvaluator.cpp
+++ b/third_party/WebKit/Source/core/css/MediaQueryEvaluator.cpp
@@ -393,7 +393,7 @@ static bool deviceWidthMediaFeatureEval(const MediaQueryExpValue& value, MediaFe
static bool heightMediaFeatureEval(const MediaQueryExpValue& value, MediaFeaturePrefix op, const MediaValues& mediaValues)
{
- int height = mediaValues.viewportHeight();
+ double height = mediaValues.viewportHeight();
if (value.isValid())
return computeLengthAndCompare(value, op, mediaValues, height);
@@ -402,7 +402,7 @@ static bool heightMediaFeatureEval(const MediaQueryExpValue& value, MediaFeature
static bool widthMediaFeatureEval(const MediaQueryExpValue& value, MediaFeaturePrefix op, const MediaValues& mediaValues)
{
- int width = mediaValues.viewportWidth();
+ double width = mediaValues.viewportWidth();
if (value.isValid())
return computeLengthAndCompare(value, op, mediaValues, width);

Powered by Google App Engine
This is Rietveld 408576698