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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutView.cpp

Issue 2860433002: Update WebView/FrameView size from LayoutView::UpdateAfterLayout (Closed)
Patch Set: s/IsLocalRoot/IsMainFrame/ Created 3 years, 7 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/layout/LayoutView.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutView.cpp b/third_party/WebKit/Source/core/layout/LayoutView.cpp
index 288b0a55a2924a03b036725e52a5658020feb0bf..189402ebc688ce16aaf3f47477d3fbb75db4ad67 100644
--- a/third_party/WebKit/Source/core/layout/LayoutView.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutView.cpp
@@ -37,6 +37,7 @@
#include "core/layout/api/LayoutPartItem.h"
#include "core/layout/api/LayoutViewItem.h"
#include "core/layout/compositing/PaintLayerCompositor.h"
+#include "core/page/ChromeClient.h"
#include "core/page/Page.h"
#include "core/paint/PaintLayer.h"
#include "core/paint/ViewPaintInvalidator.h"
@@ -701,6 +702,22 @@ float LayoutView::ZoomFactor() const {
return frame_view_->GetFrame().PageZoomFactor();
}
+void LayoutView::UpdateAfterLayout() {
+ // Unlike every other layer, the root PaintLayer takes its size from the
+ // layout viewport size. The call to AdjustViewSize() will update the
+ // frame's contents size, which will also update the page's minimum scale
+ // factor. The call to ResizeAfterLayout() will calculate the layout viewport
+ // size based on the page minimum scale factor, and then update the FrameView
+ // with the new size.
+ if (HasOverflowClip())
+ GetScrollableArea()->ClampScrollOffsetAfterOverflowChange();
+ LocalFrame& frame = GetFrameView()->GetFrame();
+ if (!GetDocument().Printing())
+ GetFrameView()->AdjustViewSize();
+ frame.GetChromeClient().ResizeAfterLayout(&frame);
+ LayoutBlockFlow::UpdateAfterLayout();
+}
+
void LayoutView::UpdateHitTestResult(HitTestResult& result,
const LayoutPoint& point) {
if (result.InnerNode())
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutView.h ('k') | third_party/WebKit/Source/core/paint/BoxPaintInvalidatorTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698