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

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

Issue 190973007: Reland "Avoid layout/full-repaint on view height change if possible" (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: New CL Created 6 years, 9 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: Source/core/frame/FrameView.cpp
diff --git a/Source/core/frame/FrameView.cpp b/Source/core/frame/FrameView.cpp
index b2cb7359a68f53b55c55af84554c523b8af8c1e1..8d4e37669beac2a7711e85963dd0223d54e88026 100644
--- a/Source/core/frame/FrameView.cpp
+++ b/Source/core/frame/FrameView.cpp
@@ -3180,7 +3180,22 @@ void FrameView::setLayoutSizeInternal(const IntSize& size)
return;
m_layoutSize = size;
- contentsResized();
+
+ // Update scrollbars. Not calling this->contentsResized() to avoid setNeedsLayout.
+ ScrollView::contentsResized();
+
+ if (RenderView* renderView = this->renderView()) {
+ renderView->viewResized();
+ // If selfNeedsLayout, the next layout will do all the things required on layoutSize change.
+ // Otherwise we need to perform the post-layout tasks now.
+ if (!renderView->selfNeedsLayout()) {
+ // Call scheduleOrPerformPostLayoutTasks() instead of synchronized sendResizeEventIfNeeded()
+ // to avoid hang with resize events in seamless frames.
esprehn 2014/03/10 21:32:30 We don't even have seamless anymore. This code see
Xianzhu 2014/03/11 00:55:13 Good news. Removed the comment. Changed the code
+ scheduleOrPerformPostLayoutTasks();
+ if (frame().page())
+ frame().page()->chrome().client().layoutUpdated(m_frame.get());
+ }
+ }
}
void FrameView::didAddScrollbar(Scrollbar* scrollbar, ScrollbarOrientation orientation)

Powered by Google App Engine
This is Rietveld 408576698