From 1198b35477e381f4af724f65d426996ea16716de Mon Sep 17 00:00:00 2001 From: Steve Block Date: Wed, 3 Feb 2010 19:21:02 +0000 Subject: [PATCH] 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 --- WebCore/dom/EventNames.h | 3 --- WebCore/dom/TouchEvent.cpp | 3 --- WebCore/dom/TouchEvent.h | 6 ------ WebCore/page/EventHandler.cpp | 38 ++--------------------------------- WebCore/platform/PlatformTouchEvent.h | 3 --- 5 files changed, 2 insertions(+), 51 deletions(-) diff --git a/WebCore/dom/EventNames.h b/WebCore/dom/EventNames.h index 4a0a04225..b20eaa8e1 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 f06efb6a7..1fbba6cb4 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 263dc36b7..abc1ee261 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 m_touches; RefPtr m_targetTouches; RefPtr 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 26d726114..d68dccf57 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::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(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 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 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 263dee05a..d72855b26 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 { -- 2.11.0