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

aestes at apple.com aestes at apple.com
Wed Dec 22 18:13:42 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit f5af0ce9953a6595c4fd4eb40544fe642a873cc6
Author: aestes at apple.com <aestes at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Dec 9 00:37:34 2010 +0000

    2010-12-08  Andy Estes  <aestes at apple.com>
    
            Reviewed by Darin Adler.
    
            Reflected unsigned attributes should be in the range [0, 2^31).
            https://bugs.webkit.org/show_bug.cgi?id=50472
    
            HTML5 says that unsigned reflected attributes should be in the range
            [0, 2^31). When a value isn't in this range, a default value (or 0)
            should be returned instead. Update the JS bindings code generator to
            ensure 0 is returned when a content attribute value falls outside of
            this range.
    
            Tests: bindings/scripts/test/TestObj.idl
                   fast/html/marquee-element.html
    
            * bindings/scripts/CodeGeneratorJS.pm: Return the maximum of 0 and the
            content attribute as a 32-bit signed int when converting a native value
            to an unsigned JS value.
            * bindings/scripts/test/TestObj.idl: Add a reflected unsigned attribute
            to test code generation.
            * bindings/scripts/test/CPP/WebDOMTestObj.cpp: Update test results.
            * bindings/scripts/test/CPP/WebDOMTestObj.h: Ditto.
            * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: Ditto.
            * bindings/scripts/test/GObject/WebKitDOMTestObj.h: Ditto.
            * bindings/scripts/test/JS/JSTestObj.cpp: Ditto.
            * bindings/scripts/test/JS/JSTestObj.h: Ditto.
            * bindings/scripts/test/ObjC/DOMTestObj.h: Ditto.
            * bindings/scripts/test/ObjC/DOMTestObj.mm: Ditto.
            * bindings/scripts/test/V8/V8TestObj.cpp: Ditto.
    2010-12-08  Andy Estes  <aestes at apple.com>
    
            Reviewed by Darin Adler.
    
            Reflected unsigned attributes should be in the range [0, 2^31).
            https://bugs.webkit.org/show_bug.cgi?id=50472
    
            * fast/html/marquee-element.html: Give hspace and vspace negative values
            and test what their corresponding IDL attributes reflect.
            * fast/html/marquee-element-expected.txt:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73564 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index bd0e622..25cd880 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,14 @@
+2010-12-08  Andy Estes  <aestes at apple.com>
+
+        Reviewed by Darin Adler.
+
+        Reflected unsigned attributes should be in the range [0, 2^31).
+        https://bugs.webkit.org/show_bug.cgi?id=50472
+
+        * fast/html/marquee-element.html: Give hspace and vspace negative values
+        and test what their corresponding IDL attributes reflect.
+        * fast/html/marquee-element-expected.txt:
+
 2010-12-08  Ryosuke Niwa  <rniwa at webkit.org>
 
         Unreviewed Chromium rebaseline for r73548.
diff --git a/LayoutTests/fast/html/marquee-element-expected.txt b/LayoutTests/fast/html/marquee-element-expected.txt
index 5fb2950..10299a1 100644
--- a/LayoutTests/fast/html/marquee-element-expected.txt
+++ b/LayoutTests/fast/html/marquee-element-expected.txt
@@ -23,6 +23,10 @@ PASS marquee.height is "200px"
 PASS marquee.hspace is 10
 "hspace" IDL attribute can be modified:
 PASS marquee.hspace is 20
+"hspace" IDL attribute is 0 when content attribute is negative:
+PASS marquee.hspace is 0
+"hspace" IDL attribute is 0 when content attribute is too large:
+PASS marquee.hspace is 0
 "loop" IDL attribute reflects content attribute:
 PASS marquee.loop is 3
 "loop" IDL attribute can be modified:
@@ -43,6 +47,10 @@ PASS marquee.trueSpeed is false
 PASS marquee.vspace is 10
 "vspace" IDL attribute can be modified:
 PASS marquee.vspace is 20
+"vspace" IDL attribute is 0 when content attribute is negative:
+PASS marquee.vspace is 0
+"vspace" IDL attribute is 0 when content attribute is too large:
+PASS marquee.vspace is 0
 Default "scrollAmount" value is 6:
 PASS marquee.scrollAmount is 6
 "scrollAmount" uses default value when content attribute is not a number:
diff --git a/LayoutTests/fast/html/marquee-element.html b/LayoutTests/fast/html/marquee-element.html
index 83f3a5f..69264ae 100644
--- a/LayoutTests/fast/html/marquee-element.html
+++ b/LayoutTests/fast/html/marquee-element.html
@@ -69,6 +69,16 @@ marquee = document.getElementById('marquee');
 marquee.hspace=20;
 shouldBe('marquee.hspace', '20');
 
+debug('"hspace" IDL attribute is 0 when content attribute is negative:');
+testParent.innerHTML = '<marquee id="marquee" hspace="-1">test</marquee>';
+marquee = document.getElementById('marquee');
+shouldBe('marquee.hspace', '0');
+
+debug('"hspace" IDL attribute is 0 when content attribute is too large:');
+testParent.innerHTML = '<marquee id="marquee" hspace="2147483648">test</marquee>';
+marquee = document.getElementById('marquee');
+shouldBe('marquee.hspace', '0');
+
 debug('"loop" IDL attribute reflects content attribute:');
 testParent.innerHTML = '<marquee id="marquee" loop="3">test</marquee>';
 marquee = document.getElementById('marquee');
@@ -124,6 +134,16 @@ marquee = document.getElementById('marquee');
 marquee.vspace=20;
 shouldBe('marquee.vspace', '20');
 
+debug('"vspace" IDL attribute is 0 when content attribute is negative:');
+testParent.innerHTML = '<marquee id="marquee" vspace="-1">test</marquee>';
+marquee = document.getElementById('marquee');
+shouldBe('marquee.vspace', '0');
+
+debug('"vspace" IDL attribute is 0 when content attribute is too large:');
+testParent.innerHTML = '<marquee id="marquee" vspace="2147483648">test</marquee>';
+marquee = document.getElementById('marquee');
+shouldBe('marquee.vspace', '0');
+
 debug('Default "scrollAmount" value is 6:');
 testParent.innerHTML = '<marquee id="marquee">test</marquee>';
 marquee = document.getElementById('marquee');
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index a23b514..de7f771 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,34 @@
+2010-12-08  Andy Estes  <aestes at apple.com>
+
+        Reviewed by Darin Adler.
+
+        Reflected unsigned attributes should be in the range [0, 2^31).
+        https://bugs.webkit.org/show_bug.cgi?id=50472
+
+        HTML5 says that unsigned reflected attributes should be in the range
+        [0, 2^31). When a value isn't in this range, a default value (or 0)
+        should be returned instead. Update the JS bindings code generator to
+        ensure 0 is returned when a content attribute value falls outside of
+        this range.
+
+        Tests: bindings/scripts/test/TestObj.idl
+               fast/html/marquee-element.html
+
+        * bindings/scripts/CodeGeneratorJS.pm: Return the maximum of 0 and the
+        content attribute as a 32-bit signed int when converting a native value
+        to an unsigned JS value.
+        * bindings/scripts/test/TestObj.idl: Add a reflected unsigned attribute
+        to test code generation.
+        * bindings/scripts/test/CPP/WebDOMTestObj.cpp: Update test results.
+        * bindings/scripts/test/CPP/WebDOMTestObj.h: Ditto.
+        * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: Ditto.
+        * bindings/scripts/test/GObject/WebKitDOMTestObj.h: Ditto.
+        * bindings/scripts/test/JS/JSTestObj.cpp: Ditto.
+        * bindings/scripts/test/JS/JSTestObj.h: Ditto.
+        * bindings/scripts/test/ObjC/DOMTestObj.h: Ditto.
+        * bindings/scripts/test/ObjC/DOMTestObj.mm: Ditto.
+        * bindings/scripts/test/V8/V8TestObj.cpp: Ditto.
+
 2010-12-08  Carlos Garcia Campos  <cgarcia at igalia.com>
 
         Reviewed by Martin Robinson.
diff --git a/WebCore/bindings/scripts/CodeGeneratorJS.pm b/WebCore/bindings/scripts/CodeGeneratorJS.pm
index 1ad55e4..132518f 100644
--- a/WebCore/bindings/scripts/CodeGeneratorJS.pm
+++ b/WebCore/bindings/scripts/CodeGeneratorJS.pm
@@ -2497,6 +2497,12 @@ sub NativeToJSValue
     if ($type eq "Date") {
         return "jsDateOrNull(exec, $value)";
     }
+
+    if ($signature->extendedAttributes->{"Reflect"} and ($type eq "unsigned long" or $type eq "unsigned short")) {
+        $value =~ s/getUnsignedIntegralAttribute/getIntegralAttribute/g;
+        return "jsNumber(std::max(0, " . $value . "))";
+    }
+
     if ($codeGenerator->IsPrimitiveType($type) or $type eq "SVGPaintType" or $type eq "DOMTimeStamp") {
         $implIncludes{"<runtime/JSNumberCell.h>"} = 1;
         return "jsNumber($value)";
diff --git a/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.cpp b/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.cpp
index 819c7cf..65e5bf3 100644
--- a/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.cpp
+++ b/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.cpp
@@ -281,6 +281,22 @@ void WebDOMTestObj::setReflectedIntegralAttr(int newReflectedIntegralAttr)
     impl()->setIntegralAttribute(WebCore::HTMLNames::reflectedintegralattrAttr, newReflectedIntegralAttr);
 }
 
+unsigned WebDOMTestObj::reflectedUnsignedIntegralAttr() const
+{
+    if (!impl())
+        return unsigned();
+
+    return impl()->getUnsignedIntegralAttribute(WebCore::HTMLNames::reflectedunsignedintegralattrAttr);
+}
+
+void WebDOMTestObj::setReflectedUnsignedIntegralAttr(unsigned newReflectedUnsignedIntegralAttr)
+{
+    if (!impl())
+        return;
+
+    impl()->setUnsignedIntegralAttribute(WebCore::HTMLNames::reflectedunsignedintegralattrAttr, newReflectedUnsignedIntegralAttr);
+}
+
 bool WebDOMTestObj::reflectedBooleanAttr() const
 {
     if (!impl())
diff --git a/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.h b/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.h
index 0b3593d..abbbf2f 100644
--- a/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.h
+++ b/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.h
@@ -83,6 +83,8 @@ public:
     void setReflectedStringAttr(const WebDOMString&);
     int reflectedIntegralAttr() const;
     void setReflectedIntegralAttr(int);
+    unsigned reflectedUnsignedIntegralAttr() const;
+    void setReflectedUnsignedIntegralAttr(unsigned);
     bool reflectedBooleanAttr() const;
     void setReflectedBooleanAttr(bool);
     WebDOMString reflectedURLAttr() const;
diff --git a/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp b/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp
index ea6eaee..6c94d94 100644
--- a/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp
+++ b/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp
@@ -665,6 +665,25 @@ webkit_dom_test_obj_set_reflected_integral_attr(WebKitDOMTestObj* self, glong va
     item->setIntegralAttribute(WebCore::HTMLNames::reflectedintegralattrAttr, value);
 }
 
+gulong
+webkit_dom_test_obj_get_reflected_unsigned_integral_attr(WebKitDOMTestObj* self)
+{
+    g_return_val_if_fail(self, 0);
+    WebCore::JSMainThreadNullState state;
+    WebCore::TestObj * item = WebKit::core(self);
+    gulong res = item->getUnsignedIntegralAttribute(WebCore::HTMLNames::reflectedunsignedintegralattrAttr);
+    return res;
+}
+
+void
+webkit_dom_test_obj_set_reflected_unsigned_integral_attr(WebKitDOMTestObj* self, gulong value)
+{
+    g_return_if_fail(self);
+    WebCore::JSMainThreadNullState state;
+    WebCore::TestObj * item = WebKit::core(self);
+    item->setUnsignedIntegralAttribute(WebCore::HTMLNames::reflectedunsignedintegralattrAttr, value);
+}
+
 gboolean
 webkit_dom_test_obj_get_reflected_boolean_attr(WebKitDOMTestObj* self)
 {
@@ -1094,6 +1113,7 @@ enum {
     PROP_CREATE,
     PROP_REFLECTED_STRING_ATTR,
     PROP_REFLECTED_INTEGRAL_ATTR,
+    PROP_REFLECTED_UNSIGNED_INTEGRAL_ATTR,
     PROP_REFLECTED_BOOLEAN_ATTR,
     PROP_REFLECTED_URL_ATTR,
     PROP_REFLECTED_NON_EMPTY_URL_ATTR,
@@ -1180,6 +1200,11 @@ static void webkit_dom_test_obj_set_property(GObject* object, guint prop_id, con
         coreSelf->setIntegralAttribute(WebCore::HTMLNames::reflectedintegralattrAttr, (g_value_get_long(value)));
         break;
     }
+    case PROP_REFLECTED_UNSIGNED_INTEGRAL_ATTR:
+    {
+        coreSelf->setUnsignedIntegralAttribute(WebCore::HTMLNames::reflectedunsignedintegralattrAttr, (g_value_get_ulong(value)));
+        break;
+    }
     case PROP_REFLECTED_BOOLEAN_ATTR:
     {
         coreSelf->setBooleanAttribute(WebCore::HTMLNames::reflectedbooleanattrAttr, (g_value_get_boolean(value)));
@@ -1356,6 +1381,11 @@ static void webkit_dom_test_obj_get_property(GObject* object, guint prop_id, GVa
         g_value_set_long(value, coreSelf->getIntegralAttribute(WebCore::HTMLNames::reflectedintegralattrAttr));
         break;
     }
+    case PROP_REFLECTED_UNSIGNED_INTEGRAL_ATTR:
+    {
+        g_value_set_ulong(value, coreSelf->getUnsignedIntegralAttribute(WebCore::HTMLNames::reflectedunsignedintegralattrAttr));
+        break;
+    }
     case PROP_REFLECTED_BOOLEAN_ATTR:
     {
         g_value_set_boolean(value, coreSelf->hasAttribute(WebCore::HTMLNames::reflectedbooleanattrAttr));
@@ -1594,6 +1624,15 @@ G_MAXLONG, /* max */
 0, /* default */
                                                            WEBKIT_PARAM_READWRITE));
     g_object_class_install_property(gobjectClass,
+                                    PROP_REFLECTED_UNSIGNED_INTEGRAL_ATTR,
+                                    g_param_spec_ulong("reflected-unsigned-integral-attr", /* name */
+                                                           "test_obj_reflected-unsigned-integral-attr", /* short description */
+                                                           "read-write  gulong TestObj.reflected-unsigned-integral-attr", /* longer - could do with some extra doc stuff here */
+                                                           0, /* min */
+G_MAXULONG, /* max */
+0, /* default */
+                                                           WEBKIT_PARAM_READWRITE));
+    g_object_class_install_property(gobjectClass,
                                     PROP_REFLECTED_BOOLEAN_ATTR,
                                     g_param_spec_boolean("reflected-boolean-attr", /* name */
                                                            "test_obj_reflected-boolean-attr", /* short description */
diff --git a/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h b/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h
index 42d1fcd..0416664 100644
--- a/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h
+++ b/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h
@@ -208,6 +208,12 @@ webkit_dom_test_obj_get_reflected_integral_attr(WebKitDOMTestObj* self);
 WEBKIT_API void
 webkit_dom_test_obj_set_reflected_integral_attr(WebKitDOMTestObj* self, glong value);
 
+WEBKIT_API gulong
+webkit_dom_test_obj_get_reflected_unsigned_integral_attr(WebKitDOMTestObj* self);
+
+WEBKIT_API void
+webkit_dom_test_obj_set_reflected_unsigned_integral_attr(WebKitDOMTestObj* self, gulong value);
+
 WEBKIT_API gboolean
 webkit_dom_test_obj_get_reflected_boolean_attr(WebKitDOMTestObj* self);
 
diff --git a/WebCore/bindings/scripts/test/JS/JSTestObj.cpp b/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
index 44efde1..c4c77ee 100644
--- a/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
+++ b/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
@@ -55,7 +55,7 @@ ASSERT_CLASS_FITS_IN_CELL(JSTestObj);
 #define THUNK_GENERATOR(generator)
 #endif
 
-static const HashTableValue JSTestObjTableValues[36] =
+static const HashTableValue JSTestObjTableValues[37] =
 {
     { "readOnlyIntAttr", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReadOnlyIntAttr), (intptr_t)0 THUNK_GENERATOR(0) },
     { "readOnlyStringAttr", DontDelete | ReadOnly, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReadOnlyStringAttr), (intptr_t)0 THUNK_GENERATOR(0) },
@@ -71,6 +71,7 @@ static const HashTableValue JSTestObjTableValues[36] =
     { "create", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjCreate), (intptr_t)setJSTestObjCreate THUNK_GENERATOR(0) },
     { "reflectedStringAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReflectedStringAttr), (intptr_t)setJSTestObjReflectedStringAttr THUNK_GENERATOR(0) },
     { "reflectedIntegralAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReflectedIntegralAttr), (intptr_t)setJSTestObjReflectedIntegralAttr THUNK_GENERATOR(0) },
+    { "reflectedUnsignedIntegralAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReflectedUnsignedIntegralAttr), (intptr_t)setJSTestObjReflectedUnsignedIntegralAttr THUNK_GENERATOR(0) },
     { "reflectedBooleanAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReflectedBooleanAttr), (intptr_t)setJSTestObjReflectedBooleanAttr THUNK_GENERATOR(0) },
     { "reflectedURLAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReflectedURLAttr), (intptr_t)setJSTestObjReflectedURLAttr THUNK_GENERATOR(0) },
     { "reflectedNonEmptyURLAttr", DontDelete, (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestObjReflectedNonEmptyURLAttr), (intptr_t)setJSTestObjReflectedNonEmptyURLAttr THUNK_GENERATOR(0) },
@@ -407,6 +408,15 @@ JSValue jsTestObjReflectedIntegralAttr(ExecState* exec, JSValue slotBase, const
     return result;
 }
 
+JSValue jsTestObjReflectedUnsignedIntegralAttr(ExecState* exec, JSValue slotBase, const Identifier&)
+{
+    JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(slotBase));
+    UNUSED_PARAM(exec);
+    TestObj* imp = static_cast<TestObj*>(castedThis->impl());
+    JSValue result = jsNumber(std::max(0, imp->getIntegralAttribute(WebCore::HTMLNames::reflectedunsignedintegralattrAttr)));
+    return result;
+}
+
 JSValue jsTestObjReflectedBooleanAttr(ExecState* exec, JSValue slotBase, const Identifier&)
 {
     JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(slotBase));
@@ -679,6 +689,13 @@ void setJSTestObjReflectedIntegralAttr(ExecState* exec, JSObject* thisObject, JS
     imp->setIntegralAttribute(WebCore::HTMLNames::reflectedintegralattrAttr, value.toInt32(exec));
 }
 
+void setJSTestObjReflectedUnsignedIntegralAttr(ExecState* exec, JSObject* thisObject, JSValue value)
+{
+    JSTestObj* castedThis = static_cast<JSTestObj*>(thisObject);
+    TestObj* imp = static_cast<TestObj*>(castedThis->impl());
+    imp->setUnsignedIntegralAttribute(WebCore::HTMLNames::reflectedunsignedintegralattrAttr, value.toUInt32(exec));
+}
+
 void setJSTestObjReflectedBooleanAttr(ExecState* exec, JSObject* thisObject, JSValue value)
 {
     JSTestObj* castedThis = static_cast<JSTestObj*>(thisObject);
diff --git a/WebCore/bindings/scripts/test/JS/JSTestObj.h b/WebCore/bindings/scripts/test/JS/JSTestObj.h
index c27444a..b8713ae 100644
--- a/WebCore/bindings/scripts/test/JS/JSTestObj.h
+++ b/WebCore/bindings/scripts/test/JS/JSTestObj.h
@@ -149,6 +149,8 @@ JSC::JSValue jsTestObjReflectedStringAttr(JSC::ExecState*, JSC::JSValue, const J
 void setJSTestObjReflectedStringAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
 JSC::JSValue jsTestObjReflectedIntegralAttr(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
 void setJSTestObjReflectedIntegralAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
+JSC::JSValue jsTestObjReflectedUnsignedIntegralAttr(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
+void setJSTestObjReflectedUnsignedIntegralAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
 JSC::JSValue jsTestObjReflectedBooleanAttr(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
 void setJSTestObjReflectedBooleanAttr(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
 JSC::JSValue jsTestObjReflectedURLAttr(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
diff --git a/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h b/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h
index 766d31f..c6ab368 100644
--- a/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h
+++ b/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h
@@ -75,6 +75,8 @@ enum {
 - (void)setReflectedStringAttr:(NSString *)newReflectedStringAttr;
 - (int)reflectedIntegralAttr;
 - (void)setReflectedIntegralAttr:(int)newReflectedIntegralAttr;
+- (unsigned)reflectedUnsignedIntegralAttr;
+- (void)setReflectedUnsignedIntegralAttr:(unsigned)newReflectedUnsignedIntegralAttr;
 - (BOOL)reflectedBooleanAttr;
 - (void)setReflectedBooleanAttr:(BOOL)newReflectedBooleanAttr;
 - (NSString *)reflectedURLAttr;
diff --git a/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm b/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm
index ac04235..f43f58a 100644
--- a/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm
+++ b/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm
@@ -230,6 +230,18 @@
     IMPL->setIntegralAttribute(WebCore::HTMLNames::reflectedintegralattrAttr, newReflectedIntegralAttr);
 }
 
+- (unsigned)reflectedUnsignedIntegralAttr
+{
+    WebCore::JSMainThreadNullState state;
+    return IMPL->getUnsignedIntegralAttribute(WebCore::HTMLNames::reflectedunsignedintegralattrAttr);
+}
+
+- (void)setReflectedUnsignedIntegralAttr:(unsigned)newReflectedUnsignedIntegralAttr
+{
+    WebCore::JSMainThreadNullState state;
+    IMPL->setUnsignedIntegralAttribute(WebCore::HTMLNames::reflectedunsignedintegralattrAttr, newReflectedUnsignedIntegralAttr);
+}
+
 - (BOOL)reflectedBooleanAttr
 {
     WebCore::JSMainThreadNullState state;
diff --git a/WebCore/bindings/scripts/test/TestObj.idl b/WebCore/bindings/scripts/test/TestObj.idl
index c0d0e88..a4eff26 100644
--- a/WebCore/bindings/scripts/test/TestObj.idl
+++ b/WebCore/bindings/scripts/test/TestObj.idl
@@ -51,6 +51,7 @@ module test {
         // Reflected DOM attributes
         attribute [Reflect] DOMString reflectedStringAttr;
         attribute [Reflect] long reflectedIntegralAttr;
+        attribute [Reflect] unsigned long reflectedUnsignedIntegralAttr;
         attribute [Reflect] boolean reflectedBooleanAttr;
         attribute [Reflect, URL] DOMString reflectedURLAttr;
         attribute [Reflect, NonEmpty, URL] DOMString reflectedNonEmptyURLAttr;
diff --git a/WebCore/bindings/scripts/test/V8/V8TestObj.cpp b/WebCore/bindings/scripts/test/V8/V8TestObj.cpp
index d4fdff5..7a759a3 100644
--- a/WebCore/bindings/scripts/test/V8/V8TestObj.cpp
+++ b/WebCore/bindings/scripts/test/V8/V8TestObj.cpp
@@ -256,6 +256,22 @@ static void reflectedIntegralAttrAttrSetter(v8::Local<v8::String> name, v8::Loca
     return;
 }
 
+static v8::Handle<v8::Value> reflectedUnsignedIntegralAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
+{
+    INC_STATS("DOM.TestObj.reflectedUnsignedIntegralAttr._get");
+    TestObj* imp = V8TestObj::toNative(info.Holder());
+    return v8::Integer::NewFromUnsigned(imp->getUnsignedIntegralAttribute(WebCore::HTMLNames::reflectedunsignedintegralattrAttr));
+}
+
+static void reflectedUnsignedIntegralAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
+{
+    INC_STATS("DOM.TestObj.reflectedUnsignedIntegralAttr._set");
+    TestObj* imp = V8TestObj::toNative(info.Holder());
+    unsigned v = toUInt32(value);
+    imp->setUnsignedIntegralAttribute(WebCore::HTMLNames::reflectedunsignedintegralattrAttr, v);
+    return;
+}
+
 static v8::Handle<v8::Value> reflectedBooleanAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 {
     INC_STATS("DOM.TestObj.reflectedBooleanAttr._get");
@@ -1163,6 +1179,8 @@ static const BatchedAttribute TestObjAttrs[] = {
     {"reflectedStringAttr", TestObjInternal::reflectedStringAttrAttrGetter, TestObjInternal::reflectedStringAttrAttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
     // Attribute 'reflectedIntegralAttr' (Type: 'attribute' ExtAttr: 'Reflect')
     {"reflectedIntegralAttr", TestObjInternal::reflectedIntegralAttrAttrGetter, TestObjInternal::reflectedIntegralAttrAttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
+    // Attribute 'reflectedUnsignedIntegralAttr' (Type: 'attribute' ExtAttr: 'Reflect')
+    {"reflectedUnsignedIntegralAttr", TestObjInternal::reflectedUnsignedIntegralAttrAttrGetter, TestObjInternal::reflectedUnsignedIntegralAttrAttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
     // Attribute 'reflectedBooleanAttr' (Type: 'attribute' ExtAttr: 'Reflect')
     {"reflectedBooleanAttr", TestObjInternal::reflectedBooleanAttrAttrGetter, TestObjInternal::reflectedBooleanAttrAttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
     // Attribute 'reflectedURLAttr' (Type: 'attribute' ExtAttr: 'URL Reflect')

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list