summaryrefslogtreecommitdiffstats
path: root/WebCore
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2010-02-03 19:21:02 +0000
committerSteve Block <steveblock@google.com>2010-02-04 15:07:00 +0000
commit1198b35477e381f4af724f65d426996ea16716de (patch)
treeccbf065823b1473f1822b2ff38e100a675eedce6 /WebCore
parent4247478b67d5b291c805d149cd09b6ac249d007d (diff)
downloadexternal_webkit-1198b35477e381f4af724f65d426996ea16716de.zip
external_webkit-1198b35477e381f4af724f65d426996ea16716de.tar.gz
external_webkit-1198b35477e381f4af724f65d426996ea16716de.tar.bz2
Merge webkit.org at r54127 : Merge conflicts due to longpress and doubletap touchevents
Keep ours as this code has not yet been upstreamed. Change-Id: Ia05ab6c8c36b2d332fec2fe4c16ceacff2933382
Diffstat (limited to 'WebCore')
-rw-r--r--WebCore/dom/EventNames.h3
-rw-r--r--WebCore/dom/TouchEvent.cpp3
-rw-r--r--WebCore/dom/TouchEvent.h6
-rw-r--r--WebCore/page/EventHandler.cpp38
-rw-r--r--WebCore/platform/PlatformTouchEvent.h3
5 files changed, 2 insertions, 51 deletions
diff --git a/WebCore/dom/EventNames.h b/WebCore/dom/EventNames.h
index 4a0a042..b20eaa8 100644
--- a/WebCore/dom/EventNames.h
+++ b/WebCore/dom/EventNames.h
@@ -150,15 +150,12 @@ namespace WebCore {
macro(touchmove) \
macro(touchend) \
macro(touchcancel) \
-<<<<<<< HEAD
/* #if PLATFORM(ANDROID) */ \
macro(touchlongpress) \
macro(touchdoubletap) \
/* #endif */ \
-=======
\
macro(success) \
->>>>>>> webkit.org at r54127
\
// end of DOM_EVENT_NAMES_FOR_EACH
diff --git a/WebCore/dom/TouchEvent.cpp b/WebCore/dom/TouchEvent.cpp
index f06efb6..1fbba6c 100644
--- a/WebCore/dom/TouchEvent.cpp
+++ b/WebCore/dom/TouchEvent.cpp
@@ -40,13 +40,10 @@ TouchEvent::TouchEvent(TouchList* touches, TouchList* targetTouches,
, m_touches(touches)
, m_targetTouches(targetTouches)
, m_changedTouches(changedTouches)
-<<<<<<< HEAD
#if PLATFORM(ANDROID)
, m_longPressPrevented(false)
, m_doubleTapPrevented(false)
#endif
-=======
->>>>>>> webkit.org at r54127
{
}
diff --git a/WebCore/dom/TouchEvent.h b/WebCore/dom/TouchEvent.h
index 263dc36..abc1ee2 100644
--- a/WebCore/dom/TouchEvent.h
+++ b/WebCore/dom/TouchEvent.h
@@ -60,7 +60,6 @@ public:
TouchList* targetTouches() const { return m_targetTouches.get(); }
TouchList* changedTouches() const { return m_changedTouches.get(); }
-<<<<<<< HEAD
#if PLATFORM(ANDROID)
bool longPressPrevented() const { return m_longPressPrevented; }
void preventLongPress() { m_longPressPrevented = true; }
@@ -71,8 +70,6 @@ public:
void setDoubleTapPrevented(bool prevented) { m_doubleTapPrevented = prevented; }
#endif
-=======
->>>>>>> webkit.org at r54127
private:
TouchEvent() {}
TouchEvent(TouchList* touches, TouchList* targetTouches,
@@ -86,14 +83,11 @@ private:
RefPtr<TouchList> m_touches;
RefPtr<TouchList> m_targetTouches;
RefPtr<TouchList> m_changedTouches;
-<<<<<<< HEAD
#if PLATFORM(ANDROID)
bool m_longPressPrevented;
bool m_doubleTapPrevented;
#endif
-=======
->>>>>>> webkit.org at r54127
};
} // namespace WebCore
diff --git a/WebCore/page/EventHandler.cpp b/WebCore/page/EventHandler.cpp
index 26d7261..d68dccf 100644
--- a/WebCore/page/EventHandler.cpp
+++ b/WebCore/page/EventHandler.cpp
@@ -2598,20 +2598,12 @@ bool EventHandler::handleTouchEvent(const PlatformTouchEvent& event)
int adjustedPageX = lroundf(pagePoint.x() / m_frame->pageZoomFactor());
int adjustedPageY = lroundf(pagePoint.y() / m_frame->pageZoomFactor());
-<<<<<<< HEAD
if ((event.type() == TouchStart
#if PLATFORM(ANDROID)
|| event.type() == TouchDoubleTap
|| event.type() == TouchLongPress
#endif
) && !i) {
-=======
- RefPtr<Touch> touch = Touch::create(doc->frame(), target, point.id(),
- point.screenPos().x(), point.screenPos().y(),
- adjustedPageX, adjustedPageY);
-
- if (event.type() == TouchStart && !i) {
->>>>>>> webkit.org at r54127
m_touchEventTarget = target;
m_firstTouchScreenPos = point.screenPos();
m_firstTouchPagePos = pagePoint;
@@ -2651,7 +2643,6 @@ bool EventHandler::handleTouchEvent(const PlatformTouchEvent& event)
return false;
#endif
-<<<<<<< HEAD
bool defaultPrevented = false;
#if PLATFORM(ANDROID)
// TODO (benm): We should be able to remove this prior to upstreaming once Java side refactorings to make
@@ -2659,9 +2650,6 @@ bool EventHandler::handleTouchEvent(const PlatformTouchEvent& event)
bool longPressPrevented = false;
bool doubleTapPrevented = false;
#endif
-=======
- bool defaultPrevented = false;
->>>>>>> webkit.org at r54127
if (event.type() == TouchCancel) {
eventName = &eventNames().touchcancelEvent;
@@ -2697,6 +2685,8 @@ bool EventHandler::handleTouchEvent(const PlatformTouchEvent& event)
#if PLATFORM(ANDROID)
endEv->setCreateTime(static_cast<DOMTimeStamp>(event.eventTime()));
#endif
+=======
+>>>>>>> webkit.org at r54127
ExceptionCode ec = 0;
m_touchEventTarget->dispatchEvent(endEv.get(), ec);
#if PLATFORM(ANDROID)
@@ -2704,11 +2694,6 @@ bool EventHandler::handleTouchEvent(const PlatformTouchEvent& event)
#else
defaultPrevented = endEv->defaultPrevented();
#endif
-=======
- ExceptionCode ec = 0;
- m_touchEventTarget->dispatchEvent(endEv.get(), ec);
- defaultPrevented = endEv->defaultPrevented();
->>>>>>> webkit.org at r54127
}
if (pressedTouches->length() > 0) {
// Add pressed touchpoints to touches and targetTouches
@@ -2718,7 +2703,6 @@ bool EventHandler::handleTouchEvent(const PlatformTouchEvent& event)
targetTouches->append(pressedTouches->item(i));
}
-<<<<<<< HEAD
#if PLATFORM(ANDROID)
if (event.type() == TouchLongPress) {
eventName = &eventNames().touchlongpressEvent;
@@ -2771,20 +2755,6 @@ bool EventHandler::handleTouchEvent(const PlatformTouchEvent& event)
#endif
}
-=======
- eventName = &eventNames().touchstartEvent;
- RefPtr<TouchEvent> startEv =
- TouchEvent::create(touches.get(), targetTouches.get(), pressedTouches.get(),
- *eventName, m_touchEventTarget->document()->defaultView(),
- m_firstTouchScreenPos.x(), m_firstTouchScreenPos.y(),
- m_firstTouchPagePos.x(), m_firstTouchPagePos.y(),
- event.ctrlKey(), event.altKey(), event.shiftKey(),
- event.metaKey());
- ExceptionCode ec = 0;
- m_touchEventTarget->dispatchEvent(startEv.get(), ec);
- defaultPrevented |= startEv->defaultPrevented();
- }
->>>>>>> webkit.org at r54127
if (movedTouches->length() > 0) {
eventName = &eventNames().touchmoveEvent;
RefPtr<TouchEvent> moveEv =
@@ -2808,7 +2778,6 @@ bool EventHandler::handleTouchEvent(const PlatformTouchEvent& event)
if (event.type() == TouchEnd || event.type() == TouchCancel)
m_touchEventTarget = 0;
-<<<<<<< HEAD
#if PLATFORM(ANDROID)
// TODO (benm): We should be able to remove this prior to upstreaming once Java side refactorings to make
// preventDefault work better are complete.
@@ -2821,9 +2790,6 @@ bool EventHandler::handleTouchEvent(const PlatformTouchEvent& event)
#else
return defaultPrevented;
#endif
-=======
- return defaultPrevented;
->>>>>>> webkit.org at r54127
}
#endif
diff --git a/WebCore/platform/PlatformTouchEvent.h b/WebCore/platform/PlatformTouchEvent.h
index 263dee0..d72855b 100644
--- a/WebCore/platform/PlatformTouchEvent.h
+++ b/WebCore/platform/PlatformTouchEvent.h
@@ -42,13 +42,10 @@ enum TouchEventType {
, TouchMove
, TouchEnd
, TouchCancel
-<<<<<<< HEAD
#if PLATFORM(ANDROID)
, TouchLongPress
, TouchDoubleTap
#endif
-=======
->>>>>>> webkit.org at r54127
};
class PlatformTouchEvent {