Diff
Modified: trunk/Source/WebCore/ChangeLog (215329 => 215330)
--- trunk/Source/WebCore/ChangeLog 2017-04-13 18:53:23 UTC (rev 215329)
+++ trunk/Source/WebCore/ChangeLog 2017-04-13 19:19:49 UTC (rev 215330)
@@ -1,3 +1,100 @@
+2017-04-13 Sam Weinig <s...@webkit.org>
+
+ [WebIDL] Add support for extended attributes on types in WebIDL
+ https://bugs.webkit.org/show_bug.cgi?id=170759
+
+ Reviewed by Alex Christensen.
+
+ - Update parsing for WebIDL grammar changes.
+ - Adds an extended attributes hash to IDLType that is filled according
+ to the WebIDL annotated type rules.
+ - Updates code generation to take advantage of IDLType's extended attribute
+ simplifying some existing code.
+ - Update IDLs in the project to adhere to the new grammar.
+
+ * Modules/indexeddb/IDBFactory.idl:
+ * Modules/indexeddb/IDBIndex.idl:
+ * Modules/indexeddb/IDBKeyRange.idl:
+ * Modules/indexeddb/IDBObjectStore.idl:
+ * Modules/websockets/WebSocket.idl:
+ * crypto/parameters/AesCtrParams.idl:
+ * crypto/parameters/AesKeyParams.idl:
+ * crypto/parameters/Pbkdf2Params.idl:
+ * crypto/parameters/RsaKeyGenParams.idl:
+ * testing/TypeConversions.idl:
+ Update for grammar change.
+
+ * bindings/scripts/CodeGeneratorJS.pm:
+ (GenerateDefaultValue):
+ (GetBaseIDLType):
+ (GetIDLType):
+ (GetIntegerConversionConfiguration):
+ (GetStringConversionConfiguration):
+ (JSValueToNative):
+ (UnsafeToNative):
+ (NativeToJSValueDOMConvertNeedsState):
+ (NativeToJSValueDOMConvertNeedsGlobalObject):
+ (NativeToJSValue):
+ Remove the need for the type's context in many places since type
+ associated extended attributes are now on the type itself.
+
+ * bindings/scripts/IDLParser.pm:
+ (copyExtendedAttributes):
+ Move up so it can be reused.
+
+ (isExtendedAttributeApplicableToTypes):
+ Add temporary predicated to indicate which attributes should be moved to types. This
+ logic should be moved to IDLAttributes.txt.
+
+ (moveExtendedAttributesApplicableToTypes):
+ Add helper to move attributes to the type's extended attributes hash if applicable.
+
+ (makeSimpleType):
+ Use initializer syntax to simplify.
+
+ (cloneType):
+ Support cloning types with extended attributes.
+
+ (typeByApplyingTypedefs):
+ When constructing the clone for a typedef application, move any applicable attributes
+ to the clone from the original type.
+
+ (parseDictionaryMember):
+ (parseTypedef):
+ (parseAttributeOrOperationRest):
+ (parseAttributeRest):
+ (parseOperationOrIterator):
+ (parseSpecialOperation):
+ (parseOptionalIterableInterface):
+ (parseMapLikeProperties):
+ (parseOptionalOrRequiredArgument):
+ (parseType):
+ (parseTypeWithExtendedAttributes):
+ (parseUnionMemberType):
+ (parseNonAnyType):
+ Update for new grammar, moving applicable attributes eagerly.
+
+ (assertNoExtendedAttributesInTypedef): Deleted.
+ * bindings/scripts/test/JS/JSTestObj.cpp:
+ (WebCore::jsTestObjPrototypeFunctionClassMethodWithClampOnOptional):
+ (WebCore::jsTestObjPrototypeFunctionClassMethodWithClampOnOptionalCaller):
+ (WebCore::jsTestObjPrototypeFunctionClassMethodWithEnforceRangeOnOptional):
+ (WebCore::jsTestObjPrototypeFunctionClassMethodWithEnforceRangeOnOptionalCaller):
+ * bindings/scripts/test/JS/JSTestTypedefs.cpp:
+ (WebCore::jsTestTypedefsAttributeWithClamp):
+ (WebCore::jsTestTypedefsAttributeWithClampGetter):
+ (WebCore::jsTestTypedefsAttributeWithClampInTypedef):
+ (WebCore::jsTestTypedefsAttributeWithClampInTypedefGetter):
+ (WebCore::setJSTestTypedefsAttributeWithClamp):
+ (WebCore::setJSTestTypedefsAttributeWithClampFunction):
+ (WebCore::setJSTestTypedefsAttributeWithClampInTypedef):
+ (WebCore::setJSTestTypedefsAttributeWithClampInTypedefFunction):
+ (WebCore::jsTestTypedefsPrototypeFunctionFuncWithClampInTypedef):
+ (WebCore::jsTestTypedefsPrototypeFunctionFuncWithClampInTypedefCaller):
+ * bindings/scripts/test/TestObj.idl:
+ * bindings/scripts/test/TestTypedefs.idl:
+ Update for new grammar. Add some new tests for uncovered cases.
+
2017-04-13 Alex Christensen <achristen...@webkit.org>
Fix CMake build
Modified: trunk/Source/WebCore/Modules/indexeddb/IDBFactory.idl (215329 => 215330)
--- trunk/Source/WebCore/Modules/indexeddb/IDBFactory.idl 2017-04-13 18:53:23 UTC (rev 215329)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBFactory.idl 2017-04-13 19:19:49 UTC (rev 215330)
@@ -27,7 +27,7 @@
Conditional=INDEXED_DATABASE,
SkipVTableValidation,
] interface IDBFactory {
- [CallWith=ScriptExecutionContext, MayThrowException] IDBOpenDBRequest open(DOMString name, [EnforceRange] optional unsigned long long version);
+ [CallWith=ScriptExecutionContext, MayThrowException] IDBOpenDBRequest open(DOMString name, optional [EnforceRange] unsigned long long version);
[CallWith=ScriptExecutionContext, MayThrowException] IDBOpenDBRequest deleteDatabase(DOMString name);
[CallWith=ScriptState, MayThrowException] short cmp(any first, any second);
};
Modified: trunk/Source/WebCore/Modules/indexeddb/IDBIndex.idl (215329 => 215330)
--- trunk/Source/WebCore/Modules/indexeddb/IDBIndex.idl 2017-04-13 18:53:23 UTC (rev 215329)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBIndex.idl 2017-04-13 19:19:49 UTC (rev 215330)
@@ -49,10 +49,10 @@
[CallWith=ScriptState, MayThrowException] IDBRequest get(any key);
[CallWith=ScriptState, MayThrowException] IDBRequest getKey(IDBKeyRange? key);
[CallWith=ScriptState, MayThrowException] IDBRequest getKey(any key);
- [CallWith=ScriptState, MayThrowException] IDBRequest getAll(optional IDBKeyRange? range = null, [EnforceRange] optional unsigned long count);
- [CallWith=ScriptState, MayThrowException] IDBRequest getAll(any key, [EnforceRange] optional unsigned long count);
- [CallWith=ScriptState, MayThrowException] IDBRequest getAllKeys(optional IDBKeyRange? range = null, [EnforceRange] optional unsigned long count);
- [CallWith=ScriptState, MayThrowException] IDBRequest getAllKeys(any key, [EnforceRange] optional unsigned long count);
+ [CallWith=ScriptState, MayThrowException] IDBRequest getAll(optional IDBKeyRange? range = null, optional [EnforceRange] unsigned long count);
+ [CallWith=ScriptState, MayThrowException] IDBRequest getAll(any key, optional [EnforceRange] unsigned long count);
+ [CallWith=ScriptState, MayThrowException] IDBRequest getAllKeys(optional IDBKeyRange? range = null, optional [EnforceRange] unsigned long count);
+ [CallWith=ScriptState, MayThrowException] IDBRequest getAllKeys(any key, optional [EnforceRange] unsigned long count);
[CallWith=ScriptState, MayThrowException] IDBRequest count(optional IDBKeyRange? range = null);
[CallWith=ScriptState, MayThrowException] IDBRequest count(any key);
};
Modified: trunk/Source/WebCore/Modules/indexeddb/IDBKeyRange.idl (215329 => 215330)
--- trunk/Source/WebCore/Modules/indexeddb/IDBKeyRange.idl 2017-04-13 18:53:23 UTC (rev 215329)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBKeyRange.idl 2017-04-13 19:19:49 UTC (rev 215330)
@@ -27,8 +27,8 @@
Conditional=INDEXED_DATABASE,
ImplementationLacksVTable,
] interface IDBKeyRange {
- [OverrideIDLType=IDLIDBKey] readonly attribute any lower;
- [OverrideIDLType=IDLIDBKey] readonly attribute any upper;
+ readonly attribute [OverrideIDLType=IDLIDBKey] any lower;
+ readonly attribute [OverrideIDLType=IDLIDBKey] any upper;
readonly attribute boolean lowerOpen;
readonly attribute boolean upperOpen;
Modified: trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.idl (215329 => 215330)
--- trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.idl 2017-04-13 18:53:23 UTC (rev 215329)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.idl 2017-04-13 19:19:49 UTC (rev 215330)
@@ -52,10 +52,10 @@
[CallWith=ScriptState, MayThrowException] IDBRequest openCursor(any key, optional IDBCursorDirection direction = "next");
[CallWith=ScriptState, MayThrowException] IDBRequest openKeyCursor(optional IDBKeyRange? range = null, optional IDBCursorDirection direction = "next");
[CallWith=ScriptState, MayThrowException] IDBRequest openKeyCursor(any key, optional IDBCursorDirection direction = "next");
- [CallWith=ScriptState, MayThrowException] IDBRequest getAll(optional IDBKeyRange? range = null, [EnforceRange] optional unsigned long count);
- [CallWith=ScriptState, MayThrowException] IDBRequest getAll(any key, [EnforceRange] optional unsigned long count);
- [CallWith=ScriptState, MayThrowException] IDBRequest getAllKeys(optional IDBKeyRange? range = null, [EnforceRange] optional unsigned long count);
- [CallWith=ScriptState, MayThrowException] IDBRequest getAllKeys(any key, [EnforceRange] optional unsigned long count);
+ [CallWith=ScriptState, MayThrowException] IDBRequest getAll(optional IDBKeyRange? range = null, optional [EnforceRange] unsigned long count);
+ [CallWith=ScriptState, MayThrowException] IDBRequest getAll(any key, optional [EnforceRange] unsigned long count);
+ [CallWith=ScriptState, MayThrowException] IDBRequest getAllKeys(optional IDBKeyRange? range = null, optional [EnforceRange] unsigned long count);
+ [CallWith=ScriptState, MayThrowException] IDBRequest getAllKeys(any key, optional [EnforceRange] unsigned long count);
[CallWith=ScriptState, MayThrowException] IDBIndex createIndex(DOMString name, (DOMString or sequence<DOMString>) keyPath, optional IDBIndexParameters options);
[MayThrowException] IDBIndex index(DOMString name);
[MayThrowException] void deleteIndex(DOMString name);
Modified: trunk/Source/WebCore/Modules/websockets/WebSocket.idl (215329 => 215330)
--- trunk/Source/WebCore/Modules/websockets/WebSocket.idl 2017-04-13 18:53:23 UTC (rev 215329)
+++ trunk/Source/WebCore/Modules/websockets/WebSocket.idl 2017-04-13 19:19:49 UTC (rev 215330)
@@ -65,5 +65,5 @@
[MayThrowException] void send(Blob data);
[MayThrowException] void send(USVString data);
- [MayThrowException] void close([Clamp] optional unsigned short code, optional DOMString reason);
+ [MayThrowException] void close(optional [Clamp] unsigned short code, optional DOMString reason);
};
Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (215329 => 215330)
--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm 2017-04-13 18:53:23 UTC (rev 215329)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm 2017-04-13 19:19:49 UTC (rev 215330)
@@ -1418,7 +1418,7 @@
my ($typeScope, $context, $type, $defaultValue) = @_;
if ($codeGenerator->IsStringType($type)) {
- my $useAtomicString = $context->extendedAttributes->{AtomicString};
+ my $useAtomicString = $type->extendedAttributes->{AtomicString};
if ($defaultValue eq "null") {
return $useAtomicString ? "nullAtom" : "String()";
} elsif ($defaultValue eq "\"\"") {
@@ -5368,10 +5368,10 @@
sub GetBaseIDLType
{
- my ($interface, $type, $context) = @_;
+ my ($interface, $type) = @_;
- if ($context && $context->extendedAttributes->{OverrideIDLType}) {
- return $context->extendedAttributes->{OverrideIDLType};
+ if ($type->extendedAttributes->{OverrideIDLType}) {
+ return $type->extendedAttributes->{OverrideIDLType};
}
my %IDLTypes = (
@@ -5421,9 +5421,9 @@
sub GetIDLType
{
- my ($interface, $type, $context) = @_;
+ my ($interface, $type) = @_;
- my $baseIDLType = GetBaseIDLType($interface, $type, $context);
+ my $baseIDLType = GetBaseIDLType($interface, $type);
return "IDLNullable<" . $baseIDLType . ">" if $type->isNullable;
return $baseIDLType;
}
@@ -5487,18 +5487,18 @@
sub GetIntegerConversionConfiguration
{
- my $context = shift;
+ my $type = shift;
- return "IntegerConversionConfiguration::EnforceRange" if $context->extendedAttributes->{EnforceRange};
- return "IntegerConversionConfiguration::Clamp" if $context->extendedAttributes->{Clamp};
+ return "IntegerConversionConfiguration::EnforceRange" if $type->extendedAttributes->{EnforceRange};
+ return "IntegerConversionConfiguration::Clamp" if $type->extendedAttributes->{Clamp};
return "IntegerConversionConfiguration::Normal";
}
sub GetStringConversionConfiguration
{
- my $context = shift;
+ my $type = shift;
- return "StringConversionConfiguration::TreatNullAsEmptyString" if $context->extendedAttributes->{TreatNullAs} && $context->extendedAttributes->{TreatNullAs} eq "EmptyString";
+ return "StringConversionConfiguration::TreatNullAsEmptyString" if $type->extendedAttributes->{TreatNullAs} && $type->extendedAttributes->{TreatNullAs} eq "EmptyString";
return "StringConversionConfiguration::Normal";
}
@@ -5543,8 +5543,8 @@
AddToImplIncludesForIDLType($type, $conditional);
if ($type->name eq "DOMString") {
- return ("AtomicString($value.toString($statePointer)->toExistingAtomicString($statePointer))", 1) if $context->extendedAttributes->{RequiresExistingAtomicString};
- return ("$value.toString($statePointer)->toAtomicString($statePointer)", 1) if $context->extendedAttributes->{AtomicString};
+ return ("AtomicString($value.toString($statePointer)->toExistingAtomicString($statePointer))", 1) if $type->extendedAttributes->{RequiresExistingAtomicString};
+ return ("$value.toString($statePointer)->toAtomicString($statePointer)", 1) if $type->extendedAttributes->{AtomicString};
}
# parseEnumeration<> returns a std::optional. For dictionary members we need convert<IDLEnumeration>() which guarantee
@@ -5562,8 +5562,8 @@
push(@conversionArguments, $value);
push(@conversionArguments, $thisObjectReference) if JSValueToNativeDOMConvertNeedsThisObject($type);
push(@conversionArguments, $globalObjectReference) if JSValueToNativeDOMConvertNeedsGlobalObject($type);
- push(@conversionArguments, GetIntegerConversionConfiguration($context)) if $codeGenerator->IsIntegerType($type);
- push(@conversionArguments, GetStringConversionConfiguration($context)) if $codeGenerator->IsStringType($type);
+ push(@conversionArguments, GetIntegerConversionConfiguration($type)) if $codeGenerator->IsIntegerType($type);
+ push(@conversionArguments, GetStringConversionConfiguration($type)) if $codeGenerator->IsStringType($type);
push(@conversionArguments, $exceptionThrower) if $exceptionThrower;
return ("convert<$IDLType>(" . join(", ", @conversionArguments) . ")", 1);
@@ -5587,8 +5587,8 @@
# FIXME: Support more types.
if ($type->name eq "DOMString") {
- return ("AtomicString($value->toExistingAtomicString($statePointer))", 1) if $context->extendedAttributes->{RequiresExistingAtomicString};
- return ("$value->toAtomicString($statePointer)", 1) if $context->extendedAttributes->{AtomicString};
+ return ("AtomicString($value->toExistingAtomicString($statePointer))", 1) if $type->extendedAttributes->{RequiresExistingAtomicString};
+ return ("$value->toAtomicString($statePointer)", 1) if $type->extendedAttributes->{AtomicString};
}
AddToImplIncludes("DOMJITIDLConvert.h");
@@ -5600,8 +5600,8 @@
push(@conversionArguments, "$value");
my @conversionStaticArguments = ();
- push(@conversionStaticArguments, GetIntegerConversionConfiguration($context)) if $codeGenerator->IsIntegerType($type);
- push(@conversionStaticArguments, GetStringConversionConfiguration($context)) if $codeGenerator->IsStringType($type);
+ push(@conversionStaticArguments, GetIntegerConversionConfiguration($type)) if $codeGenerator->IsIntegerType($type);
+ push(@conversionStaticArguments, GetStringConversionConfiguration($type)) if $codeGenerator->IsStringType($type);
if (scalar(@conversionStaticArguments) > 0) {
return ("DOMJIT::DirectConverter<$IDLType>::directConvert<" . join(", ", @conversionStaticArguments) . ">(" . join(", ", @conversionArguments) . ")", 1);
@@ -5611,13 +5611,13 @@
sub NativeToJSValueDOMConvertNeedsState
{
- my ($type, $context) = @_;
+ my ($type) = @_;
# FIXME: We need a more robust way to specify this requirement so as not
# to require specializing each type. Perhaps just requiring all override
# types to take both state and the global object would work?
- if ($context->extendedAttributes->{OverrideIDLType}) {
- my $overrideTypeName = $context->extendedAttributes->{OverrideIDLType};
+ if ($type->extendedAttributes->{OverrideIDLType}) {
+ my $overrideTypeName = $type->extendedAttributes->{OverrideIDLType};
return 1 if $overrideTypeName eq "IDLIDBKey";
return 1 if $overrideTypeName eq "IDLWebGLAny";
@@ -5643,13 +5643,13 @@
sub NativeToJSValueDOMConvertNeedsGlobalObject
{
- my ($type, $context) = @_;
+ my ($type) = @_;
# FIXME: We need a more robust way to specify this requirement so as not
# to require specializing each type. Perhaps just requiring all override
# types to take both state and the global object would work?
- if ($context->extendedAttributes->{OverrideIDLType}) {
- my $overrideTypeName = $context->extendedAttributes->{OverrideIDLType};
+ if ($type->extendedAttributes->{OverrideIDLType}) {
+ my $overrideTypeName = $type->extendedAttributes->{OverrideIDLType};
return 1 if $overrideTypeName eq "IDLIDBKey";
return 1 if $overrideTypeName eq "IDLWebGLAny";
@@ -5722,11 +5722,11 @@
$value = "BindingSecurity::checkSecurityForNode($stateReference, $value)";
}
- my $IDLType = GetIDLType($interface, $type, $context);
+ my $IDLType = GetIDLType($interface, $type);
my @conversionArguments = ();
- push(@conversionArguments, $stateReference) if NativeToJSValueDOMConvertNeedsState($type, $context) || $mayThrowException;
- push(@conversionArguments, $globalObjectReference) if NativeToJSValueDOMConvertNeedsGlobalObject($type, $context);
+ push(@conversionArguments, $stateReference) if NativeToJSValueDOMConvertNeedsState($type) || $mayThrowException;
+ push(@conversionArguments, $globalObjectReference) if NativeToJSValueDOMConvertNeedsGlobalObject($type);
push(@conversionArguments, "throwScope") if $mayThrowException;
push(@conversionArguments, $value);
Modified: trunk/Source/WebCore/bindings/scripts/IDLParser.pm (215329 => 215330)
--- trunk/Source/WebCore/bindings/scripts/IDLParser.pm 2017-04-13 18:53:23 UTC (rev 215329)
+++ trunk/Source/WebCore/bindings/scripts/IDLParser.pm 2017-04-13 19:19:49 UTC (rev 215330)
@@ -51,6 +51,7 @@
isNullable => '$', # Is the type Nullable (T?)
isUnion => '$', # Is the type a union (T or U)
subtypes => '@', # Array of subtypes, only valid if isUnion or sequence
+ extendedAttributes => '%',
});
# Used to represent 'interface' blocks
@@ -252,20 +253,6 @@
assert $msg;
}
-sub assertNoExtendedAttributesInTypedef
-{
- my $self = shift;
- my $name = shift;
- my $line = shift;
- my $typedef = $typedefs{$name};
- my $msg = "Unexpected extendedAttributeList in typedef \"$name\" on line " . $self->{Line};
- if (defined ($line)) {
- $msg .= " IDLParser.pm:" . $line;
- }
-
- assert $msg if %{$typedef->extendedAttributes};
-}
-
sub Parse
{
my $self = shift;
@@ -398,6 +385,68 @@
return $type;
}
+sub copyExtendedAttributes
+{
+ my $extendedAttributeList = shift;
+ my $attr = shift;
+
+ for my $key (keys %{$attr}) {
+ if ($key eq "Constructor") {
+ push(@{$extendedAttributeList->{"Constructors"}}, $attr->{$key});
+ } elsif ($key eq "Constructors") {
+ my @constructors = @{$attr->{$key}};
+ foreach my $constructor (@constructors) {
+ push(@{$extendedAttributeList->{"Constructors"}}, $constructor);
+ }
+ } elsif ($key eq "CustomConstructor") {
+ push(@{$extendedAttributeList->{"CustomConstructors"}}, $attr->{$key});
+ } elsif ($key eq "CustomConstructors") {
+ my @customConstructors = @{$attr->{$key}};
+ foreach my $customConstructor (@customConstructors) {
+ push(@{$extendedAttributeList->{"CustomConstructors"}}, $customConstructor);
+ }
+ } else {
+ $extendedAttributeList->{$key} = $attr->{$key};
+ }
+ }
+}
+
+
+sub isExtendedAttributeApplicableToTypes
+{
+ my $extendedAttribute = shift;
+
+ # FIXME: This should be derived from IDLAttributes.in
+ my %types = (
+ "Clamp" => 1,
+ "EnforceRange" => 1,
+ "TreatNullAs" => 1,
+
+ # Non-standard additions
+ "AtomicString" => 1,
+ "RequiresExistingAtomicString" => 1,
+ "OverrideIDLType" => 1,
+ );
+
+ return $types{$extendedAttribute};
+}
+
+sub moveExtendedAttributesApplicableToTypes
+{
+ my $type = shift;
+ my $extendedAttributeList = shift;
+
+ for my $key (keys %{$extendedAttributeList}) {
+ if (isExtendedAttributeApplicableToTypes($key)) {
+ if (!defined $type->extendedAttributes->{$key}) {
+ $type->extendedAttributes->{$key} = $extendedAttributeList->{$key};
+ }
+
+ delete $extendedAttributeList->{$key};
+ }
+ }
+}
+
sub typeDescription
{
my $type = shift;
@@ -413,10 +462,7 @@
{
my $typeName = shift;
- my $type = IDLType->new();
- $type->name($typeName);
-
- return $type;
+ return IDLType->new(name => $typeName);
}
sub cloneType
@@ -428,6 +474,9 @@
$clonedType->name($type->name);
$clonedType->isNullable($type->isNullable);
$clonedType->isUnion($type->isUnion);
+
+ copyExtendedAttributes($clonedType->extendedAttributes, $type->extendedAttributes);
+
foreach my $subtype (@{$type->subtypes}) {
push(@{$clonedType->subtypes}, $self->cloneType($subtype));
}
@@ -552,6 +601,7 @@
my $clonedType = $self->cloneType($typedef->type);
$clonedType->isNullable($clonedType->isNullable || $type->isNullable);
+ moveExtendedAttributesApplicableToTypes($clonedType, $type->extendedAttributes);
return $self->typeByApplyingTypedefs($clonedType);
}
@@ -798,17 +848,23 @@
my $next = $self->nextToken();
if ($next->type() == IdentifierToken || $next->value() =~ /$nextExceptionField_1/) {
my $member = IDLDictionaryMember->new();
+ $member->extendedAttributes($extendedAttributeList);
+
if ($next->value eq "required") {
$self->assertTokenValue($self->getToken(), "required", __LINE__);
$member->isRequired(1);
+
+ my $type = $self->parseTypeWithExtendedAttributes();
+ $member->type($type);
} else {
$member->isRequired(0);
+
+ my $type = $self->parseType();
+ moveExtendedAttributesApplicableToTypes($type, $extendedAttributeList);
+
+ $member->type($type);
}
- $member->extendedAttributes($extendedAttributeList);
- my $type = $self->parseType();
- $member->type($type);
-
my $nameToken = $self->getToken();
$self->assertTokenType($nameToken, IdentifierToken);
$member->name($nameToken->value);
@@ -1034,7 +1090,7 @@
$self->assertTokenValue($self->getToken(), "typedef", __LINE__);
my $typedef = IDLTypedef->new();
- my $type = $self->parseType();
+ my $type = $self->parseTypeWithExtendedAttributes();
$typedef->type($type);
my $nameToken = $self->getToken();
@@ -1346,6 +1402,11 @@
}
if ($next->type() == IdentifierToken || $next->value() =~ /$nextAttributeOrOperationRest_1/) {
my $returnType = $self->parseReturnType();
+
+ # NOTE: This is a non-standard addition. In WebIDL, there is no way to associate
+ # extended attributes with a return type.
+ moveExtendedAttributesApplicableToTypes($returnType, $extendedAttributeList);
+
my $operation = $self->parseOperationRest($extendedAttributeList);
if (defined ($operation)) {
$operation->type($returnType);
@@ -1377,26 +1438,22 @@
my $next = $self->nextToken();
if ($next->value() eq "attribute") {
- my $newDataNode = IDLAttribute->new();
- $newDataNode->isReadOnly($isReadOnly);
-
$self->assertTokenValue($self->getToken(), "attribute", __LINE__);
- my $type = $self->parseType();
- $newDataNode->type($type);
+ my $attribute = IDLAttribute->new();
+
+ $attribute->extendedAttributes($extendedAttributeList);
+ $attribute->isReadOnly($isReadOnly);
+ my $type = $self->parseTypeWithExtendedAttributes();
+ $attribute->type($type);
+
my $token = $self->getToken();
$self->assertTokenType($token, IdentifierToken);
- $newDataNode->name(identifierRemoveNullablePrefix($token->value()));
+ $attribute->name(identifierRemoveNullablePrefix($token->value()));
$self->assertTokenValue($self->getToken(), ";", __LINE__);
- # CustomConstructor may also be used on attributes.
- if (defined $extendedAttributeList->{"CustomConstructors"}) {
- delete $extendedAttributeList->{"CustomConstructors"};
- $extendedAttributeList->{"CustomConstructor"} = "VALUE_IS_MISSING";
- }
- $newDataNode->extendedAttributes($extendedAttributeList);
- return $newDataNode;
+ return $attribute;
}
$self->assertUnexpectedToken($next->value(), __LINE__);
}
@@ -1441,6 +1498,10 @@
}
if ($next->type() == IdentifierToken || $next->value() =~ /$nextAttributeOrOperationRest_1/) {
my $returnType = $self->parseReturnType();
+ # NOTE: This is a non-standard addition. In WebIDL, there is no way to associate
+ # extended attributes with a return type.
+ moveExtendedAttributesApplicableToTypes($returnType, $extendedAttributeList);
+
my $next = $self->nextToken();
if ($next->type() == IdentifierToken || $next->value() eq "(") {
my $operation = $self->parseOperationRest($extendedAttributeList);
@@ -1461,6 +1522,11 @@
my @specials = ();
push(@specials, @{$self->parseSpecials()});
my $returnType = $self->parseReturnType();
+
+ # NOTE: This is a non-standard addition. In WebIDL, there is no way to associate
+ # extended attributes with a return type.
+ moveExtendedAttributesApplicableToTypes($returnType, $extendedAttributeList);
+
my $operation = $self->parseOperationRest($extendedAttributeList);
if (defined ($operation)) {
$operation->type($returnType);
@@ -1538,12 +1604,12 @@
$newDataNode->extendedAttributes($extendedAttributeList);
$self->assertTokenValue($self->getToken(), "<", __LINE__);
- my $type1 = $self->parseType();
+ my $type1 = $self->parseTypeWithExtendedAttributes();
if ($self->nextToken()->value() eq ",") {
$self->assertTokenValue($self->getToken(), ",", __LINE__);
- my $type2 = $self->parseType();
+ my $type2 = $self->parseTypeWithExtendedAttributes();
$newDataNode->isKeyValue(1);
$newDataNode->keyType($type1);
$newDataNode->valueType($type2);
@@ -1618,9 +1684,9 @@
$newDataNode->isReadOnly($isReadOnly);
$self->assertTokenValue($self->getToken(), "<", __LINE__);
- $newDataNode->keyType($self->parseType());
+ $newDataNode->keyType($self->parseTypeWithExtendedAttributes());
$self->assertTokenValue($self->getToken(), ",", __LINE__);
- $newDataNode->valueType($self->parseType());
+ $newDataNode->valueType($self->parseTypeWithExtendedAttributes());
$self->assertTokenValue($self->getToken(), ">", __LINE__);
my $notEnumerableExtendedAttributeList = $extendedAttributeList;
@@ -1813,27 +1879,29 @@
my $self = shift;
my $extendedAttributeList = shift;
- my $paramDataNode = IDLArgument->new();
- $paramDataNode->extendedAttributes($extendedAttributeList);
+ my $argument = IDLArgument->new();
+ $argument->extendedAttributes($extendedAttributeList);
my $next = $self->nextToken();
if ($next->value() eq "optional") {
$self->assertTokenValue($self->getToken(), "optional", __LINE__);
- my $type = $self->parseType();
- $paramDataNode->type($type);
- $paramDataNode->isOptional(1);
- $paramDataNode->name($self->parseArgumentName());
- $paramDataNode->default($self->parseDefault());
- return $paramDataNode;
+ my $type = $self->parseTypeWithExtendedAttributes();
+ $argument->type($type);
+ $argument->isOptional(1);
+ $argument->name($self->parseArgumentName());
+ $argument->default($self->parseDefault());
+ return $argument;
}
if ($next->type() == IdentifierToken || $next->value() =~ /$nextExceptionField_1/) {
my $type = $self->parseType();
- $paramDataNode->type($type);
- $paramDataNode->isOptional(0);
- $paramDataNode->isVariadic($self->parseEllipsis());
- $paramDataNode->name($self->parseArgumentName());
- return $paramDataNode;
+ moveExtendedAttributesApplicableToTypes($type, $extendedAttributeList);
+
+ $argument->type($type);
+ $argument->isOptional(0);
+ $argument->isVariadic($self->parseEllipsis());
+ $argument->name($self->parseArgumentName());
+ return $argument;
}
$self->assertUnexpectedToken($next->value(), __LINE__);
}
@@ -1910,32 +1978,6 @@
return {};
}
-sub copyExtendedAttributes
-{
- my $extendedAttributeList = shift;
- my $attr = shift;
-
- for my $key (keys %{$attr}) {
- if ($key eq "Constructor") {
- push(@{$extendedAttributeList->{"Constructors"}}, $attr->{$key});
- } elsif ($key eq "Constructors") {
- my @constructors = @{$attr->{$key}};
- foreach my $constructor (@constructors) {
- push(@{$extendedAttributeList->{"Constructors"}}, $constructor);
- }
- } elsif ($key eq "CustomConstructor") {
- push(@{$extendedAttributeList->{"CustomConstructors"}}, $attr->{$key});
- } elsif ($key eq "CustomConstructors") {
- my @customConstructors = @{$attr->{$key}};
- foreach my $customConstructor (@customConstructors) {
- push(@{$extendedAttributeList->{"CustomConstructors"}}, $customConstructor);
- }
- } else {
- $extendedAttributeList->{$key} = $attr->{$key};
- }
- }
-}
-
sub parseExtendedAttributeList
{
my $self = shift;
@@ -2146,17 +2188,44 @@
{
my $self = shift;
my $next = $self->nextToken();
+
+ my $extendedAttributeList = {};
+
if ($next->value() eq "(") {
my $unionType = $self->parseUnionType();
$unionType->isNullable($self->parseNull());
+ $unionType->extendedAttributes($extendedAttributeList);
return $unionType;
}
if ($next->type() == IdentifierToken || $next->value() =~ /$nextType_1/) {
- return $self->parseSingleType();
+ my $singleType = $self->parseSingleType();
+ $singleType->extendedAttributes($extendedAttributeList);
+ return $singleType;
}
$self->assertUnexpectedToken($next->value(), __LINE__);
}
+sub parseTypeWithExtendedAttributes
+{
+ my $self = shift;
+
+ my $extendedAttributeList = $self->parseExtendedAttributeListAllowEmpty();
+
+ my $next = $self->nextToken();
+ if ($next->value() eq "(") {
+ my $unionType = $self->parseUnionType();
+ $unionType->isNullable($self->parseNull());
+ $unionType->extendedAttributes($extendedAttributeList);
+ return $unionType;
+ }
+ if ($next->type() == IdentifierToken || $next->value() =~ /$nextType_1/) {
+ my $singleType = $self->parseSingleType();
+ $singleType->extendedAttributes($extendedAttributeList);
+ return $singleType;
+ }
+ $self->assertUnexpectedToken($next->value(), __LINE__);
+}
+
sub parseSingleType
{
my $self = shift;
@@ -2207,9 +2276,13 @@
$unionType->isNullable($self->parseNull());
return $unionType;
}
+
+ my $extendedAttributeList = $self->parseExtendedAttributeListAllowEmpty();
+
if ($next->type() == IdentifierToken || $next->value() =~ /$nextSingleType_1/) {
my $nonAnyType = $self->parseNonAnyType();
$nonAnyType->isNullable($self->parseNull());
+ $nonAnyType->extendedAttributes($extendedAttributeList);
return $nonAnyType;
}
$self->assertUnexpectedToken($next->value(), __LINE__);
@@ -2280,7 +2353,7 @@
$self->assertTokenValue($self->getToken(), "sequence", __LINE__);
$self->assertTokenValue($self->getToken(), "<", __LINE__);
- my $subtype = $self->parseType();
+ my $subtype = $self->parseTypeWithExtendedAttributes();
$self->assertTokenValue($self->getToken(), ">", __LINE__);
@@ -2293,7 +2366,7 @@
$self->assertTokenValue($self->getToken(), "FrozenArray", __LINE__);
$self->assertTokenValue($self->getToken(), "<", __LINE__);
- my $subtype = $self->parseType();
+ my $subtype = $self->parseTypeWithExtendedAttributes();
$self->assertTokenValue($self->getToken(), ">", __LINE__);
@@ -2324,7 +2397,7 @@
$self->assertTokenValue($self->getToken(), ",", __LINE__);
- my $valueType = $self->parseType();
+ my $valueType = $self->parseTypeWithExtendedAttributes();
$self->assertTokenValue($self->getToken(), ">", __LINE__);
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp (215329 => 215330)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp 2017-04-13 18:53:23 UTC (rev 215329)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp 2017-04-13 19:19:49 UTC (rev 215330)
@@ -1204,7 +1204,9 @@
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjConstructorFunctionOverloadedMethod1(JSC::ExecState*);
#endif
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionClassMethodWithClamp(JSC::ExecState*);
+JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionClassMethodWithClampOnOptional(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionClassMethodWithEnforceRange(JSC::ExecState*);
+JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionClassMethodWithEnforceRangeOnOptional(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithUnsignedLongSequence(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionStringArrayFunction(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionDomStringListFunction(JSC::ExecState*);
@@ -1848,7 +1850,9 @@
{ "overloadWithOptionalUnion", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionOverloadWithOptionalUnion), (intptr_t) (0) } },
{ "overloadWithNullableNonDistinguishingParameter", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionOverloadWithNullableNonDistinguishingParameter), (intptr_t) (2) } },
{ "classMethodWithClamp", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionClassMethodWithClamp), (intptr_t) (2) } },
+ { "classMethodWithClampOnOptional", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionClassMethodWithClampOnOptional), (intptr_t) (0) } },
{ "classMethodWithEnforceRange", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionClassMethodWithEnforceRange), (intptr_t) (2) } },
+ { "classMethodWithEnforceRangeOnOptional", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionClassMethodWithEnforceRangeOnOptional), (intptr_t) (0) } },
{ "methodWithUnsignedLongSequence", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithUnsignedLongSequence), (intptr_t) (1) } },
{ "stringArrayFunction", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionStringArrayFunction), (intptr_t) (1) } },
{ "domStringListFunction", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionDomStringListFunction), (intptr_t) (1) } },
@@ -7806,6 +7810,24 @@
return JSValue::encode(jsUndefined());
}
+static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionClassMethodWithClampOnOptionalCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&);
+
+EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionClassMethodWithClampOnOptional(ExecState* state)
+{
+ return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionClassMethodWithClampOnOptionalCaller>(state, "classMethodWithClampOnOptional");
+}
+
+static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionClassMethodWithClampOnOptionalCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope)
+{
+ UNUSED_PARAM(state);
+ UNUSED_PARAM(throwScope);
+ auto& impl = castedThis->wrapped();
+ auto objArgsLong = convert<IDLLong>(*state, state->argument(0), IntegerConversionConfiguration::Clamp);
+ RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
+ impl.classMethodWithClampOnOptional(WTFMove(objArgsLong));
+ return JSValue::encode(jsUndefined());
+}
+
static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionClassMethodWithEnforceRangeCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&);
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionClassMethodWithEnforceRange(ExecState* state)
@@ -7828,6 +7850,24 @@
return JSValue::encode(jsUndefined());
}
+static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionClassMethodWithEnforceRangeOnOptionalCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&);
+
+EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionClassMethodWithEnforceRangeOnOptional(ExecState* state)
+{
+ return BindingCaller<JSTestObj>::callOperation<jsTestObjPrototypeFunctionClassMethodWithEnforceRangeOnOptionalCaller>(state, "classMethodWithEnforceRangeOnOptional");
+}
+
+static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionClassMethodWithEnforceRangeOnOptionalCaller(JSC::ExecState* state, JSTestObj* castedThis, JSC::ThrowScope& throwScope)
+{
+ UNUSED_PARAM(state);
+ UNUSED_PARAM(throwScope);
+ auto& impl = castedThis->wrapped();
+ auto objArgsLong = convert<IDLLong>(*state, state->argument(0), IntegerConversionConfiguration::EnforceRange);
+ RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
+ impl.classMethodWithEnforceRangeOnOptional(WTFMove(objArgsLong));
+ return JSValue::encode(jsUndefined());
+}
+
static inline JSC::EncodedJSValue jsTestObjPrototypeFunctionMethodWithUnsignedLongSequenceCaller(JSC::ExecState*, JSTestObj*, JSC::ThrowScope&);
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithUnsignedLongSequence(ExecState* state)
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp (215329 => 215330)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp 2017-04-13 18:53:23 UTC (rev 215329)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp 2017-04-13 19:19:49 UTC (rev 215330)
@@ -54,6 +54,7 @@
JSC::EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionNullableSequenceOfUnionsArg(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionUnionArg(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionFuncWithClamp(JSC::ExecState*);
+JSC::EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionFuncWithClampInTypedef(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionImmutablePointFunction(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionStringSequenceFunction(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionStringSequenceFunction2(JSC::ExecState*);
@@ -67,6 +68,10 @@
JSC::EncodedJSValue jsTestTypedefsImmutableSerializedScriptValue(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
bool setJSTestTypedefsImmutableSerializedScriptValue(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsTestTypedefsConstructorTestSubObj(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
+JSC::EncodedJSValue jsTestTypedefsAttributeWithClamp(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
+bool setJSTestTypedefsAttributeWithClamp(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
+JSC::EncodedJSValue jsTestTypedefsAttributeWithClampInTypedef(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
+bool setJSTestTypedefsAttributeWithClampInTypedef(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsTestTypedefsAttrWithGetterException(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
bool setJSTestTypedefsAttrWithGetterException(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
JSC::EncodedJSValue jsTestTypedefsAttrWithSetterException(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
@@ -168,6 +173,8 @@
{ "constructor", DontEnum, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestTypedefsConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestTypedefsConstructor) } },
{ "unsignedLongLongAttr", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestTypedefsUnsignedLongLongAttr), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestTypedefsUnsignedLongLongAttr) } },
{ "immutableSerializedScriptValue", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestTypedefsImmutableSerializedScriptValue), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestTypedefsImmutableSerializedScriptValue) } },
+ { "attributeWithClamp", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestTypedefsAttributeWithClamp), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestTypedefsAttributeWithClamp) } },
+ { "attributeWithClampInTypedef", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestTypedefsAttributeWithClampInTypedef), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestTypedefsAttributeWithClampInTypedef) } },
{ "attrWithGetterException", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestTypedefsAttrWithGetterException), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestTypedefsAttrWithGetterException) } },
{ "attrWithSetterException", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestTypedefsAttrWithSetterException), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestTypedefsAttrWithSetterException) } },
{ "stringAttrWithGetterException", CustomAccessor, NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsTestTypedefsStringAttrWithGetterException), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSTestTypedefsStringAttrWithGetterException) } },
@@ -181,6 +188,7 @@
{ "nullableSequenceOfUnionsArg", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestTypedefsPrototypeFunctionNullableSequenceOfUnionsArg), (intptr_t) (1) } },
{ "unionArg", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestTypedefsPrototypeFunctionUnionArg), (intptr_t) (1) } },
{ "funcWithClamp", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestTypedefsPrototypeFunctionFuncWithClamp), (intptr_t) (1) } },
+ { "funcWithClampInTypedef", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestTypedefsPrototypeFunctionFuncWithClampInTypedef), (intptr_t) (1) } },
{ "immutablePointFunction", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestTypedefsPrototypeFunctionImmutablePointFunction), (intptr_t) (0) } },
{ "stringSequenceFunction", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestTypedefsPrototypeFunctionStringSequenceFunction), (intptr_t) (1) } },
{ "stringSequenceFunction2", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestTypedefsPrototypeFunctionStringSequenceFunction2), (intptr_t) (1) } },
@@ -282,6 +290,38 @@
return JSTestSubObj::getConstructor(state.vm(), thisObject.globalObject());
}
+static inline JSValue jsTestTypedefsAttributeWithClampGetter(ExecState&, JSTestTypedefs&, ThrowScope& throwScope);
+
+EncodedJSValue jsTestTypedefsAttributeWithClamp(ExecState* state, EncodedJSValue thisValue, PropertyName)
+{
+ return BindingCaller<JSTestTypedefs>::attribute<jsTestTypedefsAttributeWithClampGetter>(state, thisValue, "attributeWithClamp");
+}
+
+static inline JSValue jsTestTypedefsAttributeWithClampGetter(ExecState& state, JSTestTypedefs& thisObject, ThrowScope& throwScope)
+{
+ UNUSED_PARAM(throwScope);
+ UNUSED_PARAM(state);
+ auto& impl = thisObject.wrapped();
+ JSValue result = toJS<IDLUnsignedLongLong>(impl.attributeWithClamp());
+ return result;
+}
+
+static inline JSValue jsTestTypedefsAttributeWithClampInTypedefGetter(ExecState&, JSTestTypedefs&, ThrowScope& throwScope);
+
+EncodedJSValue jsTestTypedefsAttributeWithClampInTypedef(ExecState* state, EncodedJSValue thisValue, PropertyName)
+{
+ return BindingCaller<JSTestTypedefs>::attribute<jsTestTypedefsAttributeWithClampInTypedefGetter>(state, thisValue, "attributeWithClampInTypedef");
+}
+
+static inline JSValue jsTestTypedefsAttributeWithClampInTypedefGetter(ExecState& state, JSTestTypedefs& thisObject, ThrowScope& throwScope)
+{
+ UNUSED_PARAM(throwScope);
+ UNUSED_PARAM(state);
+ auto& impl = thisObject.wrapped();
+ JSValue result = toJS<IDLLong>(impl.attributeWithClampInTypedef());
+ return result;
+}
+
static inline JSValue jsTestTypedefsAttrWithGetterExceptionGetter(ExecState&, JSTestTypedefs&, ThrowScope& throwScope);
EncodedJSValue jsTestTypedefsAttrWithGetterException(ExecState* state, EncodedJSValue thisValue, PropertyName)
@@ -408,6 +448,44 @@
}
+static inline bool setJSTestTypedefsAttributeWithClampFunction(ExecState&, JSTestTypedefs&, JSValue, ThrowScope&);
+
+bool setJSTestTypedefsAttributeWithClamp(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
+{
+ return BindingCaller<JSTestTypedefs>::setAttribute<setJSTestTypedefsAttributeWithClampFunction>(state, thisValue, encodedValue, "attributeWithClamp");
+}
+
+static inline bool setJSTestTypedefsAttributeWithClampFunction(ExecState& state, JSTestTypedefs& thisObject, JSValue value, ThrowScope& throwScope)
+{
+ UNUSED_PARAM(state);
+ UNUSED_PARAM(throwScope);
+ auto& impl = thisObject.wrapped();
+ auto nativeValue = convert<IDLUnsignedLongLong>(state, value, IntegerConversionConfiguration::Clamp);
+ RETURN_IF_EXCEPTION(throwScope, false);
+ impl.setAttributeWithClamp(WTFMove(nativeValue));
+ return true;
+}
+
+
+static inline bool setJSTestTypedefsAttributeWithClampInTypedefFunction(ExecState&, JSTestTypedefs&, JSValue, ThrowScope&);
+
+bool setJSTestTypedefsAttributeWithClampInTypedef(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
+{
+ return BindingCaller<JSTestTypedefs>::setAttribute<setJSTestTypedefsAttributeWithClampInTypedefFunction>(state, thisValue, encodedValue, "attributeWithClampInTypedef");
+}
+
+static inline bool setJSTestTypedefsAttributeWithClampInTypedefFunction(ExecState& state, JSTestTypedefs& thisObject, JSValue value, ThrowScope& throwScope)
+{
+ UNUSED_PARAM(state);
+ UNUSED_PARAM(throwScope);
+ auto& impl = thisObject.wrapped();
+ auto nativeValue = convert<IDLLong>(state, value, IntegerConversionConfiguration::Clamp);
+ RETURN_IF_EXCEPTION(throwScope, false);
+ impl.setAttributeWithClampInTypedef(WTFMove(nativeValue));
+ return true;
+}
+
+
static inline bool setJSTestTypedefsAttrWithGetterExceptionFunction(ExecState&, JSTestTypedefs&, JSValue, ThrowScope&);
bool setJSTestTypedefsAttrWithGetterException(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
@@ -676,6 +754,26 @@
return JSValue::encode(jsUndefined());
}
+static inline JSC::EncodedJSValue jsTestTypedefsPrototypeFunctionFuncWithClampInTypedefCaller(JSC::ExecState*, JSTestTypedefs*, JSC::ThrowScope&);
+
+EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionFuncWithClampInTypedef(ExecState* state)
+{
+ return BindingCaller<JSTestTypedefs>::callOperation<jsTestTypedefsPrototypeFunctionFuncWithClampInTypedefCaller>(state, "funcWithClampInTypedef");
+}
+
+static inline JSC::EncodedJSValue jsTestTypedefsPrototypeFunctionFuncWithClampInTypedefCaller(JSC::ExecState* state, JSTestTypedefs* castedThis, JSC::ThrowScope& throwScope)
+{
+ UNUSED_PARAM(state);
+ UNUSED_PARAM(throwScope);
+ auto& impl = castedThis->wrapped();
+ if (UNLIKELY(state->argumentCount() < 1))
+ return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
+ auto arg = convert<IDLLong>(*state, state->uncheckedArgument(0), IntegerConversionConfiguration::Clamp);
+ RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
+ impl.funcWithClampInTypedef(WTFMove(arg));
+ return JSValue::encode(jsUndefined());
+}
+
static inline JSC::EncodedJSValue jsTestTypedefsPrototypeFunctionImmutablePointFunctionCaller(JSC::ExecState*, JSTestTypedefs*, JSC::ThrowScope&);
EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionImmutablePointFunction(ExecState* state)
Modified: trunk/Source/WebCore/bindings/scripts/test/TestObj.idl (215329 => 215330)
--- trunk/Source/WebCore/bindings/scripts/test/TestObj.idl 2017-04-13 18:53:23 UTC (rev 215329)
+++ trunk/Source/WebCore/bindings/scripts/test/TestObj.idl 2017-04-13 19:19:49 UTC (rev 215330)
@@ -62,8 +62,8 @@
attribute byte byteAttr;
attribute octet octetAttr;
[Unscopable] attribute short shortAttr;
- [Clamp] attribute short clampedShortAttr;
- [EnforceRange] attribute short enforceRangeShortAttr;
+ attribute [Clamp] short clampedShortAttr;
+ attribute [EnforceRange] short enforceRangeShortAttr;
attribute unsigned short unsignedShortAttr;
attribute long longAttr;
attribute long long longLongAttr;
@@ -74,9 +74,9 @@
attribute TestObj? testNullableObjAttr;
[LenientThis] attribute TestObj lenientTestObjAttr;
[Unforgeable] readonly attribute DOMString unforgeableAttr;
- [TreatNullAs=EmptyString] attribute DOMString stringAttrTreatingNullAsEmptyString;
- [TreatNullAs=EmptyString] attribute USVString usvstringAttrTreatingNullAsEmptyString;
- [TreatNullAs=EmptyString] attribute ByteString byteStringAttrTreatingNullAsEmptyString;
+ attribute [TreatNullAs=EmptyString] DOMString stringAttrTreatingNullAsEmptyString;
+ attribute [TreatNullAs=EmptyString] USVString usvstringAttrTreatingNullAsEmptyString;
+ attribute [TreatNullAs=EmptyString] ByteString byteStringAttrTreatingNullAsEmptyString;
attribute record<DOMString, long> stringLongRecordAttr;
attribute record<USVString, long> usvstringLongRecordAttr;
attribute record<ByteString, long> usvstringLongRecordAttr;
@@ -214,15 +214,15 @@
void methodWithNonOptionalArgAndTwoOptionalArgs(long nonOpt, optional long opt1, optional long opt2);
void methodWithOptionalString(optional DOMString str);
void methodWithOptionalUSVString(optional USVString str);
- void methodWithOptionalAtomicString([AtomicString] optional DOMString str);
+ void methodWithOptionalAtomicString(optional [AtomicString] DOMString str);
void methodWithOptionalStringAndDefaultValue(optional DOMString str = "foo");
- void methodWithOptionalAtomicStringAndDefaultValue([AtomicString] optional DOMString str = "foo");
+ void methodWithOptionalAtomicStringAndDefaultValue(optional [AtomicString] DOMString str = "foo");
void methodWithOptionalStringIsNull(optional DOMString str = null);
void methodWithOptionalStringIsUndefined(optional DOMString str = "undefined");
- void methodWithOptionalAtomicStringIsNull([AtomicString] optional DOMString str = null);
+ void methodWithOptionalAtomicStringIsNull(optional [AtomicString] DOMString str = null);
void methodWithOptionalStringIsEmptyString(optional DOMString str = "");
void methodWithOptionalUSVStringIsEmptyString(optional USVString str = "");
- void methodWithOptionalAtomicStringIsEmptyString([AtomicString] optional DOMString str = "");
+ void methodWithOptionalAtomicStringIsEmptyString(optional [AtomicString] DOMString str = "");
void methodWithOptionalDoubleIsNaN(optional unrestricted double number = NaN);
void methodWithOptionalFloatIsNaN(optional unrestricted float number = NaN);
void methodWithOptionalLongLong(optional long long number);
@@ -324,7 +324,9 @@
[Conditional=Condition1] static void overloadedMethod1(DOMString type);
void classMethodWithClamp([Clamp] unsigned short objArgsShort, [Clamp] unsigned long objArgsLong);
+ void classMethodWithClampOnOptional(optional [Clamp] long objArgsLong = 0);
void classMethodWithEnforceRange([EnforceRange] unsigned short objArgsShort, [EnforceRange] unsigned long objArgsLong);
+ void classMethodWithEnforceRangeOnOptional(optional [EnforceRange] long objArgsLong = 0);
void methodWithUnsignedLongSequence(sequence<unsigned long> unsignedLongSequence);
[MayThrowException] sequence<DOMString> stringArrayFunction(sequence<DOMString> values);
Modified: trunk/Source/WebCore/bindings/scripts/test/TestTypedefs.idl (215329 => 215330)
--- trunk/Source/WebCore/bindings/scripts/test/TestTypedefs.idl 2017-04-13 18:53:23 UTC (rev 215329)
+++ trunk/Source/WebCore/bindings/scripts/test/TestTypedefs.idl 2017-04-13 19:19:49 UTC (rev 215330)
@@ -53,8 +53,12 @@
void unionArg(UNION_STRING_LONG unionArg);
- void funcWithClamp([Clamp] ULONGLONG arg1, [Clamp] optional ULONGLONG arg2);
+ void funcWithClamp([Clamp] ULONGLONG arg1, optional [Clamp] ULONGLONG arg2);
+ void funcWithClampInTypedef(CLAMPED_LONG arg);
+ attribute [Clamp] ULONGLONG attributeWithClamp;
+ attribute CLAMPED_LONG attributeWithClampInTypedef;
+
[Immutable] SVGPOINT immutablePointFunction();
[MayThrowException] SEQUENCE_OF_STRINGS stringSequenceFunction(SEQUENCE_OF_STRINGS values);
@@ -75,6 +79,7 @@
typedef SerializedScriptValue SCRIPT_VALUE;
typedef sequence<long> SEQUENCE_OF_LONGS;
typedef long? NULLABLE_LONG;
+typedef [Clamp] long CLAMPED_LONG;
typedef SVGPoint SVGPOINT;
typedef DOMString STRING;
typedef sequence<DOMString> SEQUENCE_OF_STRINGS;
Modified: trunk/Source/WebCore/crypto/parameters/AesCtrParams.idl (215329 => 215330)
--- trunk/Source/WebCore/crypto/parameters/AesCtrParams.idl 2017-04-13 18:53:23 UTC (rev 215329)
+++ trunk/Source/WebCore/crypto/parameters/AesCtrParams.idl 2017-04-13 19:19:49 UTC (rev 215330)
@@ -36,5 +36,5 @@
required BufferSource counter;
// The length, in bits, of the rightmost part of the counter block
// that is incremented.
- [EnforceRange] required octet length;
+ required [EnforceRange] octet length;
};
Modified: trunk/Source/WebCore/crypto/parameters/AesKeyParams.idl (215329 => 215330)
--- trunk/Source/WebCore/crypto/parameters/AesKeyParams.idl 2017-04-13 18:53:23 UTC (rev 215329)
+++ trunk/Source/WebCore/crypto/parameters/AesKeyParams.idl 2017-04-13 19:19:49 UTC (rev 215330)
@@ -31,5 +31,5 @@
ImplementedAs=CryptoAlgorithmAesKeyParams
] dictionary AesKeyParams : CryptoAlgorithmParameters {
// The length, in bits, of the key.
- [EnforceRange] required unsigned short length;
+ required [EnforceRange] unsigned short length;
};
Modified: trunk/Source/WebCore/crypto/parameters/Pbkdf2Params.idl (215329 => 215330)
--- trunk/Source/WebCore/crypto/parameters/Pbkdf2Params.idl 2017-04-13 18:53:23 UTC (rev 215329)
+++ trunk/Source/WebCore/crypto/parameters/Pbkdf2Params.idl 2017-04-13 19:19:49 UTC (rev 215330)
@@ -28,6 +28,6 @@
ImplementedAs=CryptoAlgorithmPbkdf2Params,
] dictionary Pbkdf2Params : CryptoAlgorithmParameters {
required BufferSource salt;
- [EnforceRange] required unsigned long iterations;
+ required [EnforceRange] unsigned long iterations;
required any hash;
};
Modified: trunk/Source/WebCore/crypto/parameters/RsaKeyGenParams.idl (215329 => 215330)
--- trunk/Source/WebCore/crypto/parameters/RsaKeyGenParams.idl 2017-04-13 18:53:23 UTC (rev 215329)
+++ trunk/Source/WebCore/crypto/parameters/RsaKeyGenParams.idl 2017-04-13 19:19:49 UTC (rev 215330)
@@ -28,7 +28,7 @@
ImplementedAs=CryptoAlgorithmRsaKeyGenParams
] dictionary RsaKeyGenParams : CryptoAlgorithmParameters {
// The length, in bits, of the RSA modulus
- [EnforceRange] required unsigned long modulusLength;
+ required [EnforceRange] unsigned long modulusLength;
// The RSA public exponent
required Uint8Array publicExponent;
};
Modified: trunk/Source/WebCore/css/CSSStyleDeclaration.idl (215329 => 215330)
--- trunk/Source/WebCore/css/CSSStyleDeclaration.idl 2017-04-13 18:53:23 UTC (rev 215329)
+++ trunk/Source/WebCore/css/CSSStyleDeclaration.idl 2017-04-13 19:19:49 UTC (rev 215330)
@@ -38,7 +38,7 @@
[CEReactions, MayThrowException] DOMString removeProperty(DOMString propertyName);
DOMString? getPropertyPriority(DOMString propertyName);
- [CEReactions, MayThrowException] void setProperty(DOMString propertyName, [TreatNullAs=EmptyString] DOMString value, [TreatNullAs=EmptyString] optional DOMString priority = "");
+ [CEReactions, MayThrowException] void setProperty(DOMString propertyName, [TreatNullAs=EmptyString] DOMString value, optional [TreatNullAs=EmptyString] DOMString priority = "");
readonly attribute unsigned long length;
getter DOMString item(unsigned long index);
Modified: trunk/Source/WebCore/css/MediaList.idl (215329 => 215330)
--- trunk/Source/WebCore/css/MediaList.idl 2017-04-13 18:53:23 UTC (rev 215329)
+++ trunk/Source/WebCore/css/MediaList.idl 2017-04-13 19:19:49 UTC (rev 215330)
@@ -29,7 +29,7 @@
ImplementationLacksVTable,
JSCustomHeader,
] interface MediaList {
- [SetterMayThrowException, TreatNullAs=EmptyString] attribute DOMString mediaText;
+ [SetterMayThrowException] attribute [TreatNullAs=EmptyString] DOMString mediaText;
readonly attribute unsigned long length;
getter DOMString? item(unsigned long index);
Modified: trunk/Source/WebCore/dom/CharacterData.idl (215329 => 215330)
--- trunk/Source/WebCore/dom/CharacterData.idl 2017-04-13 18:53:23 UTC (rev 215329)
+++ trunk/Source/WebCore/dom/CharacterData.idl 2017-04-13 19:19:49 UTC (rev 215330)
@@ -18,7 +18,7 @@
*/
interface CharacterData : Node {
- [CEReactions, TreatNullAs=EmptyString] attribute DOMString data;
+ [CEReactions] attribute [TreatNullAs=EmptyString] DOMString data;
readonly attribute unsigned long length;
[MayThrowException] DOMString? substringData(unsigned long offset, unsigned long length);
Modified: trunk/Source/WebCore/dom/Element.idl (215329 => 215330)
--- trunk/Source/WebCore/dom/Element.idl 2017-04-13 18:53:23 UTC (rev 215329)
+++ trunk/Source/WebCore/dom/Element.idl 2017-04-13 19:19:49 UTC (rev 215330)
@@ -97,8 +97,8 @@
sequence<DOMString> getAttributeNames();
HTMLCollection getElementsByClassName(DOMString name);
- [CEReactions, TreatNullAs=EmptyString, SetterMayThrowException] attribute DOMString innerHTML;
- [CEReactions, TreatNullAs=EmptyString, SetterMayThrowException] attribute DOMString outerHTML;
+ [CEReactions, SetterMayThrowException] attribute [TreatNullAs=EmptyString] DOMString innerHTML;
+ [CEReactions, SetterMayThrowException] attribute [TreatNullAs=EmptyString] DOMString outerHTML;
[CEReactions, Reflect=class] attribute DOMString className;
[PutForwards=value] readonly attribute DOMTokenList classList;
Modified: trunk/Source/WebCore/dom/ShadowRoot.idl (215329 => 215330)
--- trunk/Source/WebCore/dom/ShadowRoot.idl 2017-04-13 18:53:23 UTC (rev 215329)
+++ trunk/Source/WebCore/dom/ShadowRoot.idl 2017-04-13 19:19:49 UTC (rev 215330)
@@ -30,7 +30,7 @@
readonly attribute ShadowRootMode mode;
readonly attribute Element host;
- [CEReactions, SetterMayThrowException, TreatNullAs=EmptyString] attribute DOMString innerHTML;
+ [CEReactions, SetterMayThrowException] attribute [TreatNullAs=EmptyString] DOMString innerHTML;
};
ShadowRoot implements DocumentOrShadowRoot;
Modified: trunk/Source/WebCore/html/HTMLBodyElement.idl (215329 => 215330)
--- trunk/Source/WebCore/html/HTMLBodyElement.idl 2017-04-13 18:53:23 UTC (rev 215329)
+++ trunk/Source/WebCore/html/HTMLBodyElement.idl 2017-04-13 19:19:49 UTC (rev 215330)
@@ -19,12 +19,12 @@
*/
interface HTMLBodyElement : HTMLElement {
- [Reflect, TreatNullAs=EmptyString] attribute DOMString aLink;
+ [Reflect] attribute [TreatNullAs=EmptyString] DOMString aLink;
[Reflect] attribute DOMString background;
- [Reflect, TreatNullAs=EmptyString] attribute DOMString bgColor;
- [Reflect, TreatNullAs=EmptyString] attribute DOMString link;
- [Reflect, TreatNullAs=EmptyString] attribute DOMString text;
- [Reflect, TreatNullAs=EmptyString] attribute DOMString vLink;
+ [Reflect] attribute [TreatNullAs=EmptyString] DOMString bgColor;
+ [Reflect] attribute [TreatNullAs=EmptyString] DOMString link;
+ [Reflect] attribute [TreatNullAs=EmptyString] DOMString text;
+ [Reflect] attribute [TreatNullAs=EmptyString] DOMString vLink;
[NotEnumerable, WindowEventHandler] attribute EventHandler onblur;
[NotEnumerable, WindowEventHandler] attribute EventHandler onerror;
Modified: trunk/Source/WebCore/html/HTMLDocument.idl (215329 => 215330)
--- trunk/Source/WebCore/html/HTMLDocument.idl 2017-04-13 18:53:23 UTC (rev 215329)
+++ trunk/Source/WebCore/html/HTMLDocument.idl 2017-04-13 19:19:49 UTC (rev 215330)
@@ -38,9 +38,9 @@
void releaseEvents();
// Deprecated attributes.
- [TreatNullAs=EmptyString] attribute DOMString bgColor;
- [TreatNullAs=EmptyString] attribute DOMString fgColor;
- [TreatNullAs=EmptyString] attribute DOMString alinkColor;
- [TreatNullAs=EmptyString] attribute DOMString linkColor;
- [TreatNullAs=EmptyString] attribute DOMString vlinkColor;
+ attribute [TreatNullAs=EmptyString] DOMString bgColor;
+ attribute [TreatNullAs=EmptyString] DOMString fgColor;
+ attribute [TreatNullAs=EmptyString] DOMString alinkColor;
+ attribute [TreatNullAs=EmptyString] DOMString linkColor;
+ attribute [TreatNullAs=EmptyString] DOMString vlinkColor;
};
Modified: trunk/Source/WebCore/html/HTMLElement.idl (215329 => 215330)
--- trunk/Source/WebCore/html/HTMLElement.idl 2017-04-13 18:53:23 UTC (rev 215329)
+++ trunk/Source/WebCore/html/HTMLElement.idl 2017-04-13 19:19:49 UTC (rev 215330)
@@ -38,8 +38,8 @@
[CEReactions, Reflect] attribute boolean hidden;
[CEReactions, Reflect] attribute DOMString accessKey;
- [CEReactions, SetterMayThrowException, TreatNullAs=EmptyString] attribute DOMString innerText;
- [CEReactions, SetterMayThrowException, TreatNullAs=EmptyString] attribute DOMString outerText;
+ [CEReactions, SetterMayThrowException] attribute [TreatNullAs=EmptyString] DOMString innerText;
+ [CEReactions, SetterMayThrowException] attribute [TreatNullAs=EmptyString] DOMString outerText;
[CEReactions, SetterMayThrowException] attribute DOMString contentEditable;
readonly attribute boolean isContentEditable;
@@ -47,7 +47,7 @@
[CEReactions] attribute boolean spellcheck;
[Conditional=IOS_AUTOCORRECT_AND_AUTOCAPITALIZE] attribute boolean autocorrect;
- [Conditional=IOS_AUTOCORRECT_AND_AUTOCAPITALIZE, TreatNullAs=EmptyString] attribute DOMString autocapitalize;
+ [Conditional=IOS_AUTOCORRECT_AND_AUTOCAPITALIZE] attribute [TreatNullAs=EmptyString] DOMString autocapitalize;
void click();
Modified: trunk/Source/WebCore/html/HTMLFontElement.idl (215329 => 215330)
--- trunk/Source/WebCore/html/HTMLFontElement.idl 2017-04-13 18:53:23 UTC (rev 215329)
+++ trunk/Source/WebCore/html/HTMLFontElement.idl 2017-04-13 19:19:49 UTC (rev 215330)
@@ -18,7 +18,7 @@
*/
interface HTMLFontElement : HTMLElement {
- [Reflect, TreatNullAs=EmptyString] attribute DOMString color;
+ [Reflect] attribute [TreatNullAs=EmptyString] DOMString color;
[Reflect] attribute DOMString face;
[Reflect] attribute DOMString size;
};
Modified: trunk/Source/WebCore/html/HTMLFrameElement.idl (215329 => 215330)
--- trunk/Source/WebCore/html/HTMLFrameElement.idl 2017-04-13 18:53:23 UTC (rev 215329)
+++ trunk/Source/WebCore/html/HTMLFrameElement.idl 2017-04-13 19:19:49 UTC (rev 215330)
@@ -28,8 +28,8 @@
[CheckSecurityForNode] readonly attribute Document contentDocument;
readonly attribute DOMWindow contentWindow;
- [Reflect, TreatNullAs=EmptyString] attribute DOMString marginHeight;
- [Reflect, TreatNullAs=EmptyString] attribute DOMString marginWidth;
+ [Reflect] attribute [TreatNullAs=EmptyString] DOMString marginHeight;
+ [Reflect] attribute [TreatNullAs=EmptyString] DOMString marginWidth;
[CheckSecurityForNode, MayThrowException] Document getSVGDocument();
Modified: trunk/Source/WebCore/html/HTMLIFrameElement.idl (215329 => 215330)
--- trunk/Source/WebCore/html/HTMLIFrameElement.idl 2017-04-13 18:53:23 UTC (rev 215329)
+++ trunk/Source/WebCore/html/HTMLIFrameElement.idl 2017-04-13 19:19:49 UTC (rev 215330)
@@ -23,8 +23,8 @@
[Reflect] attribute DOMString frameBorder;
[Reflect] attribute DOMString height;
[Reflect, URL] attribute USVString longDesc;
- [Reflect, TreatNullAs=EmptyString] attribute DOMString marginHeight;
- [Reflect, TreatNullAs=EmptyString] attribute DOMString marginWidth;
+ [Reflect] attribute [TreatNullAs=EmptyString] DOMString marginHeight;
+ [Reflect] attribute [TreatNullAs=EmptyString] DOMString marginWidth;
[Reflect] attribute DOMString name;
[PutForwards=value] readonly attribute DOMTokenList sandbox;
Modified: trunk/Source/WebCore/html/HTMLImageElement.idl (215329 => 215330)
--- trunk/Source/WebCore/html/HTMLImageElement.idl 2017-04-13 18:53:23 UTC (rev 215329)
+++ trunk/Source/WebCore/html/HTMLImageElement.idl 2017-04-13 19:19:49 UTC (rev 215330)
@@ -27,7 +27,7 @@
[Reflect] attribute DOMString name;
[Reflect] attribute DOMString align;
[Reflect] attribute DOMString alt;
- [Reflect, TreatNullAs=EmptyString] attribute DOMString border;
+ [Reflect] attribute [TreatNullAs=EmptyString] DOMString border;
attribute DOMString? crossOrigin;
attribute unsigned long height;
[Reflect] attribute unsigned long hspace;
Modified: trunk/Source/WebCore/html/HTMLInputElement.idl (215329 => 215330)
--- trunk/Source/WebCore/html/HTMLInputElement.idl 2017-04-13 18:53:23 UTC (rev 215329)
+++ trunk/Source/WebCore/html/HTMLInputElement.idl 2017-04-13 19:19:49 UTC (rev 215330)
@@ -59,7 +59,7 @@
attribute DOMString type; // readonly dropped as part of DOM level 2
attribute DOMString defaultValue;
// See the discussion in https://bugs.webkit.org/show_bug.cgi?id=100085
- [TreatNullAs=EmptyString, SetterMayThrowException] attribute DOMString value;
+ [SetterMayThrowException] attribute [TreatNullAs=EmptyString] DOMString value;
[SetterMayThrowException] attribute Date? valueAsDate;
[SetterMayThrowException] attribute unrestricted double valueAsNumber;
Modified: trunk/Source/WebCore/html/HTMLObjectElement.idl (215329 => 215330)
--- trunk/Source/WebCore/html/HTMLObjectElement.idl 2017-04-13 18:53:23 UTC (rev 215329)
+++ trunk/Source/WebCore/html/HTMLObjectElement.idl 2017-04-13 19:19:49 UTC (rev 215330)
@@ -27,7 +27,7 @@
[Reflect] attribute DOMString code;
[Reflect] attribute DOMString align;
[Reflect] attribute DOMString archive;
- [Reflect, TreatNullAs=EmptyString] attribute DOMString border;
+ [Reflect] attribute [TreatNullAs=EmptyString] DOMString border;
[Reflect, URL] attribute USVString codeBase;
[Reflect] attribute DOMString codeType;
[Reflect, URL] attribute USVString data;
Modified: trunk/Source/WebCore/html/HTMLOutputElement.idl (215329 => 215330)
--- trunk/Source/WebCore/html/HTMLOutputElement.idl 2017-04-13 18:53:23 UTC (rev 215329)
+++ trunk/Source/WebCore/html/HTMLOutputElement.idl 2017-04-13 19:19:49 UTC (rev 215330)
@@ -29,8 +29,8 @@
[Reflect] attribute DOMString name;
readonly attribute DOMString type;
- [CEReactions, TreatNullAs=EmptyString] attribute DOMString defaultValue;
- [CEReactions, TreatNullAs=EmptyString] attribute DOMString value;
+ [CEReactions] attribute [TreatNullAs=EmptyString] DOMString defaultValue;
+ [CEReactions] attribute [TreatNullAs=EmptyString] DOMString value;
readonly attribute boolean willValidate;
readonly attribute ValidityState validity;
Modified: trunk/Source/WebCore/html/HTMLTableCellElement.idl (215329 => 215330)
--- trunk/Source/WebCore/html/HTMLTableCellElement.idl 2017-04-13 18:53:23 UTC (rev 215329)
+++ trunk/Source/WebCore/html/HTMLTableCellElement.idl 2017-04-13 19:19:49 UTC (rev 215330)
@@ -22,7 +22,7 @@
readonly attribute long cellIndex;
[Reflect] attribute DOMString align;
[Reflect] attribute DOMString axis;
- [Reflect, TreatNullAs=EmptyString] attribute DOMString bgColor;
+ [Reflect] attribute [TreatNullAs=EmptyString] DOMString bgColor;
[Reflect=char] attribute DOMString ch;
[Reflect=charoff] attribute DOMString chOff;
Modified: trunk/Source/WebCore/html/HTMLTableElement.idl (215329 => 215330)
--- trunk/Source/WebCore/html/HTMLTableElement.idl 2017-04-13 18:53:23 UTC (rev 215329)
+++ trunk/Source/WebCore/html/HTMLTableElement.idl 2017-04-13 19:19:49 UTC (rev 215330)
@@ -26,10 +26,10 @@
readonly attribute HTMLCollection rows;
readonly attribute HTMLCollection tBodies;
[Reflect] attribute DOMString align;
- [Reflect, TreatNullAs=EmptyString] attribute DOMString bgColor;
+ [Reflect] attribute [TreatNullAs=EmptyString] DOMString bgColor;
[Reflect] attribute DOMString border;
- [Reflect, TreatNullAs=EmptyString] attribute DOMString cellPadding;
- [Reflect, TreatNullAs=EmptyString] attribute DOMString cellSpacing;
+ [Reflect] attribute [TreatNullAs=EmptyString] DOMString cellPadding;
+ [Reflect] attribute [TreatNullAs=EmptyString] DOMString cellSpacing;
[Reflect] attribute DOMString frame;
Modified: trunk/Source/WebCore/html/HTMLTableRowElement.idl (215329 => 215330)
--- trunk/Source/WebCore/html/HTMLTableRowElement.idl 2017-04-13 18:53:23 UTC (rev 215329)
+++ trunk/Source/WebCore/html/HTMLTableRowElement.idl 2017-04-13 19:19:49 UTC (rev 215330)
@@ -23,7 +23,7 @@
readonly attribute long sectionRowIndex;
readonly attribute HTMLCollection cells;
[Reflect] attribute DOMString align;
- [Reflect, TreatNullAs=EmptyString] attribute DOMString bgColor;
+ [Reflect] attribute [TreatNullAs=EmptyString] DOMString bgColor;
[Reflect=char] attribute DOMString ch;
[Reflect=charoff] attribute DOMString chOff;
[Reflect] attribute DOMString vAlign;
Modified: trunk/Source/WebCore/html/HTMLTextAreaElement.idl (215329 => 215330)
--- trunk/Source/WebCore/html/HTMLTextAreaElement.idl 2017-04-13 18:53:23 UTC (rev 215329)
+++ trunk/Source/WebCore/html/HTMLTextAreaElement.idl 2017-04-13 19:19:49 UTC (rev 215330)
@@ -36,7 +36,7 @@
readonly attribute DOMString type;
attribute DOMString defaultValue;
- [TreatNullAs=EmptyString] attribute DOMString value;
+ attribute [TreatNullAs=EmptyString] DOMString value;
readonly attribute unsigned long textLength;
readonly attribute boolean willValidate;
Modified: trunk/Source/WebCore/page/DOMWindow.idl (215329 => 215330)
--- trunk/Source/WebCore/page/DOMWindow.idl 2017-04-13 18:53:23 UTC (rev 215329)
+++ trunk/Source/WebCore/page/DOMWindow.idl 2017-04-13 19:19:49 UTC (rev 215330)
@@ -70,7 +70,7 @@
void print();
void stop();
- [Custom] DOMWindow open(optional USVString url = "" optional DOMString target = "_blank", [TreatNullAs=EmptyString] optional DOMString features = "");
+ [Custom] DOMWindow open(optional USVString url = "" optional DOMString target = "_blank", optional [TreatNullAs=EmptyString] DOMString features = "");
[Custom] any showModalDialog(DOMString url, optional any dialogArgs, optional DOMString featureArgs);
Modified: trunk/Source/WebCore/testing/TypeConversions.idl (215329 => 215330)
--- trunk/Source/WebCore/testing/TypeConversions.idl 2017-04-13 18:53:23 UTC (rev 215329)
+++ trunk/Source/WebCore/testing/TypeConversions.idl 2017-04-13 19:19:49 UTC (rev 215330)
@@ -31,24 +31,24 @@
ExportMacro=WEBCORE_TESTSUPPORT_EXPORT,
] interface TypeConversions {
attribute long testLong;
- [EnforceRange] attribute long testEnforceRangeLong;
+ attribute [EnforceRange] long testEnforceRangeLong;
attribute unsigned long testUnsignedLong;
- [EnforceRange] attribute unsigned long testEnforceRangeUnsignedLong;
+ attribute [EnforceRange] unsigned long testEnforceRangeUnsignedLong;
attribute long long testLongLong;
- [EnforceRange] attribute long long testEnforceRangeLongLong;
+ attribute [EnforceRange] long long testEnforceRangeLongLong;
attribute unsigned long long testUnsignedLongLong;
- [EnforceRange] attribute unsigned long long testEnforceRangeUnsignedLongLong;
+ attribute [EnforceRange] unsigned long long testEnforceRangeUnsignedLongLong;
attribute byte testByte;
- [EnforceRange] attribute byte testEnforceRangeByte;
+ attribute [EnforceRange] byte testEnforceRangeByte;
attribute octet testOctet;
- [EnforceRange] attribute octet testEnforceRangeOctet;
+ attribute [EnforceRange] octet testEnforceRangeOctet;
attribute short testShort;
- [EnforceRange] attribute short testEnforceRangeShort;
+ attribute [EnforceRange] short testEnforceRangeShort;
attribute unsigned short testUnsignedShort;
- [EnforceRange] attribute unsigned short testEnforceRangeUnsignedShort;
+ attribute [EnforceRange] unsigned short testEnforceRangeUnsignedShort;
attribute DOMString testString;
attribute ByteString testByteString;