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

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

Issue 2836613002: Better overflow handling for aspect-ratio MQ. (Closed)
Patch Set: Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/css/MediaQueryEvaluatorTest.cpp ('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/MediaQueryExp.cpp
diff --git a/third_party/WebKit/Source/core/css/MediaQueryExp.cpp b/third_party/WebKit/Source/core/css/MediaQueryExp.cpp
index b97736c12ce4037289bb57605c11e3bc8ced42c2..a43c9830e2284d9ad2882deed98be6758081e660 100644
--- a/third_party/WebKit/Source/core/css/MediaQueryExp.cpp
+++ b/third_party/WebKit/Source/core/css/MediaQueryExp.cpp
@@ -284,8 +284,8 @@ MediaQueryExp* MediaQueryExp::CreateIfValid(
denominator.GetNumericValueType() != kIntegerValueType)
return nullptr;
- exp_value.numerator = (unsigned)numerator.NumericValue();
- exp_value.denominator = (unsigned)denominator.NumericValue();
+ exp_value.numerator = clampTo<unsigned>(numerator.NumericValue());
+ exp_value.denominator = clampTo<unsigned>(denominator.NumericValue());
exp_value.is_ratio = true;
} else {
return nullptr;
« no previous file with comments | « third_party/WebKit/Source/core/css/MediaQueryEvaluatorTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698