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; |