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

Unified Diff: third_party/WebKit/Source/web/tests/WebPluginContainerTest.cpp

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: third_party/WebKit/Source/web/tests/WebPluginContainerTest.cpp
diff --git a/third_party/WebKit/Source/web/tests/WebPluginContainerTest.cpp b/third_party/WebKit/Source/web/tests/WebPluginContainerTest.cpp
index 23e1c3e6029582ccdf50fb8a6ff6e7205d792f31..024a4d0aa24e282239f3bd7006ca708b2557d363 100644
--- a/third_party/WebKit/Source/web/tests/WebPluginContainerTest.cpp
+++ b/third_party/WebKit/Source/web/tests/WebPluginContainerTest.cpp
@@ -448,7 +448,8 @@ class EventTestPlugin : public FakeWebPlugin {
event.type() == WebInputEvent::MouseWheel) {
const WebMouseEvent& mouseEvent =
static_cast<const WebMouseEvent&>(event);
- m_lastMouseEventLocation = IntPoint(mouseEvent.x, mouseEvent.y);
+ m_lastMouseEventLocation = IntPoint(mouseEvent.positionInWidget().x,
+ mouseEvent.positionInWidget().y);
}
return WebInputEventResult::HandledSystem;
@@ -537,8 +538,7 @@ TEST_F(WebPluginContainerTest, MouseWheelEventTranslated) {
WebInputEvent::TimeStampForTesting);
WebRect rect = pluginContainerOneElement.boundsInViewport();
- event.x = rect.x + rect.width / 2;
- event.y = rect.y + rect.height / 2;
+ event.setPositionInWidget(rect.x + rect.width / 2, rect.y + rect.height / 2);
webView->handleInputEvent(WebCoalescedInputEvent(event));
runPendingTasks();

Powered by Google App Engine
This is Rietveld 408576698