Remove GestureEvent leftovers from WebCore

<https://webkit.org/b/122780>

Patch by Nick Diego Yamane <nick.yamane@openbossa.org> on 2013-10-14
Reviewed by Anders Carlsson.

- Removed some remaining references to PlatformGestureEvent, supposed to
  be removed by r157316
- TOUCH_ADJUSTMENT should be reworked after GestureEvent feature
  removal

* page/EventHandler.cpp:
(WebCore::EventHandler::bestZoomableAreaForTouchPoint):
* page/EventHandler.h:
* platform/PlatformEvent.h:
* platform/ScrollAnimatorNone.cpp:
* platform/ScrollableArea.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157428 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 39909569
2013-10-14 Nick Diego Yamane <nick.yamane@openbossa.org>
Remove GestureEvent leftovers from WebCore
<https://webkit.org/b/122780>
Reviewed by Anders Carlsson.
- Removed some remaining references to PlatformGestureEvent, supposed to
be removed by r157316
- TOUCH_ADJUSTMENT should be reworked after GestureEvent feature
removal
* page/EventHandler.cpp:
(WebCore::EventHandler::bestZoomableAreaForTouchPoint):
* page/EventHandler.h:
* platform/PlatformEvent.h:
* platform/ScrollAnimatorNone.cpp:
* platform/ScrollableArea.h:
2013-10-14 Nick Diego Yamane <nick.yamane@openbossa.org>
Build fix after r157366
......
......@@ -2566,14 +2566,6 @@ void EventHandler::defaultWheelEventHandler(Node* startNode, WheelEvent* wheelEv
}
#if ENABLE(TOUCH_ADJUSTMENT)
bool EventHandler::shouldApplyTouchAdjustment(const PlatformGestureEvent& event) const
{
if (!m_frame.settings().touchAdjustmentEnabled())
return false;
return !event.area().isEmpty();
}
bool EventHandler::bestClickableNodeForTouchPoint(const IntPoint& touchCenter, const IntSize& touchRadius, IntPoint& targetPoint, Node*& targetNode)
{
IntPoint hitTestPoint = m_frame.view()->windowToContents(touchCenter);
......@@ -2608,29 +2600,6 @@ bool EventHandler::bestZoomableAreaForTouchPoint(const IntPoint& touchCenter, co
IntRect touchRect(touchCenter - touchRadius, touchRadius + touchRadius);
return findBestZoomableArea(targetNode, targetArea, touchCenter, touchRect, result.rectBasedTestResult());
}
bool EventHandler::adjustGesturePosition(const PlatformGestureEvent& gestureEvent, IntPoint& adjustedPoint)
{
if (!shouldApplyTouchAdjustment(gestureEvent))
return false;
Node* targetNode = 0;
switch (gestureEvent.type()) {
case PlatformEvent::GestureTap:
case PlatformEvent::GestureTapDown:
bestClickableNodeForTouchPoint(gestureEvent.position(), IntSize(gestureEvent.area().width() / 2, gestureEvent.area().height() / 2), adjustedPoint, targetNode);
break;
case PlatformEvent::GestureLongPress:
case PlatformEvent::GestureLongTap:
case PlatformEvent::GestureTwoFingerTap:
bestContextMenuNodeForTouchPoint(gestureEvent.position(), IntSize(gestureEvent.area().width() / 2, gestureEvent.area().height() / 2), adjustedPoint, targetNode);
break;
default:
// FIXME: Implement handling for other types as needed.
ASSERT_NOT_REACHED();
}
return targetNode;
}
#endif
#if ENABLE(CONTEXT_MENUS)
......
......@@ -176,13 +176,9 @@ public:
bool handlePasteGlobalSelection(const PlatformMouseEvent&);
#if ENABLE(TOUCH_ADJUSTMENT)
bool shouldApplyTouchAdjustment(const PlatformGestureEvent&) const;
bool bestClickableNodeForTouchPoint(const IntPoint& touchCenter, const IntSize& touchRadius, IntPoint& targetPoint, Node*& targetNode);
bool bestContextMenuNodeForTouchPoint(const IntPoint& touchCenter, const IntSize& touchRadius, IntPoint& targetPoint, Node*& targetNode);
bool bestZoomableAreaForTouchPoint(const IntPoint& touchCenter, const IntSize& touchRadius, IntRect& targetArea, Node*& targetNode);
bool adjustGesturePosition(const PlatformGestureEvent&, IntPoint& adjustedPoint);
#endif
#if ENABLE(CONTEXT_MENUS)
......
......@@ -48,18 +48,6 @@ public:
// PlatformWheelEvent
Wheel,
// PlatformGestureEvent
GestureScrollBegin,
GestureScrollEnd,
GestureScrollUpdate,
GestureScrollUpdateWithoutPropagation,
GestureTap,
GestureTapDown,
GestureTapDownCancel,
GestureTwoFingerTap,
GestureLongPress,
GestureLongTap,
#if ENABLE(TOUCH_EVENTS)
// PlatformTouchEvent
TouchStart,
......
......@@ -42,10 +42,6 @@
#include <wtf/CurrentTime.h>
#include <wtf/PassOwnPtr.h>
#if ENABLE(GESTURE_EVENTS)
#include "PlatformGestureEvent.h"
#endif
using namespace std;
namespace WebCore {
......
......@@ -33,7 +33,6 @@ namespace WebCore {
class FloatPoint;
class GraphicsContext;
class PlatformGestureEvent;
class PlatformWheelEvent;
class ScrollAnimator;
#if USE(ACCELERATED_COMPOSITING)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment