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

Unified Diff: third_party/WebKit/Source/web/WebViewImpl.cpp

Issue 2128563002: Move scheduleAnimation calls from WebViewClient to WebWidgetClient. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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
Index: third_party/WebKit/Source/web/WebViewImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebViewImpl.cpp b/third_party/WebKit/Source/web/WebViewImpl.cpp
index 1e2ee8b889226542f60b1d27bf3c4b221e90cdb2..dd504a929d0c9f8b98eb857d52b525aa23cac353 100644
--- a/third_party/WebKit/Source/web/WebViewImpl.cpp
+++ b/third_party/WebKit/Source/web/WebViewImpl.cpp
@@ -743,7 +743,7 @@ WebInputEventResult WebViewImpl::handleGestureEvent(const WebGestureEvent& event
std::unique_ptr<WebGestureCurve> flingCurve = wrapUnique(Platform::current()->createFlingAnimationCurve(event.sourceDevice, WebFloatPoint(event.data.flingStart.velocityX, event.data.flingStart.velocityY), WebSize()));
DCHECK(flingCurve);
m_gestureAnimation = WebActiveGestureAnimation::createAtAnimationStart(std::move(flingCurve), this);
- scheduleAnimation();
+ mainFrameImpl()->frameWidget()->scheduleAnimation();
eventResult = WebInputEventResult::HandledSystem;
// Plugins may need to see GestureFlingStart to balance
@@ -966,7 +966,7 @@ void WebViewImpl::transferActiveWheelFlingAnimation(const WebActiveWheelFlingPar
m_gestureAnimation = WebActiveGestureAnimation::createWithTimeOffset(std::move(curve), this, parameters.startTime);
DCHECK_NE(parameters.sourceDevice, WebGestureDeviceUninitialized);
m_flingSourceDevice = parameters.sourceDevice;
- scheduleAnimation();
+ mainFrameImpl()->frameWidget()->scheduleAnimation();
}
bool WebViewImpl::endActiveFlingAnimation()
@@ -1975,7 +1975,7 @@ void WebViewImpl::beginFrame(double lastFrameTimeMonotonic)
// Create synthetic wheel events as necessary for fling.
if (m_gestureAnimation) {
if (m_gestureAnimation->animate(lastFrameTimeMonotonic))
- scheduleAnimation();
+ mainFrameImpl()->frameWidget()->scheduleAnimation();
else {
DCHECK_NE(m_flingSourceDevice, WebGestureDeviceUninitialized);
WebGestureDevice lastFlingSourceDevice = m_flingSourceDevice;
@@ -3389,7 +3389,7 @@ void WebViewImpl::refreshPageScaleFactorAfterLayout()
// caller of this method.
// TODO(chrishtr): clean all this up. All layout should happen in one lifecycle run (crbug.com/578239).
if (mainFrameImpl()->frameView()->needsLayout())
- scheduleAnimation();
+ mainFrameImpl()->frameWidget()->scheduleAnimation();
}
void WebViewImpl::updatePageDefinedViewportConstraints(const ViewportDescription& description)
@@ -4284,14 +4284,14 @@ GraphicsLayer* WebViewImpl::rootGraphicsLayer()
return m_rootGraphicsLayer;
}
-void WebViewImpl::scheduleAnimation()
+void WebViewImpl::scheduleAnimationForWidget()
{
if (m_layerTreeView) {
m_layerTreeView->setNeedsBeginFrame();
return;
}
if (m_client)
- m_client->scheduleAnimation();
+ m_client->widgetClient()->scheduleAnimation();
}
void WebViewImpl::attachCompositorAnimationTimeline(CompositorAnimationTimeline* timeline)

Powered by Google App Engine
This is Rietveld 408576698