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

Unified Diff: Source/core/frame/FrameView.cpp

Issue 490473003: Defer call to updateWidgetPositions() outside of RenderLayerScrollableArea. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: doctype Created 6 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 | « Source/core/frame/FrameView.h ('k') | Source/core/rendering/RenderLayerScrollableArea.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/FrameView.cpp
diff --git a/Source/core/frame/FrameView.cpp b/Source/core/frame/FrameView.cpp
index 7028b4aa100b78baf06075cc193ac4d75513c153..f0634078d63b1caaab80ba63f0fe69aaf5bb0a83 100644
--- a/Source/core/frame/FrameView.cpp
+++ b/Source/core/frame/FrameView.cpp
@@ -121,6 +121,7 @@ FrameView::FrameView(LocalFrame* frame)
, m_inputEventsScaleFactorForEmulation(1)
, m_layoutSizeFixedToFrameSize(true)
, m_didScrollTimer(this, &FrameView::didScrollTimerFired)
+ , m_needsUpdateWidgetPositions(false)
{
ASSERT(m_frame);
init();
@@ -2648,6 +2649,16 @@ void FrameView::paintOverhangAreas(GraphicsContext* context, const IntRect& hori
ScrollView::paintOverhangAreas(context, horizontalOverhangArea, verticalOverhangArea, dirtyRect);
}
+void FrameView::updateWidgetPositionsIfNeeded()
+{
+ if (!m_needsUpdateWidgetPositions)
+ return;
+
+ m_needsUpdateWidgetPositions = false;
+
+ updateWidgetPositions();
+}
+
void FrameView::updateLayoutAndStyleForPainting()
{
// Updating layout can run script, which can tear down the FrameView.
@@ -2655,6 +2666,8 @@ void FrameView::updateLayoutAndStyleForPainting()
updateLayoutAndStyleIfNeededRecursive();
+ updateWidgetPositionsIfNeeded();
+
if (RenderView* view = renderView()) {
TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("devtools.timeline"), "UpdateLayerTree", "frame", m_frame.get());
// FIXME(361045): remove InspectorInstrumentation calls once DevTools Timeline migrates to tracing.
« no previous file with comments | « Source/core/frame/FrameView.h ('k') | Source/core/rendering/RenderLayerScrollableArea.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698