Chromium Code Reviews| Index: Source/web/WebViewImpl.cpp |
| diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp |
| index 9989bd90b968a20702135c267f2ba8e00add46d7..94e3434810371ef58a0b7c78012558d37ff8d22d 100644 |
| --- a/Source/web/WebViewImpl.cpp |
| +++ b/Source/web/WebViewImpl.cpp |
| @@ -379,6 +379,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client) |
| , m_editorClientImpl(this) |
| , m_inspectorClientImpl(this) |
| , m_backForwardClientImpl(this) |
| + , m_forceFixedLayoutSizeToEqualSize(false) |
| , m_shouldAutoResize(false) |
| , m_observedNewNavigation(false) |
| #ifndef NDEBUG |
| @@ -3009,7 +3010,8 @@ void WebViewImpl::updatePageDefinedPageScaleConstraints(const ViewportArguments& |
| if (page()->settings().textAutosizingEnabled() && page()->mainFrame() && layoutSize.width != fixedLayoutSize().width) |
| page()->mainFrame()->document()->textAutosizer()->recalculateMultipliers(); |
| - setFixedLayoutSize(layoutSize); |
| + if (!m_shouldAutoResize) |
| + setFixedLayoutSize(layoutSize); |
| } |
| IntSize WebViewImpl::contentsSize() const |
| @@ -3101,7 +3103,16 @@ void WebViewImpl::setFixedLayoutSize(const WebSize& layoutSize) |
| if (!frame || !frame->view()) |
| return; |
| - frame->view()->setFixedLayoutSize(layoutSize); |
| + if (m_forceFixedLayoutSizeToEqualSize) |
| + frame->view()->setFixedLayoutSize(m_size); |
| + else |
| + frame->view()->setFixedLayoutSize(layoutSize); |
| + |
| +} |
| + |
| +void WebViewImpl::setForceFixedLayoutSizeToEqualSize(bool value) |
| +{ |
| + m_forceFixedLayoutSizeToEqualSize = value; |
| } |
| void WebViewImpl::performMediaPlayerAction(const WebMediaPlayerAction& action, |
| @@ -3651,7 +3662,8 @@ void WebViewImpl::layoutUpdated(WebFrameImpl* webframe) |
| WebSize frameSize = mainFrameImpl()->frame()->view()->frameRect().size(); |
| if (frameSize != m_size) { |
| m_size = frameSize; |
| - m_client->didAutoResize(m_size); |
| + if (!m_forceFixedLayoutSizeToEqualSize) |
|
mkosiba (inactive)
2013/08/30 18:25:09
the reason for this is that it causes RenderWidget
aelias_OOO_until_Jul13
2013/08/31 03:45:04
Could you explain why that's wrong? Is it because
mkosiba (inactive)
2013/09/02 11:28:58
Page scale mostly. My concern is that this ends up
|
| + m_client->didAutoResize(m_size); |
| sendResizeEventAndRepaint(); |
| } |
| } |