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

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: 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/MediaValuesCached.h
diff --git a/third_party/WebKit/Source/core/css/MediaValuesCached.h b/third_party/WebKit/Source/core/css/MediaValuesCached.h
index 5f5331e472f0ecccd6e037493c969c0567ef598a..3bd3f62723430507e709ab147feae43504c1bb7b 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;
+ double viewportWidth;
+ double 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;
+ double viewportWidth() const override;
+ double 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(double);
+ void setViewportHeight(double);
bool isCached() const override { return true; }
protected:
« no previous file with comments | « third_party/WebKit/Source/core/css/MediaValues.cpp ('k') | third_party/WebKit/Source/core/css/MediaValuesCached.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698