| Index: third_party/WebKit/Source/core/layout/LayoutPart.cpp
|
| diff --git a/third_party/WebKit/Source/core/layout/LayoutPart.cpp b/third_party/WebKit/Source/core/layout/LayoutPart.cpp
|
| index d56ac9de700578600398cbaef65f5bd4066c1038..9f52b727fb1e4d789f10c30f4637f2133e97c3b9 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutPart.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutPart.cpp
|
| @@ -300,12 +300,23 @@ void LayoutPart::updateWidgetGeometry()
|
| if (!widget || !node()) // Check the node in case destroy() has been called.
|
| return;
|
|
|
| + LayoutRect newFrame = replacedContentRect();
|
| + DCHECK(newFrame.size() == roundedIntSize(newFrame.size()));
|
| + bool boundsWillChange = LayoutSize(widget->frameRect().size()) != newFrame.size();
|
| +
|
| + FrameView* frameView = widget->isFrameView() ? toFrameView(widget) : nullptr;
|
| +
|
| + // If frame bounds are changing mark the view for layout. Also check the
|
| + // frame's page to make sure that the frame isn't in the process of being
|
| + // destroyed.
|
| + if (frameView && boundsWillChange && frameView->frame().page())
|
| + frameView->setNeedsLayout();
|
| +
|
| updateWidgetGeometryInternal();
|
|
|
| // If view needs layout, either because bounds have changed or possibly
|
| // indicating content size is wrong, we have to do a layout to set the right
|
| // widget size.
|
| - FrameView* frameView = widget->isFrameView() ? toFrameView(widget) : nullptr;
|
| if (frameView && frameView->needsLayout() && frameView->frame().page())
|
| frameView->layout();
|
|
|
|
|