OSDN Git Service

Merge webkit.org at r54127 : Merge conflicts due to longpress and doubletap touchevents
authorSteve Block <steveblock@google.com>
Wed, 3 Feb 2010 19:21:02 +0000 (19:21 +0000)
committerSteve Block <steveblock@google.com>
Thu, 4 Feb 2010 15:07:00 +0000 (15:07 +0000)
Keep ours as this code has not yet been upstreamed.
Change-Id: Ia05ab6c8c36b2d332fec2fe4c16ceacff2933382

WebCore/dom/EventNames.h
WebCore/dom/TouchEvent.cpp
WebCore/dom/TouchEvent.h
WebCore/page/EventHandler.cpp
WebCore/platform/PlatformTouchEvent.h

index 4a0a042..b20eaa8 100644 (file)
@@ -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
 
index f06efb6..1fbba6c 100644 (file)
@@ -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
 {
 }
 
index 263dc36..abc1ee2 100644 (file)
@@ -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
index 26d7261..d68dccf 100644 (file)
@@ -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
 
index 263dee0..d72855b 100644 (file)
@@ -42,13 +42,10 @@ enum TouchEventType {
     , TouchMove
     , TouchEnd
     , TouchCancel
-<<<<<<< HEAD
 #if PLATFORM(ANDROID)
     , TouchLongPress
     , TouchDoubleTap
 #endif
-=======
->>>>>>> webkit.org at r54127
 };
 
 class PlatformTouchEvent {