Unreviewed, rolling out r242688, r242643, r242624.
authorryanhaddad@apple.com <ryanhaddad@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 11 Mar 2019 17:19:20 +0000 (17:19 +0000)
committerryanhaddad@apple.com <ryanhaddad@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 11 Mar 2019 17:19:20 +0000 (17:19 +0000)
commitd04e8d83cefcde8e2e5713ad5e685fcc543ce377
treee7fa80d5317ebc95d5cfd7db6f62226ea66718f3
parent8394bb47677c039e9952f5f3d922e608203be263
Unreviewed, rolling out r242688, r242643, r242624.

Caused multiple layout test failures and crashes on iOS and macOS.

Reverted changeset:

"requestAnimationFrame should execute before the next frame"
https://bugs.webkit.org/show_bug.cgi?id=177484
https://trac.webkit.org/changeset/242624/webkit

Source/WebCore:

* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* accessibility/mac/AXObjectCacheMac.mm:
(WebCore::AXObjectCache::platformHandleFocusedUIElementChanged):
* animation/DocumentAnimationScheduler.cpp: Added.
(WebCore::DocumentAnimationScheduler::create):
(WebCore::DocumentAnimationScheduler::DocumentAnimationScheduler):
(WebCore::DocumentAnimationScheduler::detachFromDocument):
(WebCore::DocumentAnimationScheduler::scheduleWebAnimationsResolution):
(WebCore::DocumentAnimationScheduler::unscheduleWebAnimationsResolution):
(WebCore::DocumentAnimationScheduler::scheduleScriptedAnimationResolution):
(WebCore::DocumentAnimationScheduler::displayRefreshFired):
(WebCore::DocumentAnimationScheduler::windowScreenDidChange):
(WebCore::DocumentAnimationScheduler::createDisplayRefreshMonitor const):
* animation/DocumentAnimationScheduler.h: Renamed from Source/WebCore/page/RenderingUpdateScheduler.h.
(WebCore::DocumentAnimationScheduler::lastTimestamp):
(WebCore::DocumentAnimationScheduler::isFiring const):
* animation/DocumentTimeline.cpp:
(WebCore::DocumentTimeline::DocumentTimeline):
(WebCore::DocumentTimeline::updateThrottlingState):
(WebCore::DocumentTimeline::suspendAnimations):
(WebCore::DocumentTimeline::resumeAnimations):
(WebCore::DocumentTimeline::liveCurrentTime const):
(WebCore::DocumentTimeline::currentTime):
(WebCore::DocumentTimeline::cacheCurrentTime):
(WebCore::DocumentTimeline::scheduleAnimationResolutionIfNeeded):
(WebCore::DocumentTimeline::animationTimingDidChange):
(WebCore::DocumentTimeline::scheduleAnimationResolution):
(WebCore::DocumentTimeline::unscheduleAnimationResolution):
(WebCore::DocumentTimeline::animationResolutionTimerFired):
(WebCore::DocumentTimeline::updateAnimationsAndSendEvents):
(WebCore::DocumentTimeline::scheduleNextTick):
(WebCore::DocumentTimeline::updateListOfElementsWithRunningAcceleratedAnimationsForElement):
(WebCore::DocumentTimeline::resolveAnimationsForElement):
(WebCore::DocumentTimeline::internalUpdateAnimationsAndSendEvents): Deleted.
* animation/DocumentTimeline.h:
* dom/Document.cpp:
(WebCore::Document::resolveStyle):
(WebCore::Document::prepareForDestruction):
(WebCore::Document::windowScreenDidChange):
(WebCore::Document::updateIntersectionObservations):
(WebCore::Document::scheduleForcedIntersectionObservationUpdate):
(WebCore::Document::animationScheduler):
(WebCore::Document::updateAnimationsAndSendEvents): Deleted.
(WebCore::Document::serviceRequestAnimationFrameCallbacks): Deleted.
* dom/Document.h:
* dom/ScriptedAnimationController.cpp:
(WebCore::ScriptedAnimationController::serviceScriptedAnimations):
(WebCore::ScriptedAnimationController::scheduleAnimation):
(WebCore::ScriptedAnimationController::animationTimerFired):
(WebCore::ScriptedAnimationController::documentAnimationSchedulerDidFire):
(WebCore::ScriptedAnimationController::serviceRequestAnimationFrameCallbacks): Deleted.
* dom/ScriptedAnimationController.h:
* page/FrameView.cpp:
(WebCore::FrameView::viewportContentsChanged):
* page/IntersectionObserver.cpp:
(WebCore::IntersectionObserver::observe):
* page/Page.cpp:
(WebCore::Page::Page):
(WebCore::Page::willDisplayPage):
(WebCore::Page::addDocumentNeedingIntersectionObservationUpdate):
(WebCore::Page::updateIntersectionObservations):
(WebCore::Page::scheduleForcedIntersectionObservationUpdate):
(WebCore::Page::layoutIfNeeded): Deleted.
(WebCore::Page::renderingUpdate): Deleted.
(WebCore::Page::renderingUpdateScheduler): Deleted.
* page/Page.h:
* page/PageOverlayController.cpp:
(WebCore::PageOverlayController::didChangeViewExposedRect):
(WebCore::PageOverlayController::notifyFlushRequired):
* page/RenderingUpdateScheduler.cpp: Removed.
* page/ios/ContentChangeObserver.h:
* page/mac/ServicesOverlayController.mm:
(WebCore::ServicesOverlayController::Highlight::notifyFlushRequired):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::scheduleLayerFlushNow):

Source/WebKit:

* WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp:
(WebKit::DrawingAreaCoordinatedGraphics::scheduleCompositingLayerFlush):
(WebKit::DrawingAreaCoordinatedGraphics::updateBackingStoreState):
(WebKit::DrawingAreaCoordinatedGraphics::display):
* WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp:
(WebKit::LayerTreeHost::layerFlushTimerFired):
* WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::flushLayers):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::layoutIfNeeded):
(WebKit::WebPage::willDisplayPage):
(WebKit::WebPage::renderingUpdate): Deleted.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::flushLayers):

Source/WebKitLegacy/mac:

* WebView/WebView.mm:
(-[WebView _viewWillDrawInternal]):

Source/WebKitLegacy/win:

* WebView.cpp:
(WebView::updateBackingStore):
(WebView::flushPendingGraphicsLayerChangesSoon):
(WebView::flushPendingGraphicsLayerChanges):

Source/WTF:

* wtf/SystemTracing.h:

Tools:

* Tracing/SystemTracePoints.plist:

LayoutTests:

* TestExpectations:
* animations/animation-multiple-callbacks-timestamp.html:
* animations/no-style-recalc-during-accelerated-animation-expected.txt:
* animations/no-style-recalc-during-accelerated-animation.html:
* platform/mac-wk2/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242714 268f45cc-cd09-0410-ab3c-d52691b4dbfc
42 files changed:
LayoutTests/ChangeLog
LayoutTests/TestExpectations
LayoutTests/animations/animation-multiple-callbacks-timestamp.html
LayoutTests/animations/no-style-recalc-during-accelerated-animation-expected.txt
LayoutTests/animations/no-style-recalc-during-accelerated-animation.html
LayoutTests/platform/mac-wk2/TestExpectations
Source/WTF/ChangeLog
Source/WTF/wtf/SystemTracing.h
Source/WebCore/ChangeLog
Source/WebCore/Sources.txt
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/accessibility/mac/AXObjectCacheMac.mm
Source/WebCore/animation/DocumentAnimationScheduler.cpp [new file with mode: 0644]
Source/WebCore/animation/DocumentAnimationScheduler.h [moved from Source/WebCore/page/RenderingUpdateScheduler.h with 58% similarity]
Source/WebCore/animation/DocumentTimeline.cpp
Source/WebCore/animation/DocumentTimeline.h
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/Document.h
Source/WebCore/dom/ScriptedAnimationController.cpp
Source/WebCore/dom/ScriptedAnimationController.h
Source/WebCore/page/FrameView.cpp
Source/WebCore/page/IntersectionObserver.cpp
Source/WebCore/page/Page.cpp
Source/WebCore/page/Page.h
Source/WebCore/page/PageOverlayController.cpp
Source/WebCore/page/RenderingUpdateScheduler.cpp [deleted file]
Source/WebCore/page/ios/ContentChangeObserver.h
Source/WebCore/page/mac/ServicesOverlayController.mm
Source/WebCore/rendering/RenderLayerCompositor.cpp
Source/WebKit/ChangeLog
Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp
Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp
Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm
Source/WebKit/WebProcess/WebPage/WebPage.cpp
Source/WebKit/WebProcess/WebPage/WebPage.h
Source/WebKit/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm
Source/WebKitLegacy/mac/ChangeLog
Source/WebKitLegacy/mac/WebView/WebView.mm
Source/WebKitLegacy/win/ChangeLog
Source/WebKitLegacy/win/WebView.cpp
Tools/ChangeLog
Tools/Tracing/SystemTracePoints.plist