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

Unified Diff: third_party/WebKit/Source/core/css/MediaValuesCached.h

Issue 1496683002: Avoid rounding down viewport dimensions in Media Queries (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix layout test 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/MediaValuesCached.h
diff --git a/third_party/WebKit/Source/core/css/MediaValuesCached.h b/third_party/WebKit/Source/core/css/MediaValuesCached.h
index 5f5331e472f0ecccd6e037493c969c0567ef598a..9bb71c7d4fbe3342c57b84ea8cc88971d5ed3fcd 100644
--- a/third_party/WebKit/Source/core/css/MediaValuesCached.h
+++ b/third_party/WebKit/Source/core/css/MediaValuesCached.h
@@ -15,8 +15,8 @@ public:
struct MediaValuesCachedData {
DISALLOW_NEW();
// Members variables must be thread safe, since they're copied to the parser thread
- int viewportWidth;
- int viewportHeight;
+ float viewportWidth;
+ float viewportHeight;
int deviceWidth;
int deviceHeight;
float devicePixelRatio;
@@ -61,8 +61,8 @@ public:
bool computeLength(double value, CSSPrimitiveValue::UnitType, int& result) const override;
bool computeLength(double value, CSSPrimitiveValue::UnitType, double& result) const override;
- int viewportWidth() const override;
- int viewportHeight() const override;
+ float viewportWidth() const override;
+ float viewportHeight() const override;
int deviceWidth() const override;
int deviceHeight() const override;
float devicePixelRatio() const override;
@@ -79,8 +79,8 @@ public:
const String mediaType() const override;
WebDisplayMode displayMode() const override;
- void setViewportWidth(int);
- void setViewportHeight(int);
+ void setViewportWidth(float);
+ void setViewportHeight(float);
bool isCached() const override { return true; }
protected:

Powered by Google App Engine
This is Rietveld 408576698