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

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

Issue 2188483004: Remove extraneous frameView->setNeedsLayout() in LayoutPart (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove bogus test Created 4 years, 5 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
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 3fa8e63c185b071c4f343796b89e2d2f3ac3c1be..8bba825233e2737d4f6b71bb0b7b4327a8390aea 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -166,7 +166,6 @@ FrameView::FrameView(LocalFrame* frame)
, m_crossOriginForThrottling(false)
, m_subtreeThrottled(false)
, m_currentUpdateLifecyclePhasesTargetState(DocumentLifecycle::Uninitialized)
- , m_needsScrollbarsUpdate(false)
, m_suppressAdjustViewSize(false)
, m_allowsLayoutInvalidationAfterLayoutClean(true)
{
@@ -398,34 +397,29 @@ void FrameView::setFrameRect(const IntRect& newRect)
return;
Widget::setFrameRect(newRect);
+ frameRectsChanged();
- const bool frameSizeChanged = oldRect.size() != newRect.size();
+ if (oldRect.size() == newRect.size())
+ return;
- m_needsScrollbarsUpdate = frameSizeChanged;
// TODO(wjmaclean): find out why scrollbars fail to resize for complex
// subframes after changing the zoom level. For now always calling
// updateScrollbarsIfNeeded() here fixes the issue, but it would be good to
// discover the deeper cause of this. http://crbug.com/607987.
- updateScrollbarsIfNeeded();
-
- frameRectsChanged();
+ updateScrollbars();
updateScrollableAreaSet();
if (LayoutViewItem layoutView = this->layoutViewItem()) {
- // TODO(majidvp): It seems that this only needs to be called when size
- // is updated ignoring any change in the location.
if (layoutView.usesCompositing())
layoutView.compositor()->frameViewDidChangeSize();
}
- if (frameSizeChanged) {
- viewportSizeChanged(newRect.width() != oldRect.width(), newRect.height() != oldRect.height());
+ viewportSizeChanged(newRect.width() != oldRect.width(), newRect.height() != oldRect.height());
- if (m_frame->isMainFrame())
- m_frame->host()->visualViewport().mainFrameDidChangeSize();
- frame().loader().restoreScrollPositionAndViewState();
- }
+ if (m_frame->isMainFrame())
+ m_frame->host()->visualViewport().mainFrameDidChangeSize();
+ frame().loader().restoreScrollPositionAndViewState();
}
Page* FrameView::page() const
@@ -3596,14 +3590,12 @@ bool FrameView::shouldIgnoreOverflowHidden() const
void FrameView::updateScrollbarsIfNeeded()
{
- if (m_needsScrollbarsUpdate || needsScrollbarReconstruction() || scrollOriginChanged())
+ if (needsScrollbarReconstruction() || scrollOriginChanged())
updateScrollbars();
}
void FrameView::updateScrollbars()
{
- m_needsScrollbarsUpdate = false;
-
if (m_frame->settings() && m_frame->settings()->rootLayerScrolls())
return;

Powered by Google App Engine
This is Rietveld 408576698