⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 107148 in webkit


Ignore:
Timestamp:
Feb 8, 2012, 4:21:20 PM (15 years ago)
Author:
haraken@chromium.org
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)

Location:
trunk/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r107146 r107148  
     12012-02-08  Kentaro Hara  <haraken@chromium.org>
     2
     3        Remove [ConvertToString] from CodeGeneratorCPP.pm and rename
     4        it to [ObjCImplementedAsUnsignedLong]
     5        https://bugs.webkit.org/show_bug.cgi?id=78100
     6
     7        Reviewed by Eric Seidel.
     8
     9        Now [ConvertToString] is used by ObjC's HTMLElement.size only.
     10        This patch removes [ConvertToString] code from CodeGeneratorCPP.pm,
     11        and renames [ConvertToString] to [ObjCImplementedAsUnsignedLong].
     12
     13        No tests. No change in behavior.
     14
     15        * bindings/scripts/CodeGeneratorCPP.pm:
     16        (GenerateImplementation):
     17        * bindings/scripts/CodeGeneratorObjC.pm:
     18        (GenerateImplementation):
     19        * html/HTMLInputElement.idl: Removed FIXME comment, because the latest spec
     20        says HTMLInputElement.size should be unsigned long.
     21        (http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#the-input-element)
     22
    1232012-02-08  Leo Yang  <leo.yang@torchmobile.com.cn>
    224
  • trunk/Source/WebCore/bindings/scripts/CodeGeneratorCPP.pm

    r106698 r107148  
    749749                my $arg = GetCPPTypeGetter($argName, $idlType);
    750750
    751                 # The definition of ConvertToString is flipped for the setter
    752                 if ($attribute->signature->extendedAttributes->{"ConvertToString"}) {
    753                     $arg = "WTF::String($arg).toInt()";
    754                 }
    755 
    756751                my $attributeType = GetCPPType($attribute->signature->type, 1);
    757752                push(@implContent, "void $className\:\:$setterName($attributeType $argName)\n");
  • trunk/Source/WebCore/bindings/scripts/CodeGeneratorObjC.pm

    r106695 r107148  
    12581258                }
    12591259                $implIncludes{"DOMPrivate.h"} = 1;
    1260             } elsif ($attribute->signature->extendedAttributes->{"ConvertToString"}) {
     1260            } elsif ($attribute->signature->extendedAttributes->{"ObjCImplementedAsUnsignedLong"}) {
    12611261                $getterContentHead = "WTF::String::number(" . $getterContentHead;
    12621262                $getterContentTail .= ")";
     
    13851385                my $arg = GetObjCTypeGetter($argName, $idlType);
    13861386
    1387                 # The definition of ConvertToString is flipped for the setter
    1388                 if ($attribute->signature->extendedAttributes->{"ConvertToString"}) {
     1387                # The definition of ObjCImplementedAsUnsignedLong is flipped for the setter
     1388                if ($attribute->signature->extendedAttributes->{"ObjCImplementedAsUnsignedLong"}) {
    13891389                    $arg = "WTF::String($arg).toInt()";
    13901390                }
  • trunk/Source/WebCore/html/HTMLInputElement.idl

    r106776 r107148  
    5151        attribute [Reflect] boolean required;
    5252#if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C
    53         attribute [ConvertToString] DOMString size; // DOM level 2 changed this to a long, but our existing API is a string
     53        attribute [ObjCImplementedAsUnsignedLong] DOMString size; // DOM level 2 changed this to a long, but ObjC API is a string
    5454#else
    55         // FIXME: The spec says this should be a long, not an unsigned long.
    56         attribute unsigned long size; // Changed string -> long as part of DOM level 2
     55        attribute unsigned long size; // Changed string -> long -> unsigned long
    5756#endif
    5857        attribute [Reflect, URL] DOMString src;
Note: See TracChangeset for help on using the changeset viewer.