Fix float-cast overflow in SVGNumberInterpolationType
InterpolableNumber can represent doubles, but SVGNumber can only represent floats. Previously this conversion was implicit and resulted in +/- inf for non-representable doubles; this CL makes it explicit and clamps the result to max/min float instead. Clamping rather than infinity was chosen arbitrarily just based on existing WTF math helpers; it is unlikely that it results in much visual difference (since max-float is a very big number already...). Bug: 961859 Change-Id: I675471c552b2bd0419698a64d3a1c68c66d8a3ab Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1610465 Commit-Queue: Stephen McGruer <smcgruer@chromium.org> Reviewed-by:Xida Chen <xidachen@chromium.org> Cr-Commit-Position: refs/heads/master@{#659198}
Showing
Please register or sign in to comment