Chromium Code Reviews| Index: Source/web/WebViewImpl.cpp |
| diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp |
| index bede818efbcccedd50386be4fa949b12950d608d..4ad025eea0104632a345d362dd70c03b2c3ec5f4 100644 |
| --- a/Source/web/WebViewImpl.cpp |
| +++ b/Source/web/WebViewImpl.cpp |
| @@ -2874,6 +2874,17 @@ bool WebViewImpl::scrollFocusedNodeIntoRect(const WebRect& rectInViewport) |
| return false; |
| } |
| +void WebViewImpl::smoothScroll(int targetX, int targetY, long durationMs) |
| +{ |
| + LocalFrame* frame = page()->mainFrame() && page()->mainFrame()->isLocalFrame() |
|
dcheng
2015/07/28 18:50:14
Who calls this? Will this be covered by a test on
aelias_OOO_until_Jul13
2015/07/28 19:00:21
Actually, why is this code here at all? The code
hush (inactive)
2015/07/28 19:18:11
I was copying the logic of WebViewImpl::scrollFocu
|
| + ? page()->deprecatedLocalMainFrame() : 0; |
| + if (!frame || !frame->view()) |
| + return; |
| + |
| + IntPoint targetPosition(targetX, targetY); |
| + startPageScaleAnimation(targetPosition, false, pageScaleFactor(), (double)durationMs / 1000); |
| +} |
| + |
| void WebViewImpl::computeScaleAndScrollForFocusedNode(Node* focusedNode, bool zoomInToLegibleScale, float& newScale, IntPoint& newScroll, bool& needAnimation) |
| { |
| focusedNode->document().updateLayoutIgnorePendingStylesheets(); |