[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.15.1-1414-gc69ee75

eric at webkit.org eric at webkit.org
Thu Oct 29 20:35:18 UTC 2009


The following commit has been merged in the webkit-1.1 branch:
commit 47d0673b58934787c45838d77372bf377cd2514d
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Sep 28 21:30:53 2009 +0000

    2009-09-28  Nate Chapin  <japhet at chromium.org>
    
            Reviewed by Dimitri Glazkov.
    
            Allow V8 to handle x/y parameters in a WebKitPoint constructor.
            https://bugs.webkit.org/show_bug.cgi?id=29823
    
            Fixes V8's handling of LayoutTests/fast/dom/Window/webkitConvertPoint.html
    
            * bindings/v8/custom/V8WebKitPointConstructor.cpp: Allow for x/y parameters in constructor.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48834 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 290be1b..bcce04a 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,14 @@
+2009-09-28  Nate Chapin  <japhet at chromium.org>
+
+        Reviewed by Dimitri Glazkov.
+
+        Allow V8 to handle x/y parameters in a WebKitPoint constructor.
+        https://bugs.webkit.org/show_bug.cgi?id=29823
+
+        Fixes V8's handling of LayoutTests/fast/dom/Window/webkitConvertPoint.html
+
+        * bindings/v8/custom/V8WebKitPointConstructor.cpp: Allow for x/y parameters in constructor.
+
 2009-09-28  Mark Rowe  <mrowe at apple.com>
 
         Fix the build by doing something approximating reasonableness in the Xcode project.
diff --git a/WebCore/bindings/v8/custom/V8WebKitPointConstructor.cpp b/WebCore/bindings/v8/custom/V8WebKitPointConstructor.cpp
index dd19a88..9ca4e16 100644
--- a/WebCore/bindings/v8/custom/V8WebKitPointConstructor.cpp
+++ b/WebCore/bindings/v8/custom/V8WebKitPointConstructor.cpp
@@ -30,17 +30,37 @@
 
 #include "config.h"
 
+#include "V8Binding.h"
 #include "V8CustomBinding.h"
+#include "V8DOMWrapper.h"
 #include "V8Index.h"
-#include "V8Proxy.h"
 #include "WebKitPoint.h"
 
+#include <wtf/MathExtras.h>
+
 namespace WebCore {
 
 CALLBACK_FUNC_DECL(WebKitPointConstructor)
 {
     INC_STATS("DOM.WebKitPoint.Constructor");
-    return V8Proxy::constructDOMObject<V8ClassIndex::WEBKITPOINT, WebKitPoint>(args);
+    float x = 0;
+    float y = 0;
+    if (args.Length() > 1) {
+        if (!args[0]->IsUndefined()) {
+            x = toFloat(args[0]);
+            if (isnan(x))
+                x = 0;
+        }
+        if (!args[1]->IsUndefined()) {
+            y = toFloat(args[1]);
+            if (isnan(y))
+                y = 0;
+        }
+    }
+    PassRefPtr<WebKitPoint> point = WebKitPoint::create(x, y);
+    point->ref();
+    V8DOMWrapper::setDOMWrapper(args.Holder(), V8ClassIndex::WEBKITPOINT, point.get());
+    return args.Holder();
 }
 
 } // namespace WebCore

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list