Index: Source/core/frame/FrameView.cpp |
diff --git a/Source/core/frame/FrameView.cpp b/Source/core/frame/FrameView.cpp |
index f4436bcd726cc5ca68e9c20cc3cb5432733488b1..fc7f31cce80da18c4ff5e69ed6550db484cc4e3f 100644 |
--- a/Source/core/frame/FrameView.cpp |
+++ b/Source/core/frame/FrameView.cpp |
@@ -2436,22 +2436,16 @@ void FrameView::updateWidgetPositionsIfNeeded() |
void FrameView::updateAllLifecyclePhases() |
{ |
- frame().localFrameRoot()->view()->updateAllLifecyclePhasesInternal(); |
+ frame().localFrameRoot()->view()->updateLifecyclePhasesInternal(AllPhases); |
} |
// TODO(chrishtr): add a scrolling update lifecycle phase, after compositing and before invalidation. |
void FrameView::updateLifecycleToCompositingCleanPlusScrolling() |
{ |
- frame().localFrameRoot()->view()->updateStyleAndLayoutIfNeededRecursive(); |
- LayoutView* view = layoutView(); |
- if (view) |
- view->compositor()->updateIfNeededRecursive(); |
- scrollContentsIfNeededRecursive(); |
- |
- ASSERT(lifecycle().state() >= DocumentLifecycle::CompositingClean); |
+ frame().localFrameRoot()->view()->updateLifecyclePhasesInternal(OnlyUpToCompositingCleanPlusScrolling); |
} |
-void FrameView::updateAllLifecyclePhasesInternal() |
+void FrameView::updateLifecyclePhasesInternal(LifeCycleUpdateOption phases) |
{ |
// This must be called from the root frame, since it recurses down, not up. Otherwise the lifecycles of the frames might be out of sync. |
ASSERT(frame() == page()->mainFrame() || (!frame().tree().parent()->isLocalFrame())); |
@@ -2461,19 +2455,22 @@ void FrameView::updateAllLifecyclePhasesInternal() |
updateStyleAndLayoutIfNeededRecursive(); |
- LayoutView* view = layoutView(); |
- if (view) { |
+ if (LayoutView* view = layoutView()) { |
TRACE_EVENT1("devtools.timeline", "UpdateLayerTree", "data", InspectorUpdateLayerTreeEvent::data(m_frame.get())); |
view->compositor()->updateIfNeededRecursive(); |
scrollContentsIfNeededRecursive(); |
- invalidateTreeIfNeededRecursive(); |
- updatePostLifecycleData(); |
- ASSERT(!view->hasPendingSelection()); |
- } |
+ ASSERT(lifecycle().state() >= DocumentLifecycle::CompositingClean); |
+ |
+ if (phases == AllPhases) { |
+ invalidateTreeIfNeededRecursive(); |
+ updatePostLifecycleData(); |
- ASSERT(lifecycle().state() == DocumentLifecycle::PaintInvalidationClean); |
+ ASSERT(!view->hasPendingSelection()); |
+ ASSERT(lifecycle().state() == DocumentLifecycle::PaintInvalidationClean); |
ojan
2015/08/14 23:14:39
Please take another look.
Moved this assert into
|
+ } |
+ } |
} |
void FrameView::updatePostLifecycleData() |