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

Unified Diff: Source/core/css/CSSToLengthConversionData.cpp

Issue 871913003: Clamp 'zoom' in CSSToLengthConversionData. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Also clamp setZoom. Created 5 years, 11 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 | « Source/core/css/CSSToLengthConversionData.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSToLengthConversionData.cpp
diff --git a/Source/core/css/CSSToLengthConversionData.cpp b/Source/core/css/CSSToLengthConversionData.cpp
index 2e97cb814f3669646715e8894d83a4b31483e9a5..43f836cfa65036a66970ea59d0adba1af24c8972 100644
--- a/Source/core/css/CSSToLengthConversionData.cpp
+++ b/Source/core/css/CSSToLengthConversionData.cpp
@@ -77,10 +77,9 @@ CSSToLengthConversionData::CSSToLengthConversionData(const RenderStyle* style, c
: m_style(style)
, m_fontSizes(fontSizes)
, m_viewportSize(viewportSize)
- , m_zoom(zoom)
+ , m_zoom(clampTo<float>(zoom, std::numeric_limits<float>::denorm_min()))
{
ASSERT(m_style);
- ASSERT(zoom > 0);
}
CSSToLengthConversionData::CSSToLengthConversionData(const RenderStyle* style, const RenderStyle* rootStyle, const RenderView* renderView, float zoom)
« no previous file with comments | « Source/core/css/CSSToLengthConversionData.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698