Chromium Code Reviews| Index: third_party/WebKit/Source/core/frame/FrameView.cpp |
| diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp |
| index f881a6042a874b94b9ee6295408a6c25b0d0dcb8..a2c059e2e82c11a9a6e99961a5865a063e474960 100644 |
| --- a/third_party/WebKit/Source/core/frame/FrameView.cpp |
| +++ b/third_party/WebKit/Source/core/frame/FrameView.cpp |
| @@ -161,6 +161,7 @@ FrameView::FrameView(LocalFrame* frame) |
| , m_isUpdatingAllLifecyclePhases(false) |
| , m_scrollAnchor(this) |
| , m_needsScrollbarsUpdate(false) |
| + , m_suppressAdjustViewSize(false) |
| { |
| ASSERT(m_frame); |
| init(); |
| @@ -531,6 +532,9 @@ void FrameView::setContentsSize(const IntSize& size) |
| void FrameView::adjustViewSize() |
| { |
| + if (m_suppressAdjustViewSize) |
| + return; |
| + |
| LayoutViewItem layoutViewItem = this->layoutViewItem(); |
| if (layoutViewItem.isNull()) |
| return; |
| @@ -1039,8 +1043,13 @@ void FrameView::layout() |
| ASSERT(m_layoutSubtreeRootList.isEmpty()); |
| } // Reset m_layoutSchedulingEnabled to its previous value. |
| - if (!inSubtreeLayout && !document->printing()) |
| + if (!inSubtreeLayout && !document->printing()) { |
| adjustViewSize(); |
| + if (needsLayout()) { |
| + TemporaryChange<bool> suppressAdjustViewSize(m_suppressAdjustViewSize, true); |
|
chrishtr
2016/05/31 19:58:15
WebViewImpl::layoutUpdated will do this layout alr
Xianzhu
2016/05/31 20:22:54
I'm using the case in crbug.com/611290. On m51, it
chrishtr
2016/05/31 20:31:38
Ok then it appears we need a more general version
Xianzhu
2016/05/31 20:54:27
I would like to investigate this but the change wo
|
| + layout(); |
|
chrishtr
2016/05/31 20:31:38
Does it make more sense to push this down into adj
Xianzhu
2016/05/31 20:54:27
This applies to the call site in FrameView::forceL
|
| + } |
| + } |
| m_frameTimingRequestsDirty = true; |