diff options
author | George Mount <mount@google.com> | 2012-04-30 13:47:27 -0700 |
---|---|---|
committer | George Mount <mount@google.com> | 2012-05-01 08:25:47 -0700 |
commit | f2e2233332c5b4a4b584c0a10b8bac10b6122acf (patch) | |
tree | adbbe5d4aaf4376e82aebe49228343937d5d20ce /Source/WebCore/html/RangeInputType.cpp | |
parent | 940c47782e72ed37ba9f1193af1265a56a3df7e1 (diff) | |
download | external_webkit-f2e2233332c5b4a4b584c0a10b8bac10b6122acf.zip external_webkit-f2e2233332c5b4a4b584c0a10b8bac10b6122acf.tar.gz external_webkit-f2e2233332c5b4a4b584c0a10b8bac10b6122acf.tar.bz2 |
Use different mechanism for enabling slider.
Bug 6413206
The HTML5 video scrubbing requires the old mechanism
for getting touch events.
Nearly a full revert of change I1d1ae457c50fe5b9627df7edb4f11d8245b5bdbf
Change-Id: Ia3d07c1fddf5f5ed0f51a518c85f04bed415502e
Diffstat (limited to 'Source/WebCore/html/RangeInputType.cpp')
-rw-r--r-- | Source/WebCore/html/RangeInputType.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Source/WebCore/html/RangeInputType.cpp b/Source/WebCore/html/RangeInputType.cpp index 88563c7..783eabc 100644 --- a/Source/WebCore/html/RangeInputType.cpp +++ b/Source/WebCore/html/RangeInputType.cpp @@ -199,6 +199,22 @@ void RangeInputType::handleKeydownEvent(KeyboardEvent* event) event->setDefaultHandled(); } +#if PLATFORM(ANDROID) && ENABLE(TOUCH_EVENTS) +void RangeInputType::handleTouchStartEvent(TouchEvent* touchEvent) +{ + if (SliderThumbElement* thumb = shadowSliderThumb()) { + if (touchEvent->touches() && touchEvent->touches()->item(0)) { + IntPoint curPoint; + curPoint.setX(touchEvent->touches()->item(0)->pageX()); + curPoint.setY(touchEvent->touches()->item(0)->pageY()); + thumb->dragFrom(curPoint); + touchEvent->setDefaultHandled(); + touchEvent->setDefaultPrevented(true); + } + } +} +#endif + void RangeInputType::createShadowSubtree() { ExceptionCode ec = 0; |