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

Unified Diff: third_party/WebKit/Source/core/frame/FrameView.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/frame/FrameView.cpp
diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp
index 0dc1740488d3be457262faef17a4bf9e68808918..a81f7c15579ed5db9dc9e0cd00e22044bd265d46 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -132,7 +132,7 @@ FrameView::FrameView(LocalFrame* frame)
, m_layoutSizeFixedToFrameSize(true)
, m_didScrollTimer(this, &FrameView::didScrollTimerFired)
, m_topControlsViewportAdjustment(0)
- , m_needsUpdateWidgetPositions(false)
+ , m_needsUpdateWidgetGeometries(false)
, m_needsUpdateViewportIntersection(true)
, m_needsUpdateViewportIntersectionInSubtree(true)
#if ENABLE(ASSERT)
@@ -1144,18 +1144,14 @@ void FrameView::removePart(LayoutPart* object)
m_parts.remove(object);
}
-void FrameView::updateWidgetPositions()
+void FrameView::updateWidgetGeometries()
{
Vector<RefPtr<LayoutPart>> parts;
copyToVector(m_parts, parts);
// Script or plugins could detach the frame so abort processing if that happens.
-
- for (size_t i = 0; i < parts.size() && layoutView(); ++i)
- parts[i]->updateWidgetPosition();
-
for (size_t i = 0; i < parts.size() && layoutView(); ++i)
- parts[i]->widgetPositionsUpdated();
+ parts[i]->updateWidgetGeometry();
}
void FrameView::addPartToUpdate(LayoutEmbeddedObject& object)
@@ -1570,7 +1566,7 @@ void FrameView::updateLayersAndCompositingAfterScrollIfNeeded()
// Update widget and layer positions after scrolling, but only if we're not inside of
// layout.
if (!m_nestedLayoutCount) {
- updateWidgetPositions();
+ updateWidgetGeometries();
if (LayoutView* layoutView = this->layoutView())
layoutView->layer()->setNeedsCompositingInputsUpdate();
}
@@ -1903,7 +1899,7 @@ bool FrameView::updateWidgets()
if (element->needsWidgetUpdate())
element->updateWidget();
- object.updateWidgetPosition();
+ object.updateWidgetGeometry();
// Prevent plugins from causing infinite updates of themselves.
// FIXME: Do we really need to prevent this?
@@ -1965,9 +1961,9 @@ void FrameView::performPostLayoutTasks()
// to PageEventHandler.
frame().localFrameRoot()->eventHandler().scheduleCursorUpdate();
- updateWidgetPositions();
+ updateWidgetGeometries();
- // Plugins could have torn down the page inside updateWidgetPositions().
+ // Plugins could have torn down the page inside updateWidgetGeometries().
if (!layoutView())
return;
@@ -2321,14 +2317,14 @@ void FrameView::setNodeToDraw(Node* node)
m_nodeToDraw = node;
}
-void FrameView::updateWidgetPositionsIfNeeded()
+void FrameView::updateWidgetGeometriesIfNeeded()
{
- if (!m_needsUpdateWidgetPositions)
+ if (!m_needsUpdateWidgetGeometries)
return;
- m_needsUpdateWidgetPositions = false;
+ m_needsUpdateWidgetGeometries = false;
- updateWidgetPositions();
+ updateWidgetGeometries();
}
void FrameView::updateAllLifecyclePhases()
@@ -2563,7 +2559,7 @@ void FrameView::updateStyleAndLayoutIfNeededRecursive()
m_frame->document()->layoutView()->assertLaidOut();
#endif
- updateWidgetPositionsIfNeeded();
+ updateWidgetGeometriesIfNeeded();
if (lifecycle().state() < DocumentLifecycle::LayoutClean)
lifecycle().advanceTo(DocumentLifecycle::LayoutClean);
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameView.h ('k') | third_party/WebKit/Source/core/layout/LayoutPart.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698