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

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: We have Document::hasViewportUnits() now Created 6 years, 12 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') | Source/web/tests/WebFrameTest.cpp » ('J')
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 8e541dbcf7876b8c1adc4bd5a113fcf1ad8646a8..e1a5d35000c76b03428c803414fd9e3a824f9d4a 100644
--- a/Source/core/frame/FrameView.cpp
+++ b/Source/core/frame/FrameView.cpp
@@ -3492,7 +3492,17 @@ 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())
+ sendResizeEventIfNeeded();
+ }
}
void FrameView::didAddScrollbar(Scrollbar* scrollbar, ScrollbarOrientation orientation)
« no previous file with comments | « no previous file | Source/core/rendering/RenderBlock.h » ('j') | Source/web/tests/WebFrameTest.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698