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

Unified Diff: Source/web/tests/WebViewTest.cpp

Issue 967213004: Removed FrameView's windowToContents and contentsToWindow methods. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 5 years, 9 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/web/tests/WebPluginContainerTest.cpp ('k') | public/web/WebFrame.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/tests/WebViewTest.cpp
diff --git a/Source/web/tests/WebViewTest.cpp b/Source/web/tests/WebViewTest.cpp
index aced0c6171a863560533a84a086092ffbca3e6b9..f20ade585c3c484df90d6c298da27f98fd59c1cc 100644
--- a/Source/web/tests/WebViewTest.cpp
+++ b/Source/web/tests/WebViewTest.cpp
@@ -1195,18 +1195,14 @@ static bool tapElementById(WebView* webView, WebInputEvent::Type type, const Web
return false;
element->scrollIntoViewIfNeeded();
- IntPoint center = element->screenRect().center();
- // FIXME: This will be unnecessary since screenRect() will be fixed once crbug.com/371902 lands.
- PinchViewport& pinchViewport = element->document().frameHost()->pinchViewport();
- IntPoint centerInViewport = center;
- centerInViewport.moveBy(-flooredIntPoint(pinchViewport.location()));
- centerInViewport.scale(pinchViewport.scale(), pinchViewport.scale());
+ // TODO(bokan): Technically incorrect, event positions should be in viewport space. crbug.com/371902.
+ IntPoint center = element->screenRect().center();
WebGestureEvent event;
event.type = type;
- event.x = centerInViewport.x();
- event.y = centerInViewport.y();
+ event.x = center.x();
+ event.y = center.y();
webView->handleInputEvent(event);
runPendingTasks();
« no previous file with comments | « Source/web/tests/WebPluginContainerTest.cpp ('k') | public/web/WebFrame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698