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

Unified Diff: third_party/WebKit/Source/core/css/parser/SizesAttributeParser.cpp

Issue 2596203002: Return sizes' default effective size as float (Closed)
Patch Set: Created 4 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/parser/SizesAttributeParser.cpp
diff --git a/third_party/WebKit/Source/core/css/parser/SizesAttributeParser.cpp b/third_party/WebKit/Source/core/css/parser/SizesAttributeParser.cpp
index 375a0cc9918b2ded2399b7f64da88600c60312d3..3709e4a2028f44986229e34fc2f2a98a5c3fc5dc 100644
--- a/third_party/WebKit/Source/core/css/parser/SizesAttributeParser.cpp
+++ b/third_party/WebKit/Source/core/css/parser/SizesAttributeParser.cpp
@@ -97,9 +97,9 @@ float SizesAttributeParser::effectiveSize() {
return effectiveSizeDefaultValue();
}
-unsigned SizesAttributeParser::effectiveSizeDefaultValue() {
+float SizesAttributeParser::effectiveSizeDefaultValue() {
// Returning the equivalent of "100vw"
- return m_mediaValues->viewportWidth();
+ return clampTo<float>(m_mediaValues->viewportWidth());
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698