[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

eric at webkit.org eric at webkit.org
Thu Apr 8 01:05:25 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit e0e1420f1c0d36eedb99dc0a7974c9923e75ade4
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Jan 14 10:03:34 2010 +0000

    2010-01-14  Ben Murdoch  <benm at google.com>
    
            Reviewed by Darin Adler.
    
            [Android] [Qt] The document.createEvent API does not support touch events.
            https://bugs.webkit.org/show_bug.cgi?id=33605
    
            * fast/events/script-tests/create-touch-event.js: Added. Ensures that document.createEvent("TouchEvent") can create a TouchEvent.
            * fast/events/touch/create-touch-event-expected.txt: Added.
            * fast/events/touch/create-touch-event.html: Added.
    2010-01-14  Ben Murdoch  <benm at google.com>
    
            Reviewed by Darin Adler.
    
            [Android] [Qt] The document.createEvent API does not support touch events.
            https://bugs.webkit.org/show_bug.cgi?id=33605
    
            Test: fast/events/touch/create-touch-event.html
    
            * dom/Document.cpp:
            (WebCore::Document::createEvent): add creation of a TouchEvent when the "TouchEvent" argument is supplied.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53250 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 7a38e4a..9813ab5 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,14 @@
+2010-01-14  Ben Murdoch  <benm at google.com>
+
+        Reviewed by Darin Adler.
+
+        [Android] [Qt] The document.createEvent API does not support touch events.
+        https://bugs.webkit.org/show_bug.cgi?id=33605
+
+        * fast/events/script-tests/create-touch-event.js: Added. Ensures that document.createEvent("TouchEvent") can create a TouchEvent.
+        * fast/events/touch/create-touch-event-expected.txt: Added.
+        * fast/events/touch/create-touch-event.html: Added.
+
 2010-01-14  Diego Gonzalez  <diego.gonzalez at openbossa.org>
 
         Reviewed by Kenneth Rohde Christiansen.
diff --git a/LayoutTests/fast/events/script-tests/create-touch-event.js b/LayoutTests/fast/events/script-tests/create-touch-event.js
new file mode 100644
index 0000000..78295d6
--- /dev/null
+++ b/LayoutTests/fast/events/script-tests/create-touch-event.js
@@ -0,0 +1,17 @@
+description = "This tests whether the DOM can create TouchEvents.";
+
+debug(description);
+
+var event = null;
+
+try
+{
+    event = document.createEvent("TouchEvent");
+    shouldBeNonNull("event");
+}
+catch (e)
+{
+    testFailed("An exception was thrown: " + e.message);
+}
+
+successfullyParsed = true;
diff --git a/LayoutTests/fast/events/touch/create-touch-event-expected.txt b/LayoutTests/fast/events/touch/create-touch-event-expected.txt
new file mode 100644
index 0000000..8dddc5c
--- /dev/null
+++ b/LayoutTests/fast/events/touch/create-touch-event-expected.txt
@@ -0,0 +1,6 @@
+This tests whether the DOM can create TouchEvents.
+PASS event is non-null.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/events/touch/create-touch-event.html b/LayoutTests/fast/events/touch/create-touch-event.html
new file mode 100644
index 0000000..9c8500b
--- /dev/null
+++ b/LayoutTests/fast/events/touch/create-touch-event.html
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../js/resources/js-test-style.css">
+<script src="../../js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="../script-tests/create-touch-event.js"></script>
+<script src="../../js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index cb20e68..37e89e9 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,15 @@
+2010-01-14  Ben Murdoch  <benm at google.com>
+
+        Reviewed by Darin Adler.
+
+        [Android] [Qt] The document.createEvent API does not support touch events.
+        https://bugs.webkit.org/show_bug.cgi?id=33605
+
+        Test: fast/events/touch/create-touch-event.html
+
+        * dom/Document.cpp:
+        (WebCore::Document::createEvent): add creation of a TouchEvent when the "TouchEvent" argument is supplied.
+
 2010-01-14  James Robinson  <jamesr at chromium.org>
 
         Reviewed by Alexey Proskuryakov.
diff --git a/WebCore/dom/Document.cpp b/WebCore/dom/Document.cpp
index df47e88..5c977ad 100644
--- a/WebCore/dom/Document.cpp
+++ b/WebCore/dom/Document.cpp
@@ -173,6 +173,10 @@
 #include "SVGStyleElement.h"
 #endif
 
+#if ENABLE(TOUCH_EVENTS)
+#include "TouchEvent.h"
+#endif
+
 #if ENABLE(WML)
 #include "WMLDocument.h"
 #include "WMLElement.h"
@@ -3012,6 +3016,10 @@ PassRefPtr<Event> Document::createEvent(const String& eventType, ExceptionCode&
     else if (eventType == "SVGZoomEvents")
         event = SVGZoomEvent::create();
 #endif
+#if ENABLE(TOUCH_EVENTS)
+    else if (eventType == "TouchEvent")
+        event = TouchEvent::create();
+#endif
     if (event) {
         event->setCreatedByDOM(true);
         return event.release();

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list