[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

commit-queue at webkit.org commit-queue at webkit.org
Wed Dec 22 14:43:46 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit eeed64be94f7323c26cfb2aafbe4f18f3ebecff6
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Oct 18 19:33:58 2010 +0000

    2010-10-18  Yongjun Zhang  <yongjun_zhang at apple.com>
    
            Reviewed by Darin Adler.
    
            Missing support for document.createEvent("OrientationEvent")
            https://bugs.webkit.org/show_bug.cgi?id=32492
    
            Add support for document.createEvent("OrientationEvent") to help unit testing of
            onOrientationChange event.
    
            * fast/dom/DeviceOrientation/create-event-onorientationchange-expected.txt: Added.
            * fast/dom/DeviceOrientation/create-event-onorientationchange.html: Added.
            * fast/dom/DeviceOrientation/script-tests/create-event-onorientationchange.js: Added.
    2010-10-18  Yongjun Zhang  <yongjun_zhang at apple.com>
    
            Reviewed by Darin Adler.
    
            Missing support for document.createEvent("OrientationEvent")
            https://bugs.webkit.org/show_bug.cgi?id=32492
    
            Add support for document.createEvent("OrientationEvent") to help unit testing of
            onOrientationChange event.
    
            Test: fast/dom/DeviceOrientation/create-event-onorientationchange.html
    
            * dom/Document.cpp:
            (WebCore::Document::createEvent):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69984 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 9fa6825..9afdfdc 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,17 @@
+2010-10-18  Yongjun Zhang  <yongjun_zhang at apple.com>
+
+        Reviewed by Darin Adler.
+
+        Missing support for document.createEvent("OrientationEvent")
+        https://bugs.webkit.org/show_bug.cgi?id=32492
+
+        Add support for document.createEvent("OrientationEvent") to help unit testing of
+        onOrientationChange event.
+
+        * fast/dom/DeviceOrientation/create-event-onorientationchange-expected.txt: Added.
+        * fast/dom/DeviceOrientation/create-event-onorientationchange.html: Added.
+        * fast/dom/DeviceOrientation/script-tests/create-event-onorientationchange.js: Added.
+
 2010-10-18  Jeremy Orlow  <jorlow at chromium.org>
 
         Reviewed by Darin Adler.
diff --git a/LayoutTests/fast/dom/DeviceOrientation/create-event-onorientationchange-expected.txt b/LayoutTests/fast/dom/DeviceOrientation/create-event-onorientationchange-expected.txt
new file mode 100644
index 0000000..0f0aac6
--- /dev/null
+++ b/LayoutTests/fast/dom/DeviceOrientation/create-event-onorientationchange-expected.txt
@@ -0,0 +1,16 @@
+Tests that document.createEvent() works with orientationChange
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+
+FAIL... orientationChange event doesn't appear to be enabled or implemented.
+
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
+
+
+
diff --git a/LayoutTests/fast/dom/DeviceOrientation/create-event-onorientationchange.html b/LayoutTests/fast/dom/DeviceOrientation/create-event-onorientationchange.html
new file mode 100644
index 0000000..7a033e0
--- /dev/null
+++ b/LayoutTests/fast/dom/DeviceOrientation/create-event-onorientationchange.html
@@ -0,0 +1,13 @@
+<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"></p>
+<div id="result"></div>
+<script src="script-tests/create-event-onorientationchange.js"></script>
+<script src="../../js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/fast/dom/DeviceOrientation/script-tests/create-event-onorientationchange.js b/LayoutTests/fast/dom/DeviceOrientation/script-tests/create-event-onorientationchange.js
new file mode 100644
index 0000000..a63685b
--- /dev/null
+++ b/LayoutTests/fast/dom/DeviceOrientation/script-tests/create-event-onorientationchange.js
@@ -0,0 +1,18 @@
+description('Tests that document.createEvent() works with orientationChange')
+
+function handleOrientationChange()
+{
+    document.getElementById('result').innerHTML = "PASS";
+}
+
+window.addEventListener('onorientationchange', handleOrientationChange, false);
+
+try {
+    var event = document.createEvent("OrientationEvent");
+    event.initEvent("orientationchange", false, false);
+    window.dispatchEvent(event);
+} catch(e) {
+    document.getElementById('result').innerHTML = "FAIL... orientationChange event doesn't appear to be enabled or implemented.";
+}
+
+window.successfullyParsed = true;
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 06c6fdf..f3b8cc1 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,18 @@
+2010-10-18  Yongjun Zhang  <yongjun_zhang at apple.com>
+
+        Reviewed by Darin Adler.
+
+        Missing support for document.createEvent("OrientationEvent")
+        https://bugs.webkit.org/show_bug.cgi?id=32492
+
+        Add support for document.createEvent("OrientationEvent") to help unit testing of
+        onOrientationChange event.
+
+        Test: fast/dom/DeviceOrientation/create-event-onorientationchange.html
+
+        * dom/Document.cpp:
+        (WebCore::Document::createEvent):
+
 2010-10-18  Jeremy Orlow  <jorlow at chromium.org>
 
         Reviewed by Darin Adler.
diff --git a/WebCore/dom/Document.cpp b/WebCore/dom/Document.cpp
index 99984b3..e8e2dce 100644
--- a/WebCore/dom/Document.cpp
+++ b/WebCore/dom/Document.cpp
@@ -3463,6 +3463,10 @@ PassRefPtr<Event> Document::createEvent(const String& eventType, ExceptionCode&
     else if (eventType == "DeviceOrientationEvent")
         event = DeviceOrientationEvent::create();
 #endif
+#if ENABLE(ORIENTATION_EVENTS)
+    else if (eventType == "OrientationEvent")
+        event = Event::create();
+#endif
     if (event)
         return event.release();
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list