| 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.
|
|
|