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) |