Source/JavaScriptCore: [chromium] Remove the enable marcro for the no longer necessary Chromium

gesture recognizer.
https://bugs.webkit.org/show_bug.cgi?id=77492

Patch by Robert Kroeger <rjkroege@chromium.org> on 2012-02-07
Reviewed by Adam Barth.

* wtf/Platform.h:

Source/WebCore: [chromium] Remove the no longer necessary Chromium gesture recognizer.
https://bugs.webkit.org/show_bug.cgi?id=77492

Patch by Robert Kroeger <rjkroege@chromium.org> on 2012-02-07
Reviewed by Adam Barth.

* WebCore.gypi:
* platform/PlatformGestureRecognizer.h: Removed.
* platform/chromium/FramelessScrollView.h:
(WebCore):
(FramelessScrollView):
* platform/chromium/GestureRecognizerChromium.cpp: Removed.
* platform/chromium/GestureRecognizerChromium.h: Removed.
* platform/chromium/PopupContainer.cpp:
(WebCore):
* platform/chromium/PopupContainer.h:
* platform/chromium/PopupListBox.cpp:
(WebCore):
* platform/chromium/PopupListBox.h:
(PopupListBox):

Source/WebKit: [chromium] Remove no longer necessary Chromium gesture recognizer code.
https://bugs.webkit.org/show_bug.cgi?id=77492

Patch by Robert Kroeger <rjkroege@chromium.org> on 2012-02-07
Reviewed by Adam Barth.

* blackberry/WebCoreSupport/AboutDataEnableFeatures.in:

Source/WebKit/chromium: [chromium] Remove no longer necessary Chromium gesture recognizer code.
https://bugs.webkit.org/show_bug.cgi?id=77492

Patch by Robert Kroeger <rjkroege@chromium.org> on 2012-02-07
Reviewed by Adam Barth.

* WebKit.gypi:
* features.gypi:
* src/WebFrameImpl.cpp:
(WebKit::WebFrameImpl::createFrameView):
* src/WebPopupMenuImpl.cpp:
(WebKit::WebPopupMenuImpl::WebPopupMenuImpl):
(WebKit::WebPopupMenuImpl::handleTouchEvent):
* src/WebPopupMenuImpl.h:
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::WebViewImpl):
(WebKit::WebViewImpl::touchEvent):
* src/WebViewImpl.h:
(WebCore):
(WebViewImpl):
* tests/InnerGestureRecognizerTest.cpp: Removed.

LayoutTests: [chromium] Remove unnecessary Chromium gesture recognizer tests.
https://bugs.webkit.org/show_bug.cgi?id=77492

Patch by Robert Kroeger <rjkroege@chromium.org> on 2012-02-07
Reviewed by Adam Barth.

* fast/events/touch/page-scaled-touch-gesture-click-expected.txt:
* fast/events/touch/page-scaled-touch-gesture-click.html:
* fast/events/touch/touch-gesture-click-expected.txt: Removed.
* fast/events/touch/touch-gesture-click.html: Removed.
* fast/events/touch/touch-gesture-scroll-expected.txt: Removed.
* fast/events/touch/touch-gesture-scroll.html: Removed.
* platform/chromium/fast/events/touch/touch-gesture-click-expected.txt: Removed.
* platform/chromium/fast/events/touch/touch-gesture-scroll-expected.txt: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@107036 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent acd07906
2012-02-07 Robert Kroeger <rjkroege@chromium.org>
[chromium] Remove unnecessary Chromium gesture recognizer tests.
https://bugs.webkit.org/show_bug.cgi?id=77492
Reviewed by Adam Barth.
* fast/events/touch/page-scaled-touch-gesture-click-expected.txt:
* fast/events/touch/page-scaled-touch-gesture-click.html:
* fast/events/touch/touch-gesture-click-expected.txt: Removed.
* fast/events/touch/touch-gesture-click.html: Removed.
* fast/events/touch/touch-gesture-scroll-expected.txt: Removed.
* fast/events/touch/touch-gesture-scroll.html: Removed.
* platform/chromium/fast/events/touch/touch-gesture-click-expected.txt: Removed.
* platform/chromium/fast/events/touch/touch-gesture-scroll-expected.txt: Removed.
2012-02-07 Erik Arvidsson <arv@chromium.org>
[V8] Allow bindings for attributes on DOM nodes to also set a named hidden reference
......@@ -3,34 +3,32 @@ This tests basic single touch gesture generation.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
have received: 1 touch events
have received: 2 touch events
PASS event.type is "mousemove"
PASS event.clientX is 20
PASS event.clientY is 24
PASS event.shiftKey is true
PASS event.altKey is true
PASS event.shiftKey is false
PASS event.altKey is false
PASS event.ctrlKey is false
PASS event.metaKey is false
PASS event.type is "mousedown"
PASS event.clientX is 20
PASS event.clientY is 24
PASS event.shiftKey is true
PASS event.altKey is true
PASS event.shiftKey is false
PASS event.altKey is false
PASS event.ctrlKey is false
PASS event.metaKey is false
PASS event.type is "mouseup"
PASS event.clientX is 20
PASS event.clientY is 24
PASS event.shiftKey is true
PASS event.altKey is true
PASS event.shiftKey is false
PASS event.altKey is false
PASS event.ctrlKey is false
PASS event.metaKey is false
PASS event.type is "click"
PASS event.clientX is 20
PASS event.clientY is 24
PASS event.shiftKey is true
PASS event.altKey is true
PASS event.shiftKey is false
PASS event.altKey is false
PASS event.ctrlKey is false
PASS event.metaKey is false
PASS successfullyParsed is true
......
......@@ -19,7 +19,6 @@
<script>
var clickEventsReceived = 0;
var expectedMouseEvents = 4;
var touchEventsReceived = 0;
var mouseEventsReceived = 0;
var eventTypes = [ 'mousemove', 'mousedown', 'mouseup', 'click' ];
......@@ -29,8 +28,8 @@ function gestureEventCallback(event)
shouldBeEqualToString('event.type', eventTypes[mouseEventsReceived]);
shouldBe('event.clientX', '20');
shouldBe('event.clientY', '24');
shouldBe("event.shiftKey", "true");
shouldBe("event.altKey", "true");
shouldBe("event.shiftKey", "false");
shouldBe("event.altKey", "false");
shouldBe("event.ctrlKey", "false");
shouldBe("event.metaKey", "false");
mouseEventsReceived++;
......@@ -54,24 +53,6 @@ function touchEventCallback(event) {
return true;
}
function singleTouchSequence()
{
eventSender.clearTouchPoints();
// Coordinates passed to eventSender.addTouchPoint are in screen pixels,
// relative to the top left of the window.
eventSender.addTouchPoint(10, 12);
eventSender.touchStart();
// Insert some delay. NB: this value depends on minClickDownTime,
// maxClickDownTime from GestureRecognizerChromium.cpp
eventSender.leapForward(20);
eventSender.setTouchModifier("shift", true);
eventSender.setTouchModifier("alt", true);
eventSender.releaseTouchPoint(0);
eventSender.touchEnd();
}
function endTest()
{
if (mouseEventsReceived < expectedMouseEvents) {
......@@ -93,9 +74,6 @@ function runTest() {
div.addEventListener("mouseup", gestureEventCallback, false);
div.addEventListener("mousemove", gestureEventCallback, false);
document.addEventListener("keydown", quitKeyToEndTest, false);
div.addEventListener("touchstart", touchEventCallback, false);
div.addEventListener("touchmove", touchEventCallback, false);
div.addEventListener("touchend", touchEventCallback, false);
if (window.layoutTestController)
layoutTestController.waitUntilDone();
......@@ -103,7 +81,7 @@ function runTest() {
if (window.eventSender) {
description("This tests basic single touch gesture generation.");
if (eventSender.clearTouchPoints) {
singleTouchSequence();
eventSender.gestureTap(10, 12);
eventSender.leapForward(10);
eventSender.keyDown(' ');
} else {
......
This tests basic single touch gesture generation.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Gesture manager not implemented on this platform.
PASS successfullyParsed is true
TEST COMPLETE
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../js/resources/js-test-pre.js"></script>
<style type="text/css">
#touchtarget {
width: 100px;
height: 100px;
background: blue;
}
</style>
</head>
<body onload="runTest();">
<div id="touchtarget">
<p id="description"></p>
<div id="console"></div>
<script>
var clickEventsReceived = 0;
var expectedMouseEvents = 4;
var touchEventsReceived = 0;
var mouseEventsReceived = 0;
var eventTypes = [ 'mousemove', 'mousedown', 'mouseup', 'click' ];
function gestureEventCallback(event)
{
if (window.eventSender) {
shouldBeEqualToString('event.type', eventTypes[mouseEventsReceived]);
shouldBe('event.clientX', '10');
shouldBe('event.clientY', '12');
shouldBe("event.shiftKey", "true");
shouldBe("event.altKey", "true");
shouldBe("event.ctrlKey", "false");
shouldBe("event.metaKey", "false");
mouseEventsReceived++;
} else {
debug(event.type);
debug(event.clientX);
debug(event.clientY);
}
}
// Because we may not have a gesture recognizer, we send a key press
// event to end the test without temporal flakiness.
function quitKeyToEndTest(event) {
endTest();
}
// Log that we still got the touch events.
function touchEventCallback(event) {
touchEventsReceived++;
debug('have received: ' + touchEventsReceived + ' touch events');
return true;
}
function singleTouchSequence()
{
eventSender.clearTouchPoints();
eventSender.addTouchPoint(10, 12);
eventSender.touchStart();
// Insert some delay. NB: this value depends on minClickDownTime,
// maxClickDownTime from GestureRecognizerChromium.cpp
eventSender.leapForward(20);
eventSender.setTouchModifier("shift", true);
eventSender.setTouchModifier("alt", true);
eventSender.releaseTouchPoint(0);
eventSender.touchEnd();
}
function endTest()
{
if (mouseEventsReceived < expectedMouseEvents) {
debug('Gesture manager not implemented on this platform.');
}
// Bail.
isSuccessfullyParsed();
layoutTestController.notifyDone();
}
function runTest() {
var div = document.getElementById('touchtarget');
div.addEventListener("mousedown", gestureEventCallback, false);
div.addEventListener("click", gestureEventCallback, false);
div.addEventListener("mouseup", gestureEventCallback, false);
div.addEventListener("mousemove", gestureEventCallback, false);
document.addEventListener("keydown", quitKeyToEndTest, false);
div.addEventListener("touchstart", touchEventCallback, false);
div.addEventListener("touchmove", touchEventCallback, false);
div.addEventListener("touchend", touchEventCallback, false);
if (window.layoutTestController)
layoutTestController.waitUntilDone();
if (window.eventSender) {
description("This tests basic single touch gesture generation.");
if (eventSender.clearTouchPoints) {
singleTouchSequence();
eventSender.leapForward(10);
eventSender.keyDown(' ');
} else {
endTest();
}
} else {
debug("This test requires DumpRenderTree. Tap on the blue rect to log.")
}
}
</script>
</body>
</html>
This tests scroll gesture generation from touch events. Square is (mostly) green on pass
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Gesture manager not implemented on this platform or broken
PASS successfullyParsed is true
TEST COMPLETE
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../js/resources/js-test-pre.js"></script>
<style type="text/css">
#touchtarget {
width: 100px;
height: 100px;
position: relative;
background: white;
}
#movingbox {
width: 100%;
height: 100%;
position: absolute;
word-wrap: break-word;
overflow-y: scroll;
overflow-x: scroll;
display: block;
}
#greenbox {
width: 100px;
height: 100px;
background: green;
padding: 0px;
margin: 0px;
}
#redbox {
width: 100px;
height: 100px;
background: red;
padding: 0px;
margin: 0px;
}
td {
padding: 0px;
}
</style>
</head>
<body style="margin:0" onload="runTest();">
<div id="touchtarget">
<div id="movingbox">
<table border="0" cellspacing="0px">
<tr>
<td><div id="redbox"></div></td>
<td><div id="greenbox"></div></td>
</tr>
<tr>
<td><div id="greenbox"></div></td>
<td><div id="greenbox"></div></td>
</tr>
</table>
</div>
</div>
<p id="description"></p>
<div id="console"></div>
<script type="text/javascript">
var movingdiv;
var expectedScrollsTotal = 2;
var scrollsOccurred = 0;
var scrollAmountX = ['90', '90'];
var scrollAmountY = ['0', '95'];
function checkScrollOffset()
{
movingdiv = document.getElementById('movingbox');
if (window.eventSender) {
shouldBe('movingdiv.scrollTop', scrollAmountY[scrollsOccurred]);
shouldBe('movingdiv.scrollLeft', scrollAmountX[scrollsOccurred]);
scrollsOccurred++;
}
if (scrollsOccurred == expectedScrollsTotal) {
// If we've got here, we've passed.
isSuccessfullyParsed();
if (window.layoutTestController)
layoutTestController.notifyDone();
} else {
secondTouchDragSequence();
}
}
function fingerUp(event)
{
if (!window.layoutTestController)
debug('moved: ' + event.currentTarget.scrollTop + ', ' + event.currentTarget.scrollLeft);
return true; // Want the default behaviour.
}
function firstTouchDragSequence()
{
debug("first gesture");
eventSender.clearTouchPoints();
eventSender.addTouchPoint(95, 12);
eventSender.touchStart();
// Scroll the div to the left.
eventSender.updateTouchPoint(0, 5, 12);
eventSender.touchMove();
eventSender.releaseTouchPoint(0);
eventSender.touchEnd();
// Wait for layout.
checkScrollOffset();
}
function secondTouchDragSequence()
{
debug("second gesture");
eventSender.clearTouchPoints();
eventSender.addTouchPoint(12, 97);
eventSender.touchStart();
// Scroll the rectangle down.
eventSender.updateTouchPoint(0, 12, 2);
eventSender.touchMove();
eventSender.releaseTouchPoint(0);
eventSender.touchEnd();
// Wait for layout.
checkScrollOffset();
}
function exitIfNecessary()
{
debug('Gesture manager not implemented on this platform or broken');
isSuccessfullyParsed();
if (window.layoutTestController)
layoutTestController.notifyDone();
}
if (window.layoutTestController)
layoutTestController.waitUntilDone();
function runTest()
{
var movingdiv = document.getElementById('movingbox');
if (window.eventSender) {
description('This tests scroll gesture generation from touch events. ' +
'Square is (mostly) green on pass');
if (eventSender.clearTouchPoints)
firstTouchDragSequence();
else
exitIfNecessary();
} else {
debug("This test requires DumpRenderTree. Touch scroll the red rect to log.");
movingdiv.addEventListener('touchend', fingerUp, false);
}
}
</script>
</body>
</html>
This tests basic single touch gesture generation.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
have received: 1 touch events
have received: 2 touch events
PASS event.type is "mousemove"
PASS event.clientX is 10
PASS event.clientY is 12
PASS event.shiftKey is true
PASS event.altKey is true
PASS event.ctrlKey is false
PASS event.metaKey is false
PASS event.type is "mousedown"
PASS event.clientX is 10
PASS event.clientY is 12
PASS event.shiftKey is true
PASS event.altKey is true
PASS event.ctrlKey is false
PASS event.metaKey is false
PASS event.type is "mouseup"
PASS event.clientX is 10
PASS event.clientY is 12
PASS event.shiftKey is true
PASS event.altKey is true
PASS event.ctrlKey is false
PASS event.metaKey is false
PASS event.type is "click"
PASS event.clientX is 10
PASS event.clientY is 12
PASS event.shiftKey is true
PASS event.altKey is true
PASS event.ctrlKey is false
PASS event.metaKey is false
PASS successfullyParsed is true
TEST COMPLETE
This tests scroll gesture generation from touch events. Square is (mostly) green on pass
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
first gesture
PASS movingdiv.scrollTop is 0
PASS movingdiv.scrollLeft is 90
second gesture
PASS movingdiv.scrollTop is 95
PASS movingdiv.scrollLeft is 90
PASS successfullyParsed is true
TEST COMPLETE
2012-02-07 Robert Kroeger <rjkroege@chromium.org>
[chromium] Remove the enable marcro for the no longer necessary Chromium
gesture recognizer.
https://bugs.webkit.org/show_bug.cgi?id=77492
Reviewed by Adam Barth.
* wtf/Platform.h:
2012-02-07 Tony Chang <tony@chromium.org>
merge DashboardSupportCSSPropertyNames.in into CSSPropertyNames.in
......@@ -859,10 +859,6 @@
#define ENABLE_GEOLOCATION 0
#endif
#if !defined(ENABLE_GESTURE_RECOGNIZER)
#define ENABLE_GESTURE_RECOGNIZER 0
#endif
#if !defined(ENABLE_VIEWPORT)
#define ENABLE_VIEWPORT 0
#endif
......
2012-02-07 Robert Kroeger <rjkroege@chromium.org>
[chromium] Remove the no longer necessary Chromium gesture recognizer.
https://bugs.webkit.org/show_bug.cgi?id=77492
Reviewed by Adam Barth.
* WebCore.gypi:
* platform/PlatformGestureRecognizer.h: Removed.
* platform/chromium/FramelessScrollView.h:
(WebCore):
(FramelessScrollView):
* platform/chromium/GestureRecognizerChromium.cpp: Removed.
* platform/chromium/GestureRecognizerChromium.h: Removed.
* platform/chromium/PopupContainer.cpp:
(WebCore):
* platform/chromium/PopupContainer.h:
* platform/chromium/PopupListBox.cpp:
(WebCore):
* platform/chromium/PopupListBox.h:
(PopupListBox):
2012-02-07 Erik Arvidsson <arv@chromium.org>
[V8] Allow bindings for attributes on DOM nodes to also set a named hidden reference
......@@ -276,7 +276,6 @@
'platform/PlatformEvent.cpp',
'platform/PlatformEvent.h',
'platform/PlatformGestureEvent.h',
'platform/PlatformGestureRecognizer.h',
'platform/PlatformKeyboardEvent.h',
'platform/PlatformMenuDescription.h',
'platform/PlatformMouseEvent.h',
......@@ -2908,8 +2907,6 @@
'platform/chromium/FramelessScrollView.h',
'platform/chromium/FramelessScrollViewClient.h',
'platform/chromium/GamepadsChromium.cpp',
'platform/chromium/GestureRecognizerChromium.cpp',
'platform/chromium/GestureRecognizerChromium.h',
'platform/chromium/HistogramSupportChromium.cpp',
'platform/chromium/KeyCodeConversion.h',
'platform/chromium/KeyCodeConversionAndroid.cpp',
......
/*
* Copyright (c) 2011, Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef PlatformGestureRecognizer_h
#define PlatformGestureRecognizer_h
#include "PlatformGestureEvent.h"
#include <wtf/PassOwnPtr.h>
#include <wtf/Vector.h>
namespace WebCore {
class EventHandler;
class PlatformTouchEvent;
class PlatformGestureRecognizer {
protected:
PlatformGestureRecognizer();
public:
static PassOwnPtr<PlatformGestureRecognizer> create();
virtual ~PlatformGestureRecognizer();
typedef PassOwnPtr<Vector<PlatformGestureEvent> > PassGestures;
// Invoked for each touch event and returns 0 or more resulting gestures.
virtual PassGestures processTouchEventForGestures(const PlatformTouchEvent&, bool defaultPrevented) = 0;
// Clears the GestureRecognizer to its initial state.
virtual void reset() = 0;
};
} // namespace WebCore
#endif // PlatformGestureRecognizer_h
......@@ -36,7 +36,7 @@
namespace WebCore {
class FramelessScrollViewClient;
#if ENABLE(GESTURE_RECOGNIZER)