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

tkent at chromium.org tkent at chromium.org
Wed Dec 22 12:49:49 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 76651f6a7ecd8db7dcdb91e4c6ce661c6ade4f36
Author: tkent at chromium.org <tkent at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Aug 31 08:10:21 2010 +0000

    [V8] Custom binding for "dataset"
    https://bugs.webkit.org/show_bug.cgi?id=44930
    
    Reviewed by Adam Barth.
    
    WebCore:
    
    * WebCore.gyp/WebCore.gyp: Remove the exclusion of DOMStringMap.idl.
    * WebCore.gypi: Add V8DOMStringMapCustom.cpp.
    * bindings/v8/custom/V8DOMStringMapCustom.cpp: Added.
    (WebCore::V8DOMStringMap::namedPropertyQuery):
    (WebCore::V8DOMStringMap::namedPropertyGetter):
    (WebCore::V8DOMStringMap::namedPropertyEnumerator):
    (WebCore::V8DOMStringMap::namedPropertyDeleter):
    (WebCore::V8DOMStringMap::namedPropertySetter):
    * dom/Element.idl: Remove V8 exclusion.
    * page/DOMWindow.idl: ditto.
    
    LayoutTests:
    
    * platform/chromium/test_expectations.txt:
     Remove dataset.html and dataset-xhtml.xhtml.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66467 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 01c004f..475671c 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,13 @@
+2010-08-31  Kent Tamura  <tkent at chromium.org>
+
+        Reviewed by Adam Barth.
+
+        [V8] Custom binding for "dataset"
+        https://bugs.webkit.org/show_bug.cgi?id=44930
+
+        * platform/chromium/test_expectations.txt:
+         Remove dataset.html and dataset-xhtml.xhtml.
+
 2010-08-31  Jian Li  <jianli at chromium.org>
 
         Update chromium test result.
diff --git a/LayoutTests/platform/chromium/test_expectations.txt b/LayoutTests/platform/chromium/test_expectations.txt
index 6771bf8..710b564 100644
--- a/LayoutTests/platform/chromium/test_expectations.txt
+++ b/LayoutTests/platform/chromium/test_expectations.txt
@@ -2764,10 +2764,6 @@ BUGWK41311 WIN LINUX : fast/borders/borderRadiusDouble07.html = IMAGE
 BUGWK41311 WIN LINUX : fast/borders/borderRadiusDouble08.html = IMAGE
 BUGWK41311 WIN LINUX : fast/borders/borderRadiusDouble09.html = IMAGE
 
-// v8 bindings for dataset need to be implemented.
-BUG48133 :  fast/dom/dataset-xhtml.xhtml = TEXT
-BUG48133 :  fast/dom/dataset.html = TEXT
-
 // Flaky tests.
 BUG44345 LINUX : svg/zoom/text/zoom-hixie-mixed-009.xml = IMAGE PASS
 BUG44346 LINUX : svg/zoom/page/zoom-hixie-mixed-009.xml = IMAGE PASS
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 0b5c8e2..9c0bb61 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,21 @@
+2010-08-31  Kent Tamura  <tkent at chromium.org>
+
+        Reviewed by Adam Barth.
+
+        [V8] Custom binding for "dataset"
+        https://bugs.webkit.org/show_bug.cgi?id=44930
+
+        * WebCore.gyp/WebCore.gyp: Remove the exclusion of DOMStringMap.idl.
+        * WebCore.gypi: Add V8DOMStringMapCustom.cpp.
+        * bindings/v8/custom/V8DOMStringMapCustom.cpp: Added.
+        (WebCore::V8DOMStringMap::namedPropertyQuery):
+        (WebCore::V8DOMStringMap::namedPropertyGetter):
+        (WebCore::V8DOMStringMap::namedPropertyEnumerator):
+        (WebCore::V8DOMStringMap::namedPropertyDeleter):
+        (WebCore::V8DOMStringMap::namedPropertySetter):
+        * dom/Element.idl: Remove V8 exclusion.
+        * page/DOMWindow.idl: ditto.
+
 2010-08-31  Jian Li  <jianli at chromium.org>
 
         Fix chromium build break.
diff --git a/WebCore/WebCore.gyp/WebCore.gyp b/WebCore/WebCore.gyp/WebCore.gyp
index 3891283..595034e 100644
--- a/WebCore/WebCore.gyp/WebCore.gyp
+++ b/WebCore/WebCore.gyp/WebCore.gyp
@@ -206,8 +206,6 @@
       # FIXME: I don't know why these are excluded, either.
       # Someone (me?) should figure it out and add appropriate comments.
       '../css/CSSUnknownRule.idl',
-
-      '../dom/DOMStringMap.idl',
     ],
 
     'conditions': [
diff --git a/WebCore/WebCore.gypi b/WebCore/WebCore.gypi
index 20437fd..ea7e032 100644
--- a/WebCore/WebCore.gypi
+++ b/WebCore/WebCore.gypi
@@ -754,6 +754,7 @@
             'bindings/v8/custom/V8DeviceOrientationEventCustom.cpp',
             'bindings/v8/custom/V8DocumentLocationCustom.cpp',
             'bindings/v8/custom/V8DOMFormDataCustom.cpp',
+            'bindings/v8/custom/V8DOMStringMapCustom.cpp',
             'bindings/v8/custom/V8DOMWindowCustom.cpp',
             'bindings/v8/custom/V8DocumentCustom.cpp',
             'bindings/v8/custom/V8ElementCustom.cpp',
diff --git a/WebCore/bindings/v8/custom/V8DOMStringMapCustom.cpp b/WebCore/bindings/v8/custom/V8DOMStringMapCustom.cpp
new file mode 100644
index 0000000..7ca18ab
--- /dev/null
+++ b/WebCore/bindings/v8/custom/V8DOMStringMapCustom.cpp
@@ -0,0 +1,96 @@
+/*
+ * Copyright (C) 2010 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.
+ */
+
+#include "config.h"
+#include "V8DOMStringMap.h"
+
+#include "DOMStringMap.h"
+#include "V8Binding.h"
+
+namespace WebCore {
+
+v8::Handle<v8::Integer> V8DOMStringMap::namedPropertyQuery(v8::Local<v8::String> name, const v8::AccessorInfo& info)
+{
+    INC_STATS("DOM.DOMStringMap.NamedPropertyQuery");
+    if (V8DOMStringMap::toNative(info.Holder())->contains(toWebCoreString(name)))
+        return v8::Integer::New(v8::None);
+    return v8::Handle<v8::Integer>();
+}
+
+v8::Handle<v8::Value> V8DOMStringMap::namedPropertyGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
+{
+    INC_STATS("DOM.DOMStringMap.NamedPropertyGetter");
+    return v8String(V8DOMStringMap::toNative(info.Holder())->item(toWebCoreString(name)));
+}
+
+v8::Handle<v8::Array> V8DOMStringMap::namedPropertyEnumerator(const v8::AccessorInfo& info)
+{
+    INC_STATS("DOM.DOMStringMap.NamedPropertyEnumerator");
+    Vector<String> names;
+    V8DOMStringMap::toNative(info.Holder())->getNames(names);
+    v8::Handle<v8::Array> properties = v8::Array::New(names.size());
+    for (unsigned i = 0; i < names.size(); ++i)
+        properties->Set(v8::Integer::New(i), v8String(names[i]));
+    return properties;
+}
+
+v8::Handle<v8::Boolean> V8DOMStringMap::namedPropertyDeleter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
+{
+    INC_STATS("DOM.DOMStringMap.NamedPropertyDeleter");
+    v8::Handle<v8::Value> value = info.Holder()->GetRealNamedPropertyInPrototypeChain(name);
+    if (!value.IsEmpty())
+        return v8::False();
+    if (info.Holder()->HasRealNamedCallbackProperty(name))
+        return v8::False();
+
+    ExceptionCode ec = 0;
+    V8DOMStringMap::toNative(info.Holder())->deleteItem(toWebCoreString(name), ec);
+    if (ec)
+        throwError(ec);
+    return v8::True();
+}
+
+v8::Handle<v8::Value> V8DOMStringMap::namedPropertySetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
+{
+    INC_STATS("DOM.DOMStringMap.NamedPropertySetter");
+    v8::Handle<v8::Value> property = info.Holder()->GetRealNamedPropertyInPrototypeChain(name);
+    if (!property.IsEmpty())
+        return value;
+    if (info.Holder()->HasRealNamedCallbackProperty(name))
+        return value;
+
+    ExceptionCode ec = 0;
+    V8DOMStringMap::toNative(info.Holder())->setItem(toWebCoreString(name), toWebCoreString(value), ec);
+    if (ec)
+        return throwError(ec);
+    return value;
+}
+
+} // namespace WebCore
diff --git a/WebCore/dom/Element.idl b/WebCore/dom/Element.idl
index 0141313..2b62a1a 100644
--- a/WebCore/dom/Element.idl
+++ b/WebCore/dom/Element.idl
@@ -100,10 +100,8 @@ module core {
         NodeList getElementsByClassName(in DOMString name);
 
 #if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT
-#if !defined(V8_BINDING) || !V8_BINDING
         readonly attribute DOMStringMap dataset;
 #endif
-#endif
 
         // NodeSelector - Selector API
         Element querySelector(in DOMString selectors)
diff --git a/WebCore/page/DOMWindow.idl b/WebCore/page/DOMWindow.idl
index 960fcf6..84c2108 100644
--- a/WebCore/page/DOMWindow.idl
+++ b/WebCore/page/DOMWindow.idl
@@ -464,9 +464,7 @@ module window {
         attribute [Conditional=3D_CANVAS,EnabledAtRuntime] WebGLRenderingContextConstructor WebGLRenderingContext;
         attribute TextMetricsConstructor TextMetrics;
 
-#if !defined(V8_BINDING) || !V8_BINDING
         attribute DOMStringMapConstructor DOMStringMap;
-#endif
 
         attribute [JSCCustomGetter,Conditional=3D_CANVAS,EnabledAtRuntime] ArrayBufferConstructor ArrayBuffer; // Usable with new operator
         attribute [JSCCustomGetter,Conditional=3D_CANVAS,EnabledAtRuntime] Int8ArrayConstructor Int8Array; // Usable with new operator

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list