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

Unified Diff: chrome/browser/apps/guest_view/web_view_browsertest.cc

Issue 2782893002: WebMouseEvent coordinates are now fractional & private (Closed)
Patch Set: Rebased, fixed a comment in web_input_event_builders_mac.mm Created 3 years, 8 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: chrome/browser/apps/guest_view/web_view_browsertest.cc
diff --git a/chrome/browser/apps/guest_view/web_view_browsertest.cc b/chrome/browser/apps/guest_view/web_view_browsertest.cc
index 59b15a38dfe45420d11194d4e8ccf5f8f6991347..825ef584a2594ea37ec9ae7916de14889cafdd05 100644
--- a/chrome/browser/apps/guest_view/web_view_browsertest.cc
+++ b/chrome/browser/apps/guest_view/web_view_browsertest.cc
@@ -309,11 +309,10 @@ class LeftMouseClick {
DCHECK(click_completed_);
click_completed_ = false;
mouse_event_.setType(blink::WebInputEvent::MouseDown);
- mouse_event_.x = point.x();
- mouse_event_.y = point.y();
+ mouse_event_.setPositionInWidget(point.x(), point.y());
const gfx::Rect offset = web_contents_->GetContainerBounds();
- mouse_event_.globalX = point.x() + offset.x();
- mouse_event_.globalY = point.y() + offset.y();
+ mouse_event_.setPositionInScreen(point.x() + offset.x(),
+ point.y() + offset.y());
mouse_event_.clickCount = 1;
web_contents_->GetRenderViewHost()->GetWidget()->ForwardMouseEvent(
mouse_event_);
@@ -781,8 +780,7 @@ class WebViewTestBase : public extensions::PlatformAppBrowserTest {
blink::WebInputEvent::NoModifiers,
blink::WebInputEvent::TimeStampForTesting);
mouse_event.button = blink::WebMouseEvent::Button::Right;
- mouse_event.x = 1;
- mouse_event.y = 1;
+ mouse_event.setPositionInWidget(1, 1);
web_contents->GetRenderViewHost()->GetWidget()->ForwardMouseEvent(
mouse_event);
mouse_event.setType(blink::WebInputEvent::MouseUp);
@@ -3456,8 +3454,7 @@ IN_PROC_BROWSER_TEST_P(WebViewAccessibilityTest, DISABLED_TouchAccessibility) {
blink::WebInputEvent::MouseMove,
blink::WebInputEvent::IsTouchAccessibility,
blink::WebInputEvent::TimeStampForTesting);
- accessibility_touch_event.x = 95;
- accessibility_touch_event.y = 55;
+ accessibility_touch_event.setPositionInWidget(95, 55);
web_contents->GetRenderViewHost()->GetWidget()->ForwardMouseEvent(
accessibility_touch_event);
« no previous file with comments | « chrome/browser/android/vr_shell/vr_shell_gl.cc ('k') | chrome/browser/apps/guest_view/web_view_interactive_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698