| 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 5f61223528a847ff9b6a4834cd76ab341e7c3f3a..a254102a7262b58128ce0b9d5e2704c89fbb50b2 100644
|
| --- a/third_party/WebKit/Source/core/frame/VisualViewport.cpp
|
| +++ b/third_party/WebKit/Source/core/frame/VisualViewport.cpp
|
| @@ -89,15 +89,11 @@ DEFINE_TRACE(VisualViewport)
|
|
|
| void VisualViewport::setSize(const IntSize& size)
|
| {
|
| - // When the main frame is remote, we won't have an associated frame.
|
| - if (!mainFrame())
|
| - return;
|
| -
|
| if (m_size == size)
|
| return;
|
|
|
| - bool autosizerNeedsUpdating =
|
| - (size.width() != m_size.width())
|
| + bool autosizerNeedsUpdating = (size.width() != m_size.width())
|
| + && mainFrame()
|
| && mainFrame()->settings()
|
| && mainFrame()->settings()->textAutosizingEnabled();
|
|
|
| @@ -194,9 +190,6 @@ void VisualViewport::setScale(float scale)
|
|
|
| void VisualViewport::setScaleAndLocation(float scale, const FloatPoint& location)
|
| {
|
| - if (!mainFrame())
|
| - return;
|
| -
|
| bool valuesChanged = false;
|
|
|
| if (scale != m_scale) {
|
| @@ -205,6 +198,9 @@ void VisualViewport::setScaleAndLocation(float scale, const FloatPoint& location
|
| frameHost().chromeClient().pageScaleFactorChanged();
|
| }
|
|
|
| + if (!mainFrame())
|
| + return;
|
| +
|
| FloatPoint clampedOffset(clampOffsetToBoundaries(location));
|
|
|
| if (clampedOffset != m_offset) {
|
|
|