Changeset 141551 in webkit


Ignore:
Timestamp:
Feb 1, 2013 12:44:24 AM (11 years ago)
Author:
commit-queue@webkit.org
Message:

[CPP,GObject,ObjC] Add 'static' skip to CodeGenerator{CPP,GObject,ObjC}.pm
https://bugs.webkit.org/show_bug.cgi?id=108578

Patch by Nils Barth <nbarth@google.com> on 2013-02-01
Reviewed by Kentaro Hara.

Since CPP/GObject/ObjC code generators (CodeGenerator{CPP,GObject,ObjC}.pm)
do not support static attributes, add test to skip these.
This lets us remove #if macro from static in test files and not need
these in future.

Test: bindings/scripts/test/TestObj.idl (run-bindings-test)
Test: bindings/scripts/test/TestSupplemental.idl (run-bindings-test)

  • bindings/scripts/CodeGeneratorCPP.pm:

(SkipAttribute):

  • bindings/scripts/CodeGeneratorGObject.pm:

(SkipAttribute):

  • bindings/scripts/CodeGeneratorObjC.pm:

(SkipAttribute):

  • bindings/scripts/test/TestObj.idl:
  • bindings/scripts/test/TestSupplemental.idl:
Location:
trunk/Source/WebCore
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r141548 r141551  
     12013-02-01  Nils Barth  <nbarth@google.com>
     2
     3        [CPP,GObject,ObjC] Add 'static' skip to CodeGenerator{CPP,GObject,ObjC}.pm
     4        https://bugs.webkit.org/show_bug.cgi?id=108578
     5
     6        Reviewed by Kentaro Hara.
     7
     8        Since CPP/GObject/ObjC code generators (CodeGenerator{CPP,GObject,ObjC}.pm)
     9        do not support static attributes, add test to skip these.
     10        This lets us remove #if macro from static in test files and not need
     11        these in future.
     12
     13        Test: bindings/scripts/test/TestObj.idl (run-bindings-test)
     14        Test: bindings/scripts/test/TestSupplemental.idl (run-bindings-test)
     15
     16        * bindings/scripts/CodeGeneratorCPP.pm:
     17        (SkipAttribute):
     18        * bindings/scripts/CodeGeneratorGObject.pm:
     19        (SkipAttribute):
     20        * bindings/scripts/CodeGeneratorObjC.pm:
     21        (SkipAttribute):
     22        * bindings/scripts/test/TestObj.idl:
     23        * bindings/scripts/test/TestSupplemental.idl:
     24
    1252013-02-01  Kentaro Hara  <haraken@chromium.org>
    226
  • trunk/Source/WebCore/bindings/scripts/CodeGeneratorCPP.pm

    r141541 r141551  
    206206
    207207    return 1 if $type =~ /Constructor$/;
    208 
     208    return 1 if $attribute->isStatic;
    209209    return 1 if $codeGenerator->IsTypedArrayType($type);
    210210
  • trunk/Source/WebCore/bindings/scripts/CodeGeneratorGObject.pm

    r141541 r141551  
    180180    }
    181181
     182    return 1 if $attribute->isStatic;
    182183    return 1 if $codeGenerator->IsTypedArrayType($propType);
    183184
  • trunk/Source/WebCore/bindings/scripts/CodeGeneratorObjC.pm

    r141541 r141551  
    453453    return 1 if $codeGenerator->IsTypedArrayType($type);
    454454    return 1 if $codeGenerator->IsEnumType($type);
     455    return 1 if $attribute->isStatic;
    455456
    456457    # This is for DynamicsCompressorNode.idl
  • trunk/Source/WebCore/bindings/scripts/test/TestObj.idl

    r141541 r141551  
    4141    readonly attribute DOMString       readOnlyStringAttr;
    4242    readonly attribute TestObj         readOnlyTestObjAttr;
    43 #if defined(TESTING_JS) || defined(TESTING_V8)
    4443    static readonly attribute long     staticReadOnlyLongAttr;
    4544    static attribute DOMString         staticStringAttr;
    4645    static readonly attribute TestSubObjConstructor TestSubObj;
    47 #endif
    4846    attribute TestEnumType             enumAttr;
    4947    attribute short                    shortAttr;
  • trunk/Source/WebCore/bindings/scripts/test/TestSupplemental.idl

    r131172 r141551  
    3333    Supplemental=TestInterface
    3434] interface TestSupplemental {
    35 #if defined(TESTING_JS) || defined(TESTING_V8)
    3635    static readonly attribute long supplementalStaticReadOnlyAttr;
    3736    static attribute DOMString supplementalStaticAttr;
    38 #endif
    3937    readonly attribute DOMString supplementalStr1;
    4038    attribute DOMString supplementalStr2;
Note: See TracChangeset for help on using the changeset viewer.