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

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

Issue 99663004: Avoid layout/full-repaint on view height change if possible (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Avoid hang in seamless frames Created 6 years, 11 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 | « no previous file | Source/core/rendering/RenderBlock.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/FrameView.cpp
diff --git a/Source/core/frame/FrameView.cpp b/Source/core/frame/FrameView.cpp
index 0adb12f75ca370219354552de1723e37ad3088ae..98f27f50d2cc3b7ac6a62d282a42e5f7bad0d548 100644
--- a/Source/core/frame/FrameView.cpp
+++ b/Source/core/frame/FrameView.cpp
@@ -3492,7 +3492,20 @@ 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, resize event will be sent if needed during the next layout;
+ // otherwise we need to send the resize event now if needed.
+ if (!renderView->selfNeedsLayout()) {
+ // Call scheduleOrPerformPostLayoutTasks() instead of synchronized sendResizeEventIfNeeded()
+ // to avoid hang with resize events in seamless frames.
+ scheduleOrPerformPostLayoutTasks();
+ }
+ }
}
void FrameView::didAddScrollbar(Scrollbar* scrollbar, ScrollbarOrientation orientation)
« no previous file with comments | « no previous file | Source/core/rendering/RenderBlock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698