Title: [107148] trunk/Source/WebCore
Revision
107148
Author
[email protected]
Date
2012-02-08 16:21:20 -0800 (Wed, 08 Feb 2012)

Log Message

Remove [ConvertToString] from CodeGeneratorCPP.pm and rename
it to [ObjCImplementedAsUnsignedLong]
https://bugs.webkit.org/show_bug.cgi?id=78100

Reviewed by Eric Seidel.

Now [ConvertToString] is used by ObjC's HTMLElement.size only.
This patch removes [ConvertToString] code from CodeGeneratorCPP.pm,
and renames [ConvertToString] to [ObjCImplementedAsUnsignedLong].

No tests. No change in behavior.

* bindings/scripts/CodeGeneratorCPP.pm:
(GenerateImplementation):
* bindings/scripts/CodeGeneratorObjC.pm:
(GenerateImplementation):
* html/HTMLInputElement.idl: Removed FIXME comment, because the latest spec
says HTMLInputElement.size should be unsigned long.
(http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#the-input-element)

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (107147 => 107148)


--- trunk/Source/WebCore/ChangeLog	2012-02-09 00:10:04 UTC (rev 107147)
+++ trunk/Source/WebCore/ChangeLog	2012-02-09 00:21:20 UTC (rev 107148)
@@ -1,3 +1,25 @@
+2012-02-08  Kentaro Hara  <[email protected]>
+
+        Remove [ConvertToString] from CodeGeneratorCPP.pm and rename
+        it to [ObjCImplementedAsUnsignedLong]
+        https://bugs.webkit.org/show_bug.cgi?id=78100
+
+        Reviewed by Eric Seidel.
+
+        Now [ConvertToString] is used by ObjC's HTMLElement.size only.
+        This patch removes [ConvertToString] code from CodeGeneratorCPP.pm,
+        and renames [ConvertToString] to [ObjCImplementedAsUnsignedLong].
+
+        No tests. No change in behavior.
+
+        * bindings/scripts/CodeGeneratorCPP.pm:
+        (GenerateImplementation):
+        * bindings/scripts/CodeGeneratorObjC.pm:
+        (GenerateImplementation):
+        * html/HTMLInputElement.idl: Removed FIXME comment, because the latest spec
+        says HTMLInputElement.size should be unsigned long.
+        (http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#the-input-element)
+
 2012-02-08  Leo Yang  <[email protected]>
 
         REGRESSION(r84194): Build fails when turning on ENABLE_FILE_SYSTEM

Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorCPP.pm (107147 => 107148)


--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorCPP.pm	2012-02-09 00:10:04 UTC (rev 107147)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorCPP.pm	2012-02-09 00:21:20 UTC (rev 107148)
@@ -748,11 +748,6 @@
                 my $argName = "new" . ucfirst($attributeName);
                 my $arg = GetCPPTypeGetter($argName, $idlType);
 
-                # The definition of ConvertToString is flipped for the setter
-                if ($attribute->signature->extendedAttributes->{"ConvertToString"}) {
-                    $arg = "WTF::String($arg).toInt()";
-                }
-
                 my $attributeType = GetCPPType($attribute->signature->type, 1);
                 push(@implContent, "void $className\:\:$setterName($attributeType $argName)\n");
                 push(@implContent, "{\n");

Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorObjC.pm (107147 => 107148)


--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorObjC.pm	2012-02-09 00:10:04 UTC (rev 107147)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorObjC.pm	2012-02-09 00:21:20 UTC (rev 107148)
@@ -1257,7 +1257,7 @@
                     }
                 }
                 $implIncludes{"DOMPrivate.h"} = 1;
-            } elsif ($attribute->signature->extendedAttributes->{"ConvertToString"}) {
+            } elsif ($attribute->signature->extendedAttributes->{"ObjCImplementedAsUnsignedLong"}) {
                 $getterContentHead = "WTF::String::number(" . $getterContentHead;
                 $getterContentTail .= ")";
             } elsif ($idlType eq "Date") {
@@ -1384,8 +1384,8 @@
                 my $argName = "new" . ucfirst($attributeInterfaceName);
                 my $arg = GetObjCTypeGetter($argName, $idlType);
 
-                # The definition of ConvertToString is flipped for the setter
-                if ($attribute->signature->extendedAttributes->{"ConvertToString"}) {
+                # The definition of ObjCImplementedAsUnsignedLong is flipped for the setter
+                if ($attribute->signature->extendedAttributes->{"ObjCImplementedAsUnsignedLong"}) {
                     $arg = "WTF::String($arg).toInt()";
                 }
 

Modified: trunk/Source/WebCore/html/HTMLInputElement.idl (107147 => 107148)


--- trunk/Source/WebCore/html/HTMLInputElement.idl	2012-02-09 00:10:04 UTC (rev 107147)
+++ trunk/Source/WebCore/html/HTMLInputElement.idl	2012-02-09 00:21:20 UTC (rev 107148)
@@ -50,10 +50,9 @@
         attribute [Reflect] boolean readOnly;
         attribute [Reflect] boolean required;
 #if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C
-        attribute [ConvertToString] DOMString size; // DOM level 2 changed this to a long, but our existing API is a string
+        attribute [ObjCImplementedAsUnsignedLong] DOMString size; // DOM level 2 changed this to a long, but ObjC API is a string
 #else
-        // FIXME: The spec says this should be a long, not an unsigned long.
-        attribute unsigned long size; // Changed string -> long as part of DOM level 2
+        attribute unsigned long size; // Changed string -> long -> unsigned long
 #endif
         attribute [Reflect, URL] DOMString src;
         attribute [Reflect] DOMString step;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to