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

commit-queue at webkit.org commit-queue at webkit.org
Wed Dec 22 17:47:44 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit b71f95c4b5231f2ddafaeb5b1c397cae6ef745c2
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Nov 30 15:14:29 2010 +0000

    2010-11-30  John Knottenbelt  <jknotten at chromium.org>
    
            Reviewed by David Levin.
    
            V8 binding for DOMTimeStamp should be Number, not Date
            https://bugs.webkit.org/show_bug.cgi?id=49963
    
            * fast/dom/domtimestamp-is-number-expected.txt: Added.
            * fast/dom/domtimestamp-is-number.html: Added.
            * fast/dom/script-tests/domtimestamp-is-number.js: Added.
            (do_check):
    2010-11-30  John Knottenbelt  <jknotten at chromium.org>
    
            Reviewed by David Levin.
    
            V8 binding for DOMTimeStamp should be Number, not Date
            https://bugs.webkit.org/show_bug.cgi?id=49963
    
            Test: fast/dom/domtimestamp-is-number.html
    
            * bindings/scripts/CodeGeneratorV8.pm:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72912 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index ae932e7..521aefc 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,15 @@
+2010-11-30  John Knottenbelt  <jknotten at chromium.org>
+
+        Reviewed by David Levin.
+
+        V8 binding for DOMTimeStamp should be Number, not Date
+        https://bugs.webkit.org/show_bug.cgi?id=49963
+
+        * fast/dom/domtimestamp-is-number-expected.txt: Added.
+        * fast/dom/domtimestamp-is-number.html: Added.
+        * fast/dom/script-tests/domtimestamp-is-number.js: Added.
+        (do_check):
+
 2010-11-30  Adam Roben  <aroben at apple.com>
 
         Update mac-wk2 Skipped file and add some bug numbers to other Skipped
diff --git a/LayoutTests/fast/dom/domtimestamp-is-number-expected.txt b/LayoutTests/fast/dom/domtimestamp-is-number-expected.txt
new file mode 100644
index 0000000..b415a0d
--- /dev/null
+++ b/LayoutTests/fast/dom/domtimestamp-is-number-expected.txt
@@ -0,0 +1,11 @@
+This tests that DOMTimeStamp is a Number (and not a Date object).
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS timestamp instanceof Date is false
+PASS timestamp == Number(timestamp) is true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/fast/dom/domtimestamp-is-number.html b/LayoutTests/fast/dom/domtimestamp-is-number.html
new file mode 100644
index 0000000..e5c67ae
--- /dev/null
+++ b/LayoutTests/fast/dom/domtimestamp-is-number.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 onload="do_check(event)">
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/domtimestamp-is-number.js"></script>
+<script src="../js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/fast/dom/script-tests/domtimestamp-is-number.js b/LayoutTests/fast/dom/script-tests/domtimestamp-is-number.js
new file mode 100644
index 0000000..88669cc
--- /dev/null
+++ b/LayoutTests/fast/dom/script-tests/domtimestamp-is-number.js
@@ -0,0 +1,14 @@
+description("This tests that DOMTimeStamp is a Number (and not a Date object).");
+// See https://bugs.webkit.org/show_bug.cgi?id=49963
+
+var timestamp = null;
+
+function do_check(e) {
+  timestamp = e.timeStamp;
+  shouldBeFalse("timestamp instanceof Date");
+  shouldBeTrue("timestamp == Number(timestamp)");
+  finishJSTest();
+}
+
+window.successfullyParsed = true;
+window.jsTestIsAsync = true;
\ No newline at end of file
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 0c912b0..1317767 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,14 @@
+2010-11-30  John Knottenbelt  <jknotten at chromium.org>
+
+        Reviewed by David Levin.
+
+        V8 binding for DOMTimeStamp should be Number, not Date
+        https://bugs.webkit.org/show_bug.cgi?id=49963
+
+        Test: fast/dom/domtimestamp-is-number.html
+
+        * bindings/scripts/CodeGeneratorV8.pm:
+
 2010-11-30  Renata Hodovan  <reni at inf.u-szeged.hu>
 
         Reviewed by Andreas Kling.
diff --git a/WebCore/bindings/scripts/CodeGeneratorV8.pm b/WebCore/bindings/scripts/CodeGeneratorV8.pm
index b0091bd..3a54b91 100644
--- a/WebCore/bindings/scripts/CodeGeneratorV8.pm
+++ b/WebCore/bindings/scripts/CodeGeneratorV8.pm
@@ -3088,7 +3088,6 @@ sub ReturnNativeToJSValue
     my $indent = shift;
     my $type = GetTypeFromSignature($signature);
 
-    return "return v8::Date::New(static_cast<double>($value))" if $type eq "DOMTimeStamp";
     return "return v8Boolean($value)" if $type eq "boolean";
     return "return v8::Handle<v8::Value>()" if $type eq "void";     # equivalent to v8::Undefined()
 
@@ -3100,7 +3099,7 @@ sub ReturnNativeToJSValue
 
     return "return v8DateOrNull($value)" if $type eq "Date";
     # long long and unsigned long long are not representable in ECMAScript.
-    return "return v8::Number::New(static_cast<double>($value))" if $type eq "long long" or $type eq "unsigned long long";
+    return "return v8::Number::New(static_cast<double>($value))" if $type eq "long long" or $type eq "unsigned long long" or $type eq "DOMTimeStamp";
     return "return v8::Number::New($value)" if $codeGenerator->IsPrimitiveType($type) or $type eq "SVGPaintType";
     return "return $value.v8Value()" if $nativeType eq "ScriptValue";
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list