Index: Source/core/frame/FrameView.cpp |
diff --git a/Source/core/frame/FrameView.cpp b/Source/core/frame/FrameView.cpp |
index 021d17acf26bbb135e4480526632be4accc3bf1b..c32875e595e409da874c143e289dc303879e9ce3 100644 |
--- a/Source/core/frame/FrameView.cpp |
+++ b/Source/core/frame/FrameView.cpp |
@@ -2448,22 +2448,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(OnlyUpToCompositingClean); |
} |
-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())); |
@@ -2479,8 +2473,13 @@ void FrameView::updateAllLifecyclePhasesInternal() |
view->compositor()->updateIfNeededRecursive(); |
scrollContentsIfNeededRecursive(); |
- invalidateTreeIfNeededRecursive(); |
- updatePostLifecycleData(); |
+ |
+ ASSERT(lifecycle().state() >= DocumentLifecycle::CompositingClean); |
+ |
+ if (phases == AllPhases) { |
+ invalidateTreeIfNeededRecursive(); |
+ updatePostLifecycleData(); |
+ } |
ASSERT(!view->hasPendingSelection()); |
} |