summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/html/RangeInputType.cpp
diff options
context:
space:
mode:
authorGeorge Mount <mount@google.com>2012-04-30 13:47:27 -0700
committerGeorge Mount <mount@google.com>2012-05-01 08:25:47 -0700
commitf2e2233332c5b4a4b584c0a10b8bac10b6122acf (patch)
treeadbbe5d4aaf4376e82aebe49228343937d5d20ce /Source/WebCore/html/RangeInputType.cpp
parent940c47782e72ed37ba9f1193af1265a56a3df7e1 (diff)
downloadexternal_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.cpp16
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;