summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/rendering
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2011-05-16 16:35:58 +0100
committerBen Murdoch <benm@google.com>2011-05-23 18:54:14 +0100
commit6fbaea61d241814b015fd7e022796e68d8ef3e8e (patch)
tree09be7d423f6dbab5995e21265a9a54650d013a64 /Source/WebCore/rendering
parent61f2d6a1f71aa7a52ec56b93958324b8b6de1b6a (diff)
downloadexternal_webkit-6fbaea61d241814b015fd7e022796e68d8ef3e8e.zip
external_webkit-6fbaea61d241814b015fd7e022796e68d8ef3e8e.tar.gz
external_webkit-6fbaea61d241814b015fd7e022796e68d8ef3e8e.tar.bz2
Merge WebKit at r76408: Fix conflicts.
Android.jscbindings.mk Conflict due to local addition of EntrySyncCustom.cpp and http://trac.webkit.org/changeset/76216 V8NPUtils.cpp Conflict due to local cherry pick of http://trac.webkit.org/changeset/78994 and merge of http://trac.webkit.org/changeset/76264 FrameView.h Conflict due to local addition of updatePositionedObjects() and http://trac.webkit.org/changeset/76278 RangeInputType.cpp SliderThumbElement.cpp Conflicts due to Android addition of touch handling code in slider code. See http://trac.webkit.org/changeset/76147 .gitignore - keep ours Change-Id: I38aeb361a37e7939f805c6689d7cc8fc720b3e52
Diffstat (limited to 'Source/WebCore/rendering')
-rw-r--r--Source/WebCore/rendering/RenderMedia.cpp19
1 files changed, 17 insertions, 2 deletions
diff --git a/Source/WebCore/rendering/RenderMedia.cpp b/Source/WebCore/rendering/RenderMedia.cpp
index f59a995..0b913ee 100644
--- a/Source/WebCore/rendering/RenderMedia.cpp
+++ b/Source/WebCore/rendering/RenderMedia.cpp
@@ -39,7 +39,8 @@
#include <wtf/CurrentTime.h>
#include <wtf/MathExtras.h>
-#if PLATFORM(ANDROID)
+#if PLATFORM(ANDROID) && ENABLE(TOUCH_EVENTS)
+#include "TouchEvent.h"
#define TOUCH_DELAY 4
#endif
@@ -467,7 +468,7 @@ void RenderMedia::updateControlVisibility()
if (style()->visibility() != VISIBLE)
return;
-#if PLATFORM(ANDROID)
+#if PLATFORM(ANDROID) && ENABLE(TOUCH_EVENTS)
if (WTF::currentTime() - m_lastTouch > TOUCH_DELAY)
m_mouseOver = false;
else
@@ -631,6 +632,20 @@ void RenderMedia::forwardEvent(Event* event)
updateControlVisibility();
}
}
+#if PLATFORM(ANDROID) && ENABLE(TOUCH_EVENTS)
+ // We want to process touch events landing on the timeline so that the user
+ // can drag the scrollbar thumb with their finger.
+ else if (event->isTouchEvent() && m_controlsShadowRoot) {
+ TouchEvent* touchEvent = static_cast<TouchEvent*>(event);
+ if (touchEvent->touches() && touchEvent->touches()->item(0)) {
+ IntPoint point;
+ point.setX(touchEvent->touches()->item(0)->pageX());
+ point.setY(touchEvent->touches()->item(0)->pageY());
+ if (m_timeline && m_timeline->hitTest(point))
+ m_timeline->defaultEventHandler(event);
+ }
+ }
+#endif
}
// We want the timeline slider to be at least 100 pixels wide.