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

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

Issue 2229303002: Revert "Remove extraneous frameView->setNeedsLayout() in LayoutPart" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: windows too. :( Created 4 years, 4 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 | « third_party/WebKit/Source/core/frame/FrameView.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameView.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698