| 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..509a6aa7d1083ea8bd13a2acdf78943263543d3e 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"
|
| @@ -278,6 +279,25 @@ void LayoutView::UpdateLayout() {
|
| !ShouldUsePrintingLayout() &&
|
| (!frame_view_ || LogicalWidth() != ViewLogicalWidthForBoxSizing() ||
|
| LogicalHeight() != ViewLogicalHeightForBoxSizing());
|
| +
|
| + if (!relayout_children && GetDocument().IsSVGDocument()) {
|
| + for (LayoutObject* child = FirstChild(); child;
|
| + child = child->NextSibling()) {
|
| + if (!child->IsSVGRoot())
|
| + continue;
|
| + const Length& child_height = child->Style()->LogicalHeight();
|
| + if (!child_height.IsPercentOrCalc())
|
| + continue;
|
| + if (ToLayoutBox(child)->LogicalHeight() !=
|
| + ValueForLength(child_height,
|
| + AvailableLogicalHeightUsing(
|
| + child_height, kExcludeMarginBorderPadding))) {
|
| + relayout_children = true;
|
| + layout_scope.SetChildNeedsLayout(child);
|
| + }
|
| + }
|
| + }
|
| +
|
| if (relayout_children) {
|
| layout_scope.SetChildNeedsLayout(this);
|
| for (LayoutObject* child = FirstChild(); child;
|
| @@ -701,6 +721,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);
|
| + LayoutBlock::UpdateAfterLayout();
|
| +}
|
| +
|
| void LayoutView::UpdateHitTestResult(HitTestResult& result,
|
| const LayoutPoint& point) {
|
| if (result.InnerNode())
|
|
|