Changeset 109210 in webkit


Ignore:
Timestamp:
Feb 29, 2012 7:24:18 AM (12 years ago)
Author:
podivilov@chromium.org
Message:

Extended attributes list should go before 'static' and 'const' modifiers in IDLs.
https://bugs.webkit.org/show_bug.cgi?id=79807

Reviewed by Kentaro Hara.

No new tests. Generated code isn't changed.

  • bindings/scripts/IDLParser.pm:

(ParseInterface):

  • bindings/scripts/IDLStructure.pm:
  • bindings/scripts/test/TestObj.idl:
  • bindings/scripts/test/TestSupplemental.idl:
  • html/DOMURL.idl:
  • html/HTMLMediaElement.idl:
  • html/HTMLTrackElement.idl:
Location:
trunk/Source/WebCore
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r109204 r109210  
     12012-02-28  Pavel Podivilov  <podivilov@chromium.org>
     2
     3        Extended attributes list should go before 'static' and 'const' modifiers in IDLs.
     4        https://bugs.webkit.org/show_bug.cgi?id=79807
     5
     6        Reviewed by Kentaro Hara.
     7
     8        No new tests. Generated code isn't changed.
     9
     10        * bindings/scripts/IDLParser.pm:
     11        (ParseInterface):
     12        * bindings/scripts/IDLStructure.pm:
     13        * bindings/scripts/test/TestObj.idl:
     14        * bindings/scripts/test/TestSupplemental.idl:
     15        * html/DOMURL.idl:
     16        * html/HTMLMediaElement.idl:
     17        * html/HTMLTrackElement.idl:
     18
    1192012-02-28  Yury Semikhatsky  <yurys@chromium.org>
    220
  • trunk/Source/WebCore/bindings/scripts/IDLParser.pm

    r108322 r109210  
    327327
    328328        foreach my $line (@interfaceMethods) {
     329            next if $line =~ /^\s*$/;
    329330            if ($line =~ /\Wattribute\W/) {
    330331                $line =~ /$IDLStructure::interfaceAttributeSelector/;
     
    362363                @{$newDataNode->getterExceptions} = split(/,/, $getterException);
    363364                @{$newDataNode->setterExceptions} = split(/,/, $setterException);
    364             } elsif (($line !~ s/^\s*$//g) and ($line !~ /^\s*const/)) {
     365            } elsif ($line !~ /^\s*($IDLStructure::extendedAttributeSyntax )?const\s+/) {
    365366                $line =~ /$IDLStructure::interfaceMethodSelector/ or die "Parsing error!\nSource:\n$line\n)";
    366367
    367                 my $isStatic = defined($1);
    368                 my $methodExtendedAttributes = (defined($2) ? $2 : " "); chop($methodExtendedAttributes);
     368                my $methodExtendedAttributes = (defined($1) ? $1 : " "); chop($methodExtendedAttributes);
     369                my $isStatic = defined($2);
    369370                my $methodType = (defined($3) ? $3 : die("Parsing error!\nSource:\n$line\n)"));
    370371                my $methodName = (defined($4) ? $4 : die("Parsing error!\nSource:\n$line\n)"));
     
    394395                my $arrayRef = $dataNode->functions;
    395396                push(@$arrayRef, $newDataNode);
    396             } elsif ($line =~ /^\s*const/) {
     397            } else {
    397398                $line =~ /$IDLStructure::constantSelector/;
    398399                my $constExtendedAttributes = (defined($1) ? $1 : " "); chop($constExtendedAttributes);
  • trunk/Source/WebCore/bindings/scripts/IDLStructure.pm

    r101433 r109210  
    9797our $moduleSelector = 'module\s*(' . $idlId . '*)\s*{';
    9898our $moduleNSSelector = 'module\s*(' . $idlId . '*)\s*\[ns\s*(' . $idlIdNs . '*)\s*(' . $idlIdNs . '*)\]\s*;';
    99 our $constantSelector = 'const\s*(' . $extendedAttributeSyntax . ' )?' . $supportedTypes . '\s*(' . $idlType . '*)\s*=\s*(' . $constValue . ')';
     99our $constantSelector = '(' . $extendedAttributeSyntax . ' )?const\s+' . $supportedTypes . '\s*(' . $idlType . '*)\s*=\s*(' . $constValue . ')';
    100100our $raisesSelector = 'raises\s*\((' . $idlIdNsList . '*)\s*\)';
    101101our $getterRaisesSelector = '\bgetter\s+raises\s*\((' . $idlIdNsList . '*)\s*\)';
     
    105105
    106106our $interfaceSelector = 'interface\s*((?:' . $extendedAttributeSyntax . ' )?)(' . $idlIdNs . '*)\s*(?::(\s*[^{]*))?{([-a-zA-Z0-9_"=\s(),;:\[\]&\|]*)';
    107 our $interfaceMethodSelector = '\s*(static\s+)?((?:' . $extendedAttributeSyntax . ' )?)' . $supportedTypes . '\s*(' . $idlIdNs . '*)\s*\(\s*([a-zA-Z0-9:\s,=\[\]]*)';
     107our $interfaceMethodSelector = '\s*((?:' . $extendedAttributeSyntax . ' )?)(static\s+)?' . $supportedTypes . '\s*(' . $idlIdNs . '*)\s*\(\s*([a-zA-Z0-9:\s,=\[\]]*)';
    108108our $interfaceParameterSelector = '(in|out)\s*((?:' . $extendedAttributeSyntax . ' )?)' . $supportedTypes . '\s*(' . $idlIdNs . '*)';
    109109
  • trunk/Source/WebCore/bindings/scripts/test/TestObj.idl

    r108669 r109210  
    152152        attribute [Conditional=Condition1|Condition2] TestObjectCConstructor conditionalAttr6;
    153153
    154         const [Conditional=Condition1] unsigned short CONDITIONAL_CONST = 0;
     154        [Conditional=Condition1] const unsigned short CONDITIONAL_CONST = 0;
    155155
    156156#if defined(TESTING_V8) || defined(TESTING_JS)
     
    176176        // Static method with conditional on overloaded methods
    177177
    178         static [Conditional=Condition1] void overloadedMethod1(in long arg);
    179         static [Conditional=Condition1] void overloadedMethod1(in DOMString type);
     178        [Conditional=Condition1] static void overloadedMethod1(in long arg);
     179        [Conditional=Condition1] static void overloadedMethod1(in DOMString type);
    180180
    181181#if defined(TESTING_V8)
     
    235235        const unsigned short CONST_VALUE_13 = 0X20;
    236236        const unsigned short CONST_VALUE_14 = 0x1abc;
    237         const [Reflect=CONST_IMPL] unsigned short CONST_JAVASCRIPT = 15;
     237        [Reflect=CONST_IMPL] const unsigned short CONST_JAVASCRIPT = 15;
    238238    };
    239239}
  • trunk/Source/WebCore/bindings/scripts/test/TestSupplemental.idl

    r108757 r109210  
    4545
    4646        const unsigned short SUPPLEMENTALCONSTANT1 = 1;
    47         const [Reflect=CONST_IMPL] unsigned short SUPPLEMENTALCONSTANT2 = 2;
     47        [Reflect=CONST_IMPL] const unsigned short SUPPLEMENTALCONSTANT2 = 2;
    4848    };
    4949}
  • trunk/Source/WebCore/html/DOMURL.idl

    r107768 r109210  
    3434    ] DOMURL {
    3535#if defined(ENABLE_MEDIA_STREAM) && ENABLE_MEDIA_STREAM
    36         static [CallWith=ScriptExecutionContext,TreatReturnedNullStringAs=Undefined] DOMString createObjectURL(in MediaStream stream);
     36        [CallWith=ScriptExecutionContext,TreatReturnedNullStringAs=Undefined] static DOMString createObjectURL(in MediaStream stream);
    3737#endif
    38         static [CallWith=ScriptExecutionContext,TreatReturnedNullStringAs=Undefined] DOMString createObjectURL(in Blob blob);
    39         static [CallWith=ScriptExecutionContext] void revokeObjectURL(in DOMString url);
     38        [CallWith=ScriptExecutionContext,TreatReturnedNullStringAs=Undefined] static DOMString createObjectURL(in Blob blob);
     39        [CallWith=ScriptExecutionContext] static void revokeObjectURL(in DOMString url);
    4040    };
    4141}
  • trunk/Source/WebCore/html/HTMLMediaElement.idl

    r108305 r109210  
    100100
    101101    // Signals the end of stream.
    102     const [V8EnabledAtRuntime=webkitMediaSource] unsigned short EOS_NO_ERROR = 0; // End of stream reached w/o error.
    103     const [V8EnabledAtRuntime=webkitMediaSource] unsigned short EOS_NETWORK_ERR = 1; // A network error triggered end of stream.
    104     const [V8EnabledAtRuntime=webkitMediaSource] unsigned short EOS_DECODE_ERR = 2; // A decode error triggered end of stream.
     102    [V8EnabledAtRuntime=webkitMediaSource] const unsigned short EOS_NO_ERROR = 0; // End of stream reached w/o error.
     103    [V8EnabledAtRuntime=webkitMediaSource] const unsigned short EOS_NETWORK_ERR = 1; // A network error triggered end of stream.
     104    [V8EnabledAtRuntime=webkitMediaSource] const unsigned short EOS_DECODE_ERR = 2; // A decode error triggered end of stream.
    105105    [V8EnabledAtRuntime=webkitMediaSource] void webkitSourceEndOfStream(in unsigned short status) raises (DOMException);
    106106
    107107    // Indicates the current state of the media source.
    108     const [V8EnabledAtRuntime=webkitMediaSource] unsigned short SOURCE_CLOSED = 0;
    109     const [V8EnabledAtRuntime=webkitMediaSource] unsigned short SOURCE_OPEN = 1;
    110     const [V8EnabledAtRuntime=webkitMediaSource] unsigned short SOURCE_ENDED = 2;
     108    [V8EnabledAtRuntime=webkitMediaSource] const unsigned short SOURCE_CLOSED = 0;
     109    [V8EnabledAtRuntime=webkitMediaSource] const unsigned short SOURCE_OPEN = 1;
     110    [V8EnabledAtRuntime=webkitMediaSource] const unsigned short SOURCE_ENDED = 2;
    111111    readonly attribute [V8EnabledAtRuntime=webkitMediaSource] unsigned short webkitSourceState;
    112112#endif
  • trunk/Source/WebCore/html/HTMLTrackElement.idl

    r106666 r109210  
    3939        const unsigned short LOADED = 2;
    4040        // Reflect is used for ERROR because it conflicts with a windows define.
    41         const [Reflect=TRACK_ERROR] unsigned short ERROR = 3;
     41        [Reflect=TRACK_ERROR] const unsigned short ERROR = 3;
    4242        readonly attribute unsigned short readyState;
    4343
Note: See TracChangeset for help on using the changeset viewer.