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

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

Issue 1193203003: Keep effectiveZoom finite (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Reduced clamp range; Remove clamp in CSSToLength... Created 5 years, 6 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 | « LayoutTests/svg/zoom/large-zoom-crash-expected.txt ('k') | Source/core/style/ComputedStyle.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSToLengthConversionData.h
diff --git a/Source/core/css/CSSToLengthConversionData.h b/Source/core/css/CSSToLengthConversionData.h
index c2ee15e1a4d889db54c5190cda2354bfb0fea3b0..e60408130b9b7cb95e8a0038ebaf682cd40d6a27 100644
--- a/Source/core/css/CSSToLengthConversionData.h
+++ b/Source/core/css/CSSToLengthConversionData.h
@@ -92,7 +92,11 @@ public:
double viewportMaxPercent() const;
void setFontSizes(const FontSizes& fontSizes) { m_fontSizes = fontSizes; }
- void setZoom(float zoom) { m_zoom = clampTo<float>(zoom, std::numeric_limits<float>::denorm_min()); }
+ void setZoom(float zoom)
+ {
+ ASSERT(std::isfinite(zoom) && zoom > 0);
+ m_zoom = zoom;
+ }
CSSToLengthConversionData copyWithAdjustedZoom(float newZoom) const
{
« no previous file with comments | « LayoutTests/svg/zoom/large-zoom-crash-expected.txt ('k') | Source/core/style/ComputedStyle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698