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

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

Issue 1225583004: Revert of Add a FrameView lifecycle method that just updates layout, style and compositing. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 5 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/frame/LocalFrame.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 a978f7d8b2f19dfb7dff8cd308a6c4207da2b211..79009f972ba2f911f6ad9fab63c014e3bc887fee 100644
--- a/Source/core/frame/FrameView.cpp
+++ b/Source/core/frame/FrameView.cpp
@@ -2483,24 +2483,12 @@
updateWidgetPositions();
}
-void FrameView::updateAllLifecyclePhases()
-{
- frame().localFrameRoot()->view()->updateAllLifecyclePhasesInternal();
-}
-
-// 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);
-}
-
-void FrameView::updateAllLifecyclePhasesInternal()
+void FrameView::updateLayoutAndStyleForPainting()
+{
+ frame().localFrameRoot()->view()->updateLayoutAndStyleForPaintingInternal();
+}
+
+void FrameView::updateLayoutAndStyleForPaintingInternal()
{
// 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()));
@@ -2508,34 +2496,30 @@
// Updating layout can run script, which can tear down the FrameView.
RefPtrWillBeRawPtr<FrameView> protector(this);
- updateStyleAndLayoutIfNeededRecursive();
+ updateLayoutAndStyleIfNeededRecursive();
LayoutView* view = layoutView();
if (view) {
TRACE_EVENT1("devtools.timeline", "UpdateLayerTree", "data", InspectorUpdateLayerTreeEvent::data(m_frame.get()));
view->compositor()->updateIfNeededRecursive();
+
+ if (view->compositor()->inCompositingMode() && m_frame->isLocalRoot())
+ scrollingCoordinator()->updateAfterCompositingChangeIfNeeded();
+
+ updateCompositedSelectionIfNeeded();
+
+ if (RuntimeEnabledFeatures::frameTimingSupportEnabled())
+ updateFrameTimingRequestsIfNeeded();
+
scrollContentsIfNeededRecursive();
+
invalidateTreeIfNeededRecursive();
- updatePostLifecycleData();
ASSERT(!view->hasPendingSelection());
}
ASSERT(lifecycle().state() == DocumentLifecycle::PaintInvalidationClean);
-}
-
-void FrameView::updatePostLifecycleData()
-{
- LayoutView* view = layoutView();
- ASSERT(view);
-
- if (view->compositor()->inCompositingMode() && m_frame->isLocalRoot())
- scrollingCoordinator()->updateAfterCompositingChangeIfNeeded();
-
- updateCompositedSelectionIfNeeded();
- if (RuntimeEnabledFeatures::frameTimingSupportEnabled())
- updateFrameTimingRequestsIfNeeded();
}
void FrameView::updateFrameTimingRequestsIfNeeded()
@@ -2550,7 +2534,7 @@
}
}
-void FrameView::updateStyleAndLayoutIfNeededRecursive()
+void FrameView::updateLayoutAndStyleIfNeededRecursive()
{
// We have to crawl our entire subtree looking for any FrameViews that need
// layout and make sure they are up to date.
@@ -2577,7 +2561,7 @@
}
for (const auto& frameView : frameViews)
- frameView->updateStyleAndLayoutIfNeededRecursive();
+ frameView->updateLayoutAndStyleIfNeededRecursive();
// When an <iframe> gets composited, it triggers an extra style recalc in its containing FrameView.
// To avoid pushing an invalid tree for display, we have to check for this case and do another
« no previous file with comments | « Source/core/frame/FrameView.h ('k') | Source/core/frame/LocalFrame.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698