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

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

Issue 1513573013: Don't call LayoutPart::widgetPositionsUpdated unnecessarily. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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/LayoutPart.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutPart.cpp b/third_party/WebKit/Source/core/layout/LayoutPart.cpp
index 4741abceb7afd7ad1dd056459bc5ed4746486a0b..7870fa440e4b3f0250422766b52b8c68e234e7fa 100644
--- a/third_party/WebKit/Source/core/layout/LayoutPart.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutPart.cpp
@@ -267,7 +267,7 @@ void LayoutPart::updateOnWidgetChange()
return;
if (!needsLayout())
- updateWidgetGeometry();
+ updateWidgetGeometryInternal();
if (style()->visibility() != VISIBLE) {
widget->hide();
@@ -278,13 +278,13 @@ void LayoutPart::updateOnWidgetChange()
}
}
-void LayoutPart::updateWidgetPosition()
+void LayoutPart::updateWidgetGeometry()
{
Widget* widget = this->widget();
if (!widget || !node()) // Check the node in case destroy() has been called.
return;
- bool boundsChanged = updateWidgetGeometry();
+ bool boundsChanged = updateWidgetGeometryInternal();
// If the frame bounds got changed, or if view needs layout (possibly indicating
// content size is wrong) we have to do a layout to set the right widget size.
@@ -294,17 +294,11 @@ void LayoutPart::updateWidgetPosition()
if ((boundsChanged || frameView->needsLayout()) && frameView->frame().page())
frameView->layout();
}
-}
-void LayoutPart::widgetPositionsUpdated()
-{
- Widget* widget = this->widget();
- if (!widget)
- return;
- widget->widgetPositionsUpdated();
+ widget->widgetGeometryMayHaveChanged();
}
-bool LayoutPart::updateWidgetGeometry()
+bool LayoutPart::updateWidgetGeometryInternal()
{
Widget* widget = this->widget();
ASSERT(widget);
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutPart.h ('k') | third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698