| Index: third_party/WebKit/Source/core/frame/VisualViewport.cpp
|
| diff --git a/third_party/WebKit/Source/core/frame/VisualViewport.cpp b/third_party/WebKit/Source/core/frame/VisualViewport.cpp
|
| index 38b97c84f41a28cb13eedfd8e750a48d5448664e..bf826822192c6482d76f696207df09f4b4c269ec 100644
|
| --- a/third_party/WebKit/Source/core/frame/VisualViewport.cpp
|
| +++ b/third_party/WebKit/Source/core/frame/VisualViewport.cpp
|
| @@ -250,6 +250,8 @@ bool VisualViewport::didSetScaleOrLocation(float scale,
|
|
|
| bool valuesChanged = false;
|
|
|
| + CHECK(!std::isnan(scale));
|
| + CHECK(std::isfinite(scale));
|
| if (scale != m_scale) {
|
| m_scale = scale;
|
| valuesChanged = true;
|
| @@ -259,6 +261,10 @@ bool VisualViewport::didSetScaleOrLocation(float scale,
|
|
|
| ScrollOffset clampedOffset = clampScrollOffset(toScrollOffset(location));
|
|
|
| + CHECK(!std::isnan(clampedOffset.width()) &&
|
| + !std::isnan(clampedOffset.height()));
|
| + CHECK(std::isfinite(clampedOffset.width()) &&
|
| + std::isfinite(clampedOffset.height()));
|
| if (clampedOffset != m_offset) {
|
| m_offset = clampedOffset;
|
| scrollAnimator().setCurrentOffset(m_offset);
|
|
|