Diff
Modified: trunk/Source/WebCore/ChangeLog (109209 => 109210)
--- trunk/Source/WebCore/ChangeLog 2012-02-29 15:13:34 UTC (rev 109209)
+++ trunk/Source/WebCore/ChangeLog 2012-02-29 15:24:18 UTC (rev 109210)
@@ -1,3 +1,21 @@
+2012-02-28 Pavel Podivilov <podivi...@chromium.org>
+
+ 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:
+
2012-02-28 Yury Semikhatsky <yu...@chromium.org>
Web Inspector: move DOM counter graphs out of experimental
Modified: trunk/Source/WebCore/bindings/scripts/IDLParser.pm (109209 => 109210)
--- trunk/Source/WebCore/bindings/scripts/IDLParser.pm 2012-02-29 15:13:34 UTC (rev 109209)
+++ trunk/Source/WebCore/bindings/scripts/IDLParser.pm 2012-02-29 15:24:18 UTC (rev 109210)
@@ -326,6 +326,7 @@
my @interfaceMethods = split(/;/, $interfaceData);
foreach my $line (@interfaceMethods) {
+ next if $line =~ /^\s*$/;
if ($line =~ /\Wattribute\W/) {
$line =~ /$IDLStructure::interfaceAttributeSelector/;
@@ -361,11 +362,11 @@
$setterException =~ s/\s+//g;
@{$newDataNode->getterExceptions} = split(/,/, $getterException);
@{$newDataNode->setterExceptions} = split(/,/, $setterException);
- } elsif (($line !~ s/^\s*$//g) and ($line !~ /^\s*const/)) {
+ } elsif ($line !~ /^\s*($IDLStructure::extendedAttributeSyntax )?const\s+/) {
$line =~ /$IDLStructure::interfaceMethodSelector/ or die "Parsing error!\nSource:\n$line\n)";
- my $isStatic = defined($1);
- my $methodExtendedAttributes = (defined($2) ? $2 : " "); chop($methodExtendedAttributes);
+ my $methodExtendedAttributes = (defined($1) ? $1 : " "); chop($methodExtendedAttributes);
+ my $isStatic = defined($2);
my $methodType = (defined($3) ? $3 : die("Parsing error!\nSource:\n$line\n)"));
my $methodName = (defined($4) ? $4 : die("Parsing error!\nSource:\n$line\n)"));
my $methodSignature = (defined($5) ? $5 : die("Parsing error!\nSource:\n$line\n)"));
@@ -393,7 +394,7 @@
my $arrayRef = $dataNode->functions;
push(@$arrayRef, $newDataNode);
- } elsif ($line =~ /^\s*const/) {
+ } else {
$line =~ /$IDLStructure::constantSelector/;
my $constExtendedAttributes = (defined($1) ? $1 : " "); chop($constExtendedAttributes);
my $constType = (defined($2) ? $2 : die("Parsing error!\nSource:\n$line\n)"));
Modified: trunk/Source/WebCore/bindings/scripts/IDLStructure.pm (109209 => 109210)
--- trunk/Source/WebCore/bindings/scripts/IDLStructure.pm 2012-02-29 15:13:34 UTC (rev 109209)
+++ trunk/Source/WebCore/bindings/scripts/IDLStructure.pm 2012-02-29 15:24:18 UTC (rev 109210)
@@ -96,7 +96,7 @@
# Regular _expression_ based IDL 'syntactical tokenizer' used in the IDLParser
our $moduleSelector = 'module\s*(' . $idlId . '*)\s*{';
our $moduleNSSelector = 'module\s*(' . $idlId . '*)\s*\[ns\s*(' . $idlIdNs . '*)\s*(' . $idlIdNs . '*)\]\s*;';
-our $constantSelector = 'const\s*(' . $extendedAttributeSyntax . ' )?' . $supportedTypes . '\s*(' . $idlType . '*)\s*=\s*(' . $constValue . ')';
+our $constantSelector = '(' . $extendedAttributeSyntax . ' )?const\s+' . $supportedTypes . '\s*(' . $idlType . '*)\s*=\s*(' . $constValue . ')';
our $raisesSelector = 'raises\s*\((' . $idlIdNsList . '*)\s*\)';
our $getterRaisesSelector = '\bgetter\s+raises\s*\((' . $idlIdNsList . '*)\s*\)';
our $setterRaisesSelector = '\bsetter\s+raises\s*\((' . $idlIdNsList . '*)\s*\)';
@@ -104,7 +104,7 @@
our $typeNamespaceSelector = '((?:' . $idlId . '*::)*)\s*(' . $idlDataType . '*)';
our $interfaceSelector = 'interface\s*((?:' . $extendedAttributeSyntax . ' )?)(' . $idlIdNs . '*)\s*(?::(\s*[^{]*))?{([-a-zA-Z0-9_"=\s(),;:\[\]&\|]*)';
-our $interfaceMethodSelector = '\s*(static\s+)?((?:' . $extendedAttributeSyntax . ' )?)' . $supportedTypes . '\s*(' . $idlIdNs . '*)\s*\(\s*([a-zA-Z0-9:\s,=\[\]]*)';
+our $interfaceMethodSelector = '\s*((?:' . $extendedAttributeSyntax . ' )?)(static\s+)?' . $supportedTypes . '\s*(' . $idlIdNs . '*)\s*\(\s*([a-zA-Z0-9:\s,=\[\]]*)';
our $interfaceParameterSelector = '(in|out)\s*((?:' . $extendedAttributeSyntax . ' )?)' . $supportedTypes . '\s*(' . $idlIdNs . '*)';
our $interfaceAttributeSelector = '\s*(readonly attribute|attribute)\s*(' . $extendedAttributeSyntax . ' )?' . $supportedTypes . '\s*(' . $idlType . '*)';
Modified: trunk/Source/WebCore/bindings/scripts/test/TestObj.idl (109209 => 109210)
--- trunk/Source/WebCore/bindings/scripts/test/TestObj.idl 2012-02-29 15:13:34 UTC (rev 109209)
+++ trunk/Source/WebCore/bindings/scripts/test/TestObj.idl 2012-02-29 15:24:18 UTC (rev 109210)
@@ -151,7 +151,7 @@
attribute [Conditional=Condition1&Condition2] TestObjectBConstructor conditionalAttr5;
attribute [Conditional=Condition1|Condition2] TestObjectCConstructor conditionalAttr6;
- const [Conditional=Condition1] unsigned short CONDITIONAL_CONST = 0;
+ [Conditional=Condition1] const unsigned short CONDITIONAL_CONST = 0;
#if defined(TESTING_V8) || defined(TESTING_JS)
readonly attribute [CachedAttribute] any cachedAttribute1;
@@ -175,8 +175,8 @@
// Static method with conditional on overloaded methods
- static [Conditional=Condition1] void overloadedMethod1(in long arg);
- static [Conditional=Condition1] void overloadedMethod1(in DOMString type);
+ [Conditional=Condition1] static void overloadedMethod1(in long arg);
+ [Conditional=Condition1] static void overloadedMethod1(in DOMString type);
#if defined(TESTING_V8)
// 'V8EnabledAtRuntime' methods and attributes.
@@ -234,6 +234,6 @@
const unsigned short CONST_VALUE_12 = 0x01;
const unsigned short CONST_VALUE_13 = 0X20;
const unsigned short CONST_VALUE_14 = 0x1abc;
- const [Reflect=CONST_IMPL] unsigned short CONST_JAVASCRIPT = 15;
+ [Reflect=CONST_IMPL] const unsigned short CONST_JAVASCRIPT = 15;
};
}
Modified: trunk/Source/WebCore/bindings/scripts/test/TestSupplemental.idl (109209 => 109210)
--- trunk/Source/WebCore/bindings/scripts/test/TestSupplemental.idl 2012-02-29 15:13:34 UTC (rev 109209)
+++ trunk/Source/WebCore/bindings/scripts/test/TestSupplemental.idl 2012-02-29 15:24:18 UTC (rev 109210)
@@ -44,6 +44,6 @@
static void supplementalMethod4();
const unsigned short SUPPLEMENTALCONSTANT1 = 1;
- const [Reflect=CONST_IMPL] unsigned short SUPPLEMENTALCONSTANT2 = 2;
+ [Reflect=CONST_IMPL] const unsigned short SUPPLEMENTALCONSTANT2 = 2;
};
}
Modified: trunk/Source/WebCore/html/DOMURL.idl (109209 => 109210)
--- trunk/Source/WebCore/html/DOMURL.idl 2012-02-29 15:13:34 UTC (rev 109209)
+++ trunk/Source/WebCore/html/DOMURL.idl 2012-02-29 15:24:18 UTC (rev 109210)
@@ -33,9 +33,9 @@
JSNoStaticTables
] DOMURL {
#if defined(ENABLE_MEDIA_STREAM) && ENABLE_MEDIA_STREAM
- static [CallWith=ScriptExecutionContext,TreatReturnedNullStringAs=Undefined] DOMString createObjectURL(in MediaStream stream);
+ [CallWith=ScriptExecutionContext,TreatReturnedNullStringAs=Undefined] static DOMString createObjectURL(in MediaStream stream);
#endif
- static [CallWith=ScriptExecutionContext,TreatReturnedNullStringAs=Undefined] DOMString createObjectURL(in Blob blob);
- static [CallWith=ScriptExecutionContext] void revokeObjectURL(in DOMString url);
+ [CallWith=ScriptExecutionContext,TreatReturnedNullStringAs=Undefined] static DOMString createObjectURL(in Blob blob);
+ [CallWith=ScriptExecutionContext] static void revokeObjectURL(in DOMString url);
};
}
Modified: trunk/Source/WebCore/html/HTMLMediaElement.idl (109209 => 109210)
--- trunk/Source/WebCore/html/HTMLMediaElement.idl 2012-02-29 15:13:34 UTC (rev 109209)
+++ trunk/Source/WebCore/html/HTMLMediaElement.idl 2012-02-29 15:24:18 UTC (rev 109210)
@@ -99,15 +99,15 @@
[V8EnabledAtRuntime=webkitMediaSource] void webkitSourceAppend(in Uint8Array data) raises (DOMException);
// Signals the end of stream.
- const [V8EnabledAtRuntime=webkitMediaSource] unsigned short EOS_NO_ERROR = 0; // End of stream reached w/o error.
- const [V8EnabledAtRuntime=webkitMediaSource] unsigned short EOS_NETWORK_ERR = 1; // A network error triggered end of stream.
- const [V8EnabledAtRuntime=webkitMediaSource] unsigned short EOS_DECODE_ERR = 2; // A decode error triggered end of stream.
+ [V8EnabledAtRuntime=webkitMediaSource] const unsigned short EOS_NO_ERROR = 0; // End of stream reached w/o error.
+ [V8EnabledAtRuntime=webkitMediaSource] const unsigned short EOS_NETWORK_ERR = 1; // A network error triggered end of stream.
+ [V8EnabledAtRuntime=webkitMediaSource] const unsigned short EOS_DECODE_ERR = 2; // A decode error triggered end of stream.
[V8EnabledAtRuntime=webkitMediaSource] void webkitSourceEndOfStream(in unsigned short status) raises (DOMException);
// Indicates the current state of the media source.
- const [V8EnabledAtRuntime=webkitMediaSource] unsigned short SOURCE_CLOSED = 0;
- const [V8EnabledAtRuntime=webkitMediaSource] unsigned short SOURCE_OPEN = 1;
- const [V8EnabledAtRuntime=webkitMediaSource] unsigned short SOURCE_ENDED = 2;
+ [V8EnabledAtRuntime=webkitMediaSource] const unsigned short SOURCE_CLOSED = 0;
+ [V8EnabledAtRuntime=webkitMediaSource] const unsigned short SOURCE_OPEN = 1;
+ [V8EnabledAtRuntime=webkitMediaSource] const unsigned short SOURCE_ENDED = 2;
readonly attribute [V8EnabledAtRuntime=webkitMediaSource] unsigned short webkitSourceState;
#endif
Modified: trunk/Source/WebCore/html/HTMLTrackElement.idl (109209 => 109210)
--- trunk/Source/WebCore/html/HTMLTrackElement.idl 2012-02-29 15:13:34 UTC (rev 109209)
+++ trunk/Source/WebCore/html/HTMLTrackElement.idl 2012-02-29 15:24:18 UTC (rev 109210)
@@ -38,7 +38,7 @@
const unsigned short LOADING = 1;
const unsigned short LOADED = 2;
// Reflect is used for ERROR because it conflicts with a windows define.
- const [Reflect=TRACK_ERROR] unsigned short ERROR = 3;
+ [Reflect=TRACK_ERROR] const unsigned short ERROR = 3;
readonly attribute unsigned short readyState;
readonly attribute TextTrack track;