Diff
Modified: trunk/Source/WebCore/ChangeLog (117097 => 117098)
--- trunk/Source/WebCore/ChangeLog 2012-05-15 18:07:24 UTC (rev 117097)
+++ trunk/Source/WebCore/ChangeLog 2012-05-15 18:07:39 UTC (rev 117098)
@@ -1,3 +1,24 @@
+2012-05-15 Terry Anderson <[email protected]>
+
+ [chromium] Remove unused code for tap target fuzzing
+ https://bugs.webkit.org/show_bug.cgi?id=86252
+
+ Reviewed by Adam Barth.
+
+ No tests required since this is a cleanup of unused code.
+
+ * page/EventHandler.cpp:
+ (WebCore::EventHandler::handleGestureTap):
+ * page/EventHandler.h:
+ (EventHandler):
+ The touch adjustment code will be used to determine the best target
+ for a GestureTap event instead of passing in a pre-targeted node.
+ * platform/PlatformGestureEvent.h:
+ (WebCore::PlatformGestureEvent::PlatformGestureEvent):
+ (PlatformGestureEvent):
+ A rectangular touch region is defined by the touch center and the
+ delta values only, so gammaX and gammaY are not needed.
+
2012-05-15 Caio Marcelo de Oliveira Filho <[email protected]>
[Qt] WebKit with Qt5 hangs on Mac
Modified: trunk/Source/WebCore/page/EventHandler.cpp (117097 => 117098)
--- trunk/Source/WebCore/page/EventHandler.cpp 2012-05-15 18:07:24 UTC (rev 117097)
+++ trunk/Source/WebCore/page/EventHandler.cpp 2012-05-15 18:07:39 UTC (rev 117098)
@@ -2430,11 +2430,12 @@
return false;
}
-bool EventHandler::handleGestureTap(const PlatformGestureEvent& gestureEvent, Node* preTargetedNode)
+bool EventHandler::handleGestureTap(const PlatformGestureEvent& gestureEvent)
{
+ // FIXME: Refactor this code to not hit test multiple times.
IntPoint adjustedPoint = gestureEvent.position();
#if ENABLE(TOUCH_ADJUSTMENT)
- if (!gestureEvent.area().isEmpty() && !preTargetedNode) {
+ if (!gestureEvent.area().isEmpty()) {
Node* targetNode = 0;
// For now we use the adjusted position to ensure the later redundant hit-tests hits the right node.
bestClickableNodeForTouchPoint(gestureEvent.position(), IntSize(gestureEvent.area().width() / 2, gestureEvent.area().height() / 2), adjustedPoint, targetNode);
@@ -2442,9 +2443,6 @@
return false;
}
#endif
- // FIXME: Refactor to avoid hit testing multiple times (this is only an interim step).
- if (preTargetedNode)
- adjustedPoint = preTargetedNode->getPixelSnappedRect().center();
bool defaultPrevented = false;
PlatformMouseEvent fakeMouseMove(adjustedPoint, gestureEvent.globalPosition(), NoButton, PlatformEvent::MouseMoved, /* clickCount */ 1, gestureEvent.shiftKey(), gestureEvent.ctrlKey(), gestureEvent.altKey(), gestureEvent.metaKey(), gestureEvent.timestamp());
Modified: trunk/Source/WebCore/page/EventHandler.h (117097 => 117098)
--- trunk/Source/WebCore/page/EventHandler.h 2012-05-15 18:07:24 UTC (rev 117097)
+++ trunk/Source/WebCore/page/EventHandler.h 2012-05-15 18:07:39 UTC (rev 117098)
@@ -163,7 +163,7 @@
#if ENABLE(GESTURE_EVENTS)
bool handleGestureEvent(const PlatformGestureEvent&);
- bool handleGestureTap(const PlatformGestureEvent&, Node* preTargetedNode = 0);
+ bool handleGestureTap(const PlatformGestureEvent&);
bool handleGestureScrollUpdate(const PlatformGestureEvent&);
#endif
Modified: trunk/Source/WebCore/platform/PlatformGestureEvent.h (117097 => 117098)
--- trunk/Source/WebCore/platform/PlatformGestureEvent.h 2012-05-15 18:07:24 UTC (rev 117097)
+++ trunk/Source/WebCore/platform/PlatformGestureEvent.h 2012-05-15 18:07:39 UTC (rev 117098)
@@ -41,31 +41,25 @@
: PlatformEvent(PlatformEvent::GestureScrollBegin)
, m_deltaX(0)
, m_deltaY(0)
- , m_gammaX(0)
- , m_gammaY(0)
{
}
- PlatformGestureEvent(Type type, const IntPoint& position, const IntPoint& globalPosition, double timestamp, float deltaX, float deltaY, float gammaX, float gammaY, bool shiftKey, bool ctrlKey, bool altKey, bool metaKey)
+ PlatformGestureEvent(Type type, const IntPoint& position, const IntPoint& globalPosition, double timestamp, float deltaX, float deltaY, bool shiftKey, bool ctrlKey, bool altKey, bool metaKey)
: PlatformEvent(type, shiftKey, ctrlKey, altKey, metaKey, timestamp)
, m_position(position)
, m_globalPosition(globalPosition)
, m_deltaX(deltaX)
, m_deltaY(deltaY)
- , m_gammaX(gammaX)
- , m_gammaY(gammaY)
{
}
- PlatformGestureEvent(Type type, const IntPoint& position, const IntPoint& globalPosition, double timestamp, const IntSize& area, const FloatPoint& delta, const FloatPoint& gamma, bool shiftKey, bool ctrlKey, bool altKey, bool metaKey)
+ PlatformGestureEvent(Type type, const IntPoint& position, const IntPoint& globalPosition, double timestamp, const IntSize& area, const FloatPoint& delta, bool shiftKey, bool ctrlKey, bool altKey, bool metaKey)
: PlatformEvent(type, shiftKey, ctrlKey, altKey, metaKey, timestamp)
, m_position(position)
, m_globalPosition(globalPosition)
, m_area(area)
, m_deltaX(delta.x())
, m_deltaY(delta.y())
- , m_gammaX(gamma.x())
- , m_gammaY(gamma.y())
{
}
@@ -76,9 +70,6 @@
float deltaX() const { return m_deltaX; }
float deltaY() const { return m_deltaY; }
-
- float gammaX() const { return m_gammaX; }
- float gammaY() const { return m_gammaY; }
protected:
IntPoint m_position;
@@ -86,8 +77,6 @@
IntSize m_area;
float m_deltaX;
float m_deltaY;
- float m_gammaX;
- float m_gammaY;
};
} // namespace WebCore
Modified: trunk/Source/WebKit/chromium/ChangeLog (117097 => 117098)
--- trunk/Source/WebKit/chromium/ChangeLog 2012-05-15 18:07:24 UTC (rev 117097)
+++ trunk/Source/WebKit/chromium/ChangeLog 2012-05-15 18:07:39 UTC (rev 117098)
@@ -1,3 +1,20 @@
+2012-05-15 Terry Anderson <[email protected]>
+
+ [chromium] Remove unused code for tap target fuzzing
+ https://bugs.webkit.org/show_bug.cgi?id=86252
+
+ Reviewed by Adam Barth.
+
+ * public/WebInputEvent.h:
+ (WebGestureEvent):
+ (WebKit::WebGestureEvent::WebGestureEvent):
+ * src/WebInputEvent.cpp:
+ (SameSizeAsWebGestureEvent):
+ * src/WebInputEventConversion.cpp:
+ (WebKit::PlatformGestureEventBuilder::PlatformGestureEventBuilder):
+ A rectangular touch region is defined by the touch center and the
+ delta values only, so gammaX and gammaY are not needed.
+
2012-05-15 Hans Wennborg <[email protected]>
Speech _javascript_ API: Introduce error code enum in Chromium plumbing
Modified: trunk/Source/WebKit/chromium/public/WebInputEvent.h (117097 => 117098)
--- trunk/Source/WebKit/chromium/public/WebInputEvent.h 2012-05-15 18:07:24 UTC (rev 117097)
+++ trunk/Source/WebKit/chromium/public/WebInputEvent.h 2012-05-15 18:07:39 UTC (rev 117098)
@@ -359,11 +359,9 @@
int globalX;
int globalY;
- // NOTE: |deltaX| and |deltaY| represents the amount to scroll for Scroll gesture events. For Pinch gesture events, |deltaX| represents the scaling/magnification factor. For Tap and Press events, |deltaX|,|deltaY| and |gammaX|,|gammaY| correspond to the top left and bottom right corners of the ellipse's enlosing rectangle for tap target fuzzing.
+ // NOTE: |deltaX| and |deltaY| represents the amount to scroll for Scroll gesture events. For Pinch gesture events, |deltaX| represents the scaling/magnification factor. For a GestureTap event, |deltaX| and |deltaY| represent the horizontal and vertical radii of the touch region.
float deltaX;
float deltaY;
- float gammaX;
- float gammaY;
WebGestureEvent(unsigned sizeParam = sizeof(WebGestureEvent))
: WebInputEvent(sizeParam)
@@ -373,8 +371,6 @@
, globalY(0)
, deltaX(0.0f)
, deltaY(0.0f)
- , gammaX(0.0f)
- , gammaY(0.0f)
{
}
};
Modified: trunk/Source/WebKit/chromium/src/WebInputEvent.cpp (117097 => 117098)
--- trunk/Source/WebKit/chromium/src/WebInputEvent.cpp 2012-05-15 18:07:24 UTC (rev 117097)
+++ trunk/Source/WebKit/chromium/src/WebInputEvent.cpp 2012-05-15 18:07:39 UTC (rev 117098)
@@ -60,7 +60,7 @@
};
class SameSizeAsWebGestureEvent : public SameSizeAsWebInputEvent {
- int gestureData[8];
+ int gestureData[6];
};
class SameSizeAsWebTouchEvent : public SameSizeAsWebInputEvent {
Modified: trunk/Source/WebKit/chromium/src/WebInputEventConversion.cpp (117097 => 117098)
--- trunk/Source/WebKit/chromium/src/WebInputEventConversion.cpp 2012-05-15 18:07:24 UTC (rev 117097)
+++ trunk/Source/WebKit/chromium/src/WebInputEventConversion.cpp 2012-05-15 18:07:39 UTC (rev 117098)
@@ -174,8 +174,6 @@
m_globalPosition = IntPoint(e.globalX, e.globalY);
m_deltaX = e.deltaX;
m_deltaY = e.deltaY;
- m_gammaX = e.gammaX;
- m_gammaY = e.gammaY;
m_timestamp = e.timeStampSeconds;
m_modifiers = 0;