| 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..a7494c8a0a77ceb71a90f493bb0923a49635f425 100644
|
| --- a/third_party/WebKit/Source/core/frame/VisualViewport.cpp
|
| +++ b/third_party/WebKit/Source/core/frame/VisualViewport.cpp
|
| @@ -89,19 +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())
|
| - && mainFrame()->settings()
|
| - && mainFrame()->settings()->textAutosizingEnabled();
|
| -
|
| TRACE_EVENT2("blink", "VisualViewport::setSize", "width", size.width(), "height", size.height());
|
| + bool widthDidChange = size.width() != m_size.width();
|
| m_size = size;
|
|
|
| if (m_innerViewportContainerLayer) {
|
| @@ -111,6 +103,13 @@ void VisualViewport::setSize(const IntSize& size)
|
| initializeScrollbars();
|
| }
|
|
|
| + if (!mainFrame())
|
| + return;
|
| +
|
| + bool autosizerNeedsUpdating = widthDidChange
|
| + && mainFrame()->settings()
|
| + && mainFrame()->settings()->textAutosizingEnabled();
|
| +
|
| if (autosizerNeedsUpdating) {
|
| // This needs to happen after setting the m_size member since it'll be read in the update call.
|
| if (TextAutosizer* textAutosizer = mainFrame()->document()->textAutosizer())
|
|
|