Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(155)

Unified Diff: third_party/WebKit/Source/core/frame/FrameView.cpp

Issue 2022013004: Relayout if FrameView::updateViewSize() set needsLayout (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameView.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameView.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698