summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorskobes <skobes@chromium.org>2016-01-11 17:20:58 -0800
committerCommit bot <commit-bot@chromium.org>2016-01-12 01:21:59 +0000
commit43ee05243c81ac0d3da31925e521bf45af1ec08a (patch)
treede3dbe568861f44a45b175cbf1ae7d5ae27038f2
parentcff89e9b8eeabe4ab1ae204212eb893483a51636 (diff)
downloadchromium_src-43ee05243c81ac0d3da31925e521bf45af1ec08a.zip
chromium_src-43ee05243c81ac0d3da31925e521bf45af1ec08a.tar.gz
chromium_src-43ee05243c81ac0d3da31925e521bf45af1ec08a.tar.bz2
Propagate hasPreciseScrollingDeltas in blink::WebMouseWheelEventBuilder.
This is needed by WebPluginContainerImpl::handleWheelEvent, which synthesizes a WebMouseWheelEvent from a blink::WheelEvent. BUG=575648 Review URL: https://codereview.chromium.org/1581443003 Cr-Commit-Position: refs/heads/master@{#368754}
-rw-r--r--third_party/WebKit/Source/web/WebInputEventConversion.cpp1
-rw-r--r--third_party/WebKit/Source/web/tests/WebInputEventConversionTest.cpp3
2 files changed, 3 insertions, 1 deletions
diff --git a/third_party/WebKit/Source/web/WebInputEventConversion.cpp b/third_party/WebKit/Source/web/WebInputEventConversion.cpp
index 321a5b2..d10f2c1 100644
--- a/third_party/WebKit/Source/web/WebInputEventConversion.cpp
+++ b/third_party/WebKit/Source/web/WebInputEventConversion.cpp
@@ -560,6 +560,7 @@ WebMouseWheelEventBuilder::WebMouseWheelEventBuilder(const Widget* widget, const
canScroll = event.canScroll();
resendingPluginId = event.resendingPluginId();
railsMode = static_cast<RailsMode>(event.railsMode());
+ hasPreciseScrollingDeltas = event.hasPreciseScrollingDeltas();
}
WebKeyboardEventBuilder::WebKeyboardEventBuilder(const KeyboardEvent& event)
diff --git a/third_party/WebKit/Source/web/tests/WebInputEventConversionTest.cpp b/third_party/WebKit/Source/web/tests/WebInputEventConversionTest.cpp
index 51de4ed..fc6688a 100644
--- a/third_party/WebKit/Source/web/tests/WebInputEventConversionTest.cpp
+++ b/third_party/WebKit/Source/web/tests/WebInputEventConversionTest.cpp
@@ -891,7 +891,7 @@ TEST(WebInputEventConversionTest, WebMouseWheelEventBuilder)
RefPtrWillBeRawPtr<Document> document = toLocalFrame(webViewImpl->page()->mainFrame())->document();
RefPtrWillBeRawPtr<WheelEvent> event = WheelEvent::create(FloatPoint(1, 3), FloatPoint(5, 10),
WheelEvent::DOM_DELTA_PAGE, document.get()->domWindow(), IntPoint(2, 6), IntPoint(10, 30),
- PlatformEvent::CtrlKey, 0, 0, true, -1 /* null plugin id */, true, Event::RailsModeHorizontal);
+ PlatformEvent::CtrlKey, 0, 0, true, -1 /* null plugin id */, true /* hasPreciseScrollingDeltas */, Event::RailsModeHorizontal);
WebMouseWheelEventBuilder webMouseWheel(toLocalFrame(webViewImpl->page()->mainFrame())->view(), document.get()->layoutView(), *event);
EXPECT_EQ(1, webMouseWheel.wheelTicksX);
EXPECT_EQ(3, webMouseWheel.wheelTicksY);
@@ -905,6 +905,7 @@ TEST(WebInputEventConversionTest, WebMouseWheelEventBuilder)
EXPECT_EQ(WebInputEvent::ControlKey, webMouseWheel.modifiers);
EXPECT_TRUE(webMouseWheel.canScroll);
EXPECT_EQ(WebInputEvent::RailsModeHorizontal, webMouseWheel.railsMode);
+ EXPECT_TRUE(webMouseWheel.hasPreciseScrollingDeltas);
}
TEST(WebInputEventConversionTest, PlatformWheelEventBuilder)