Commit ba484895 authored by schenney@chromium.org's avatar schenney@chromium.org

Revert of IDL: Support optional argument default value syntax...

Revert of IDL: Support optional argument default value syntax (https://codereview.chromium.org/312683005/)

Reason for revert:
This patch is the most likely candidate for browser test failures: http://build.chromium.org/p/chromium.webkit/builders/Linux%20Tests%20%28dbg%29/builds/2905

BrowserTestBase signal handler received SIGTERM. Backtrace:
#0 0x7f2c2a201a1d base::debug::StackTrace::StackTrace()
#1 0x00000460caf2 content::(anonymous namespace)::DumpStackTraceSignalHandler()
#2 0x7f2c232cd4a0 \u003Cunknown>
#3 0x7f2c2337f313 __poll
#4 0x7f2c240b6036 \u003Cunknown>
#5 0x7f2c240b6164 g_main_context_iteration
#6 0x7f2c2a1c9b45 base::MessagePumpGlib::Run()
#7 0x7f2c2a29eed7 base::MessageLoop::RunHandler()
#8 0x7f2c2a2f69d8 base::RunLoop::Run()
#9 0x00000466bd59 content::RunThisRunLoop()
#10 0x00000466c1b8 content::MessageLoopRunner::Run()
#11 0x000004610946 content::TitleWatcher::WaitAndGetTitle()
#12 0x0000011fdf00 MediaBrowserTest::RunTest()
#13 0x0000011fdc00 MediaBrowserTest::RunMediaTestPage()
#14 0x0000011ec98b EncryptedMediaTestBase::RunEncryptedMediaTestPage()
#15 0x0000011ee5fa EncryptedMediaTest::TestConfigChange()
#16 0x0000011eb73a EncryptedMediaTest_ConfigChangeVideo_Test::RunTestOnMainThread()
...

Please look into it. An alterate possible candidate is  https://codereview.chromium.org/327553002 but I think that's less likely.

Original issue's description:
> IDL: Support optional argument default value syntax
> 
> Adds support for parsing default values of different types, but
> only handles null default values when generating code.
> 
> Replaces existing
> 
>   [Default=Null] optional SomeInterface arg
>   [Default=NullString] optional DOMString arg
> 
> with the now equivalent
> 
>   optional SomeInterface arg = null
>   optional DOMString arg = null
> 
> in IDL files, and drops support for those [Default] attributes.
> 
> No changes to generated code.
> 
> BUG=258153
> 
> Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=176200

TBR=nbarth@chromium.org,haraken@chromium.org,pavan.e@samsung.com,jsbell@chromium.org,jl@opera.com
NOTREECHECKS=true
NOTRY=true
BUG=258153

Review URL: https://codereview.chromium.org/339683002

git-svn-id: svn://svn.chromium.org/blink/trunk@176220 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent c619488a
...@@ -46,7 +46,7 @@ ConstructorCallWith=ExecutionContext|Document ...@@ -46,7 +46,7 @@ ConstructorCallWith=ExecutionContext|Document
Custom=|Getter|Setter|LegacyCallAsFunction|ToV8|VisitDOMWrapper|Wrap|PropertyGetter|PropertyEnumerator|PropertyQuery Custom=|Getter|Setter|LegacyCallAsFunction|ToV8|VisitDOMWrapper|Wrap|PropertyGetter|PropertyEnumerator|PropertyQuery
CustomConstructor CustomConstructor
CustomElementCallbacks CustomElementCallbacks
Default=Undefined Default=Null|NullString|Undefined
DependentLifetime DependentLifetime
DeprecateAs=* DeprecateAs=*
DoNotCheckConstants DoNotCheckConstants
......
...@@ -393,59 +393,6 @@ class IdlConstant(TypedObject): ...@@ -393,59 +393,6 @@ class IdlConstant(TypedObject):
self.extended_attributes = {} self.extended_attributes = {}
################################################################################
# Literals
################################################################################
class IdlLiteral(object):
def __init__(self, idl_type, value):
self.idl_type = idl_type
self.value = value
self.is_null = False
def __str__(self):
if self.idl_type == 'DOMString':
return 'String("%s")' % self.value
if self.idl_type == 'integer':
return '%d' % self.value
if self.idl_type == 'float':
return '%g' % self.value
if self.idl_type == 'boolean':
return 'true' if self.value else 'false'
raise ValueError('Unsupported literal type: %s' % self.idl_type)
class IdlLiteralNull(IdlLiteral):
def __init__(self):
self.idl_type = 'NULL'
self.value = None
self.is_null = True
def __str__(self):
return 'nullptr'
def default_node_to_idl_literal(node):
# FIXME: This code is unnecessarily complicated due to the rather
# inconsistent way the upstream IDL parser outputs default values.
# http://crbug.com/374178
idl_type = node.GetProperty('TYPE')
if idl_type == 'DOMString':
value = node.GetProperty('NAME')
if '"' in value or '\\' in value:
raise ValueError('Unsupported string value: %r' % value)
return IdlLiteral(idl_type, value)
if idl_type == 'integer':
return IdlLiteral(idl_type, int(node.GetProperty('NAME')))
if idl_type == 'float':
return IdlLiteral(idl_type, float(node.GetProperty('VALUE')))
if idl_type == 'boolean':
return IdlLiteral(idl_type, node.GetProperty('VALUE'))
if idl_type == 'NULL':
return IdlLiteralNull()
raise ValueError('Unrecognized default value type: %s' % idl_type)
################################################################################ ################################################################################
# Operations # Operations
################################################################################ ################################################################################
...@@ -528,7 +475,6 @@ class IdlArgument(TypedObject): ...@@ -528,7 +475,6 @@ class IdlArgument(TypedObject):
self.is_optional = node.GetProperty('OPTIONAL') # syntax: (optional T) self.is_optional = node.GetProperty('OPTIONAL') # syntax: (optional T)
self.is_variadic = False # syntax: (T...) self.is_variadic = False # syntax: (T...)
self.name = node.GetName() self.name = node.GetName()
self.default_value = None
children = node.GetChildren() children = node.GetChildren()
for child in children: for child in children:
...@@ -542,8 +488,6 @@ class IdlArgument(TypedObject): ...@@ -542,8 +488,6 @@ class IdlArgument(TypedObject):
if child_name != '...': if child_name != '...':
raise ValueError('Unrecognized Argument node; expected "...", got "%s"' % child_name) raise ValueError('Unrecognized Argument node; expected "...", got "%s"' % child_name)
self.is_variadic = child.GetProperty('ELLIPSIS') or False self.is_variadic = child.GetProperty('ELLIPSIS') or False
elif child_class == 'Default':
self.default_value = default_node_to_idl_literal(child)
else: else:
raise ValueError('Unrecognized node class: %s' % child_class) raise ValueError('Unrecognized node class: %s' % child_class)
......
...@@ -181,11 +181,8 @@ def generate_argument(interface, method, argument, index): ...@@ -181,11 +181,8 @@ def generate_argument(interface, method, argument, index):
used_as_argument=True, used_as_argument=True,
used_as_variadic_argument=argument.is_variadic), used_as_variadic_argument=argument.is_variadic),
'cpp_value': this_cpp_value, 'cpp_value': this_cpp_value,
# FIXME: check that the default value's type is compatible with the argument's
'default_value': str(argument.default_value) if argument.default_value else None,
'enum_validation_expression': idl_type.enum_validation_expression, 'enum_validation_expression': idl_type.enum_validation_expression,
# FIXME: remove once [Default] removed and just use argument.default_value 'has_default': 'Default' in extended_attributes,
'has_default': 'Default' in extended_attributes or argument.default_value,
'has_event_listener_argument': any( 'has_event_listener_argument': any(
argument_so_far for argument_so_far in method.arguments[:index] argument_so_far for argument_so_far in method.arguments[:index]
if argument_so_far.idl_type.name == 'EventListener'), if argument_so_far.idl_type.name == 'EventListener'),
...@@ -301,10 +298,9 @@ def v8_value_to_local_cpp_value(argument, index): ...@@ -301,10 +298,9 @@ def v8_value_to_local_cpp_value(argument, index):
name = argument.name name = argument.name
if argument.is_variadic: if argument.is_variadic:
return v8_value_to_local_cpp_variadic_value(argument, index) return v8_value_to_local_cpp_variadic_value(argument, index)
# FIXME: This special way of handling string arguments with null defaults # [Default=NullString]
# can go away once we fully support default values.
if (argument.is_optional and idl_type.name in ('String', 'ByteString') and if (argument.is_optional and idl_type.name in ('String', 'ByteString') and
argument.default_value and argument.default_value.is_null): extended_attributes.get('Default') == 'NullString'):
v8_value = 'argumentOrNull(info, %s)' % index v8_value = 'argumentOrNull(info, %s)' % index
else: else:
v8_value = 'info[%s]' % index v8_value = 'info[%s]' % index
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
TestInterfaceEmpty testInterfaceEmptyArg, TestInterfaceEmpty testInterfaceEmptyArg,
long longArg, long longArg,
[Default=Undefined] optional DOMString defaultUndefinedOptionalStringArg, [Default=Undefined] optional DOMString defaultUndefinedOptionalStringArg,
optional DOMString defaultNullStringOptionalStringArg = null, [Default=NullString] optional DOMString defaultNullStringOptionalStringArg,
[Default=Undefined] optional Dictionary defaultUndefinedOptionalDictionaryArg, [Default=Undefined] optional Dictionary defaultUndefinedOptionalDictionaryArg,
optional DOMString optionalStringArg), optional DOMString optionalStringArg),
] interface TestInterfaceConstructor2 { ] interface TestInterfaceConstructor2 {
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
[Default=Undefined] optional boolean defaultUndefinedOptionalBooleanArg, [Default=Undefined] optional boolean defaultUndefinedOptionalBooleanArg,
[Default=Undefined] optional long defaultUndefinedOptionalLongArg, [Default=Undefined] optional long defaultUndefinedOptionalLongArg,
[Default=Undefined] optional DOMString defaultUndefinedOptionalStringArg, [Default=Undefined] optional DOMString defaultUndefinedOptionalStringArg,
optional DOMString defaultNullStringOptionalstringArg = null, [Default=NullString] optional DOMString defaultNullStringOptionalstringArg,
optional DOMString optionalStringArg), optional DOMString optionalStringArg),
RaisesException=Constructor, RaisesException=Constructor,
] interface TestInterfaceNamedConstructor { ] interface TestInterfaceNamedConstructor {
......
...@@ -379,16 +379,6 @@ interface TestObject { ...@@ -379,16 +379,6 @@ interface TestObject {
// Optional arguments: exceptional case // Optional arguments: exceptional case
void voidMethodOptionalDictionaryArg(optional Dictionary optionalDictionaryArg); void voidMethodOptionalDictionaryArg(optional Dictionary optionalDictionaryArg);
// Optional arguments with defaults
void voidMethodDefaultStringArg(optional DOMString defaultStringArg = "foo");
void voidMethodDefaultNullStringArg(optional DOMString defaultStringArg = null);
void voidMethodDefaultLongArg(optional long defaultLongArg = 10);
void voidMethodDefaultDoubleArg(optional double defaultDoubleArg = 0.5);
void voidMethodDefaultTrueBooleanArg(optional boolean defaultBooleanArg = true);
void voidMethodDefaultFalseBooleanArg(optional boolean defaultBooleanArg = false);
void voidMethodDefaultNullableStringArg(optional DOMString? defaultStringArg = null);
void voidMethodDefaultNullableTestInterfaceArg(optional TestInterface? defaultTestInterfaceArg = null);
// Variadic operations // Variadic operations
void voidMethodVariadicStringArg(DOMString... variadicStringArgs); void voidMethodVariadicStringArg(DOMString... variadicStringArgs);
void voidMethodStringArgVariadicStringArg(DOMString stringArg, DOMString... variadicStringArgs); void voidMethodStringArgVariadicStringArg(DOMString stringArg, DOMString... variadicStringArgs);
...@@ -411,7 +401,7 @@ interface TestObject { ...@@ -411,7 +401,7 @@ interface TestObject {
void overloadedMethodF(optional DOMString stringArg); void overloadedMethodF(optional DOMString stringArg);
void overloadedMethodF(double doubleArg); void overloadedMethodF(double doubleArg);
void overloadedMethodG(long longArg); void overloadedMethodG(long longArg);
void overloadedMethodG(optional TestInterfaceEmpty? testInterfaceEmptyOrNullArg = null); void overloadedMethodG([Default=Null] TestInterfaceEmpty? testInterfaceEmptyOrNullArg);
void overloadedMethodH(TestInterface testInterfaceArg); void overloadedMethodH(TestInterface testInterfaceArg);
void overloadedMethodH(TestInterfaceEmpty testInterfaceEmptyArg); void overloadedMethodH(TestInterfaceEmpty testInterfaceEmptyArg);
void overloadedMethodI(DOMString stringArg); void overloadedMethodI(DOMString stringArg);
...@@ -432,6 +422,7 @@ interface TestObject { ...@@ -432,6 +422,7 @@ interface TestObject {
void voidMethodDefaultUndefinedTestInterfaceEmptyArg([Default=Undefined] optional TestInterfaceEmpty defaultUndefinedTestInterfaceEmptyArg); void voidMethodDefaultUndefinedTestInterfaceEmptyArg([Default=Undefined] optional TestInterfaceEmpty defaultUndefinedTestInterfaceEmptyArg);
void voidMethodDefaultUndefinedLongArg([Default=Undefined] optional long defaultUndefinedLongArg); void voidMethodDefaultUndefinedLongArg([Default=Undefined] optional long defaultUndefinedLongArg);
void voidMethodDefaultUndefinedStringArg([Default=Undefined] optional DOMString defaultUndefinedStringArg); void voidMethodDefaultUndefinedStringArg([Default=Undefined] optional DOMString defaultUndefinedStringArg);
void voidMethodDefaultNullStringStringArg([Default=NullString] optional DOMString defaultNullStringStringArg);
// [EnforceRange] // [EnforceRange]
void voidMethodEnforceRangeLongArg([EnforceRange] long enforceRangeLongArg); void voidMethodEnforceRangeLongArg([EnforceRange] long enforceRangeLongArg);
// [TreatNullAs], [TreatUndefinedAs] // [TreatNullAs], [TreatUndefinedAs]
......
...@@ -494,7 +494,7 @@ float toFloat(v8::Handle<v8::Value> value, ExceptionState& exceptionState) ...@@ -494,7 +494,7 @@ float toFloat(v8::Handle<v8::Value> value, ExceptionState& exceptionState)
String toByteString(v8::Handle<v8::Value> value, ExceptionState& exceptionState) String toByteString(v8::Handle<v8::Value> value, ExceptionState& exceptionState)
{ {
// Handle null default value. // Handle [Default=NullString]
if (value.IsEmpty()) if (value.IsEmpty())
return String(); return String();
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
[TreatReturnedNullStringAs=Null] DOMString getPropertyPriority([Default=Undefined] optional DOMString propertyName); [TreatReturnedNullStringAs=Null] DOMString getPropertyPriority([Default=Undefined] optional DOMString propertyName);
[RaisesException] void setProperty([Default=Undefined] optional DOMString propertyName, [RaisesException] void setProperty([Default=Undefined] optional DOMString propertyName,
[TreatNullAs=NullString,Default=Undefined] optional DOMString value, [TreatNullAs=NullString,Default=Undefined] optional DOMString value,
[TreatNullAs=NullString] optional DOMString priority = null); [TreatNullAs=NullString,Default=NullString] optional DOMString priority);
readonly attribute unsigned long length; readonly attribute unsigned long length;
getter DOMString item([Default=Undefined] optional unsigned long index); getter DOMString item([Default=Undefined] optional unsigned long index);
......
...@@ -41,8 +41,8 @@ enum FontFaceSetLoadStatus { "loading", "loaded" }; ...@@ -41,8 +41,8 @@ enum FontFaceSetLoadStatus { "loading", "loaded" };
attribute EventHandler onloadingdone; attribute EventHandler onloadingdone;
attribute EventHandler onloadingerror; attribute EventHandler onloadingerror;
[RaisesException] boolean check(DOMString font, optional DOMString text = null); [RaisesException] boolean check(DOMString font, [Default=NullString] optional DOMString text);
[CallWith=ScriptState] Promise load(DOMString font, optional DOMString text = null); [CallWith=ScriptState] Promise load(DOMString font, [Default=NullString] optional DOMString text);
[CallWith=ScriptState] Promise ready(); [CallWith=ScriptState] Promise ready();
[RaisesException] void add(FontFace fontFace); [RaisesException] void add(FontFace fontFace);
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
// Introduced in DOM Level ?: // Introduced in DOM Level ?:
[ [
Constructor(optional DOMString cssValue = null), Constructor([Default=NullString] optional DOMString cssValue),
ImplementedAs=CSSMatrix, ImplementedAs=CSSMatrix,
RaisesException=Constructor, RaisesException=Constructor,
WillBeGarbageCollected WillBeGarbageCollected
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
*/ */
[ [
Constructor(optional DOMString data = null), Constructor([Default=NullString] optional DOMString data),
ConstructorCallWith=Document, ConstructorCallWith=Document,
] interface Comment : CharacterData { ] interface Comment : CharacterData {
}; };
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
[ [
Constructor(DOMString name, optional DOMString message = null), Constructor(DOMString name, [Default=NullString] optional DOMString message),
WillBeGarbageCollected WillBeGarbageCollected
] interface DOMError { ] interface DOMError {
readonly attribute DOMString name; readonly attribute DOMString name;
......
...@@ -39,5 +39,5 @@ ...@@ -39,5 +39,5 @@
// HTMLDOMImplementation interface from DOM Level 2 HTML // HTMLDOMImplementation interface from DOM Level 2 HTML
HTMLDocument createHTMLDocument(optional DOMString title = null); HTMLDocument createHTMLDocument([Default=NullString] optional DOMString title);
}; };
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
* Boston, MA 02110-1301, USA. * Boston, MA 02110-1301, USA.
*/ */
[ [
Constructor(optional DOMString data = null), Constructor([Default=NullString] optional DOMString data),
ConstructorCallWith=Document, ConstructorCallWith=Document,
Custom=Wrap, Custom=Wrap,
] interface Text : CharacterData { ] interface Text : CharacterData {
......
...@@ -42,17 +42,17 @@ ...@@ -42,17 +42,17 @@
[CallWith=ScriptArguments&ScriptState] void trace(); [CallWith=ScriptArguments&ScriptState] void trace();
[CallWith=ScriptArguments&ScriptState, ImplementedAs=assertCondition] void assert([Default=Undefined] optional boolean condition); [CallWith=ScriptArguments&ScriptState, ImplementedAs=assertCondition] void assert([Default=Undefined] optional boolean condition);
[CallWith=ScriptArguments&ScriptState] void count(); [CallWith=ScriptArguments&ScriptState] void count();
[DeprecateAs=ConsoleMarkTimeline] void markTimeline(optional DOMString title = null); [DeprecateAs=ConsoleMarkTimeline] void markTimeline([Default=NullString] optional DOMString title);
[CallWith=ScriptState] void profile(optional DOMString title = null); [CallWith=ScriptState] void profile([Default=NullString] optional DOMString title);
[CallWith=ScriptState] void profileEnd(optional DOMString title = null); [CallWith=ScriptState] void profileEnd([Default=NullString] optional DOMString title);
void time(optional DOMString title = null); void time([Default=NullString] optional DOMString title);
[CallWith=ScriptState] void timeEnd(optional DOMString title = null); [CallWith=ScriptState] void timeEnd([Default=NullString] optional DOMString title);
void timeStamp(optional DOMString title = null); void timeStamp([Default=NullString] optional DOMString title);
[CallWith=ScriptState] void timeline(optional DOMString title = null); [CallWith=ScriptState] void timeline([Default=NullString] optional DOMString title);
[CallWith=ScriptState] void timelineEnd(optional DOMString title = null); [CallWith=ScriptState] void timelineEnd([Default=NullString] optional DOMString title);
[CallWith=ScriptArguments&ScriptState] void group(); [CallWith=ScriptArguments&ScriptState] void group();
[CallWith=ScriptArguments&ScriptState] void groupCollapsed(); [CallWith=ScriptArguments&ScriptState] void groupCollapsed();
......
...@@ -69,9 +69,9 @@ ...@@ -69,9 +69,9 @@
void alert(); void alert();
void alert(DOMString message); void alert(DOMString message);
boolean confirm(optional DOMString message = null); boolean confirm([Default=NullString] optional DOMString message);
[TreatReturnedNullStringAs=Null] DOMString prompt(optional DOMString message = null, [TreatReturnedNullStringAs=Null] DOMString prompt([Default=NullString] optional DOMString message,
optional DOMString defaultValue = null); [Default=NullString] optional DOMString defaultValue);
boolean find([Default=Undefined] optional DOMString string, boolean find([Default=Undefined] optional DOMString string,
[Default=Undefined] optional boolean caseSensitive, [Default=Undefined] optional boolean caseSensitive,
......
...@@ -25,6 +25,6 @@ ...@@ -25,6 +25,6 @@
[ [
RuntimeEnabled=Media, RuntimeEnabled=Media,
NamedConstructor=Audio(optional DOMString src = null) NamedConstructor=Audio([Default=NullString] optional DOMString src)
] interface HTMLAudioElement : HTMLMediaElement { ] interface HTMLAudioElement : HTMLMediaElement {
}; };
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
] interface HTMLDialogElement : HTMLElement { ] interface HTMLDialogElement : HTMLElement {
[Reflect] attribute boolean open; [Reflect] attribute boolean open;
attribute DOMString returnValue; attribute DOMString returnValue;
[RaisesException] void close(optional DOMString returnValue = null); [RaisesException] void close([Default=NullString] optional DOMString returnValue);
void show(); void show();
[RaisesException] void showModal(); [RaisesException] void showModal();
}; };
......
...@@ -85,7 +85,7 @@ interface HTMLInputElement : HTMLElement { ...@@ -85,7 +85,7 @@ interface HTMLInputElement : HTMLElement {
[RaisesException] void setRangeText(DOMString replacement, [RaisesException] void setRangeText(DOMString replacement,
unsigned long start, unsigned long start,
unsigned long end, unsigned long end,
optional DOMString selectionMode = null); [Default=NullString] optional DOMString selectionMode);
[RaisesException, ImplementedAs=setSelectionRangeForBinding] [RaisesException, ImplementedAs=setSelectionRangeForBinding]
void setSelectionRange([Default=Undefined] optional long start, void setSelectionRange([Default=Undefined] optional long start,
......
...@@ -19,10 +19,7 @@ ...@@ -19,10 +19,7 @@
*/ */
[ [
NamedConstructor=Option(optional DOMString data = null, NamedConstructor=Option([Default=NullString] optional DOMString data, [Default=NullString] optional DOMString value, [Default=Undefined] optional boolean defaultSelected, [Default=Undefined] optional boolean selected),
optional DOMString value = null,
[Default=Undefined] optional boolean defaultSelected,
[Default=Undefined] optional boolean selected),
RaisesException=Constructor RaisesException=Constructor
] interface HTMLOptionElement : HTMLElement { ] interface HTMLOptionElement : HTMLElement {
[Reflect] attribute boolean disabled; [Reflect] attribute boolean disabled;
......
...@@ -38,7 +38,7 @@ interface HTMLSelectElement : HTMLElement { ...@@ -38,7 +38,7 @@ interface HTMLSelectElement : HTMLElement {
getter Element item(unsigned long index); getter Element item(unsigned long index);
Element namedItem([Default=Undefined] optional DOMString name); Element namedItem([Default=Undefined] optional DOMString name);
// FIXME: should be union type http://crbug.com/240176 // FIXME: should be union type http://crbug.com/240176
[RaisesException, TypeChecking=Interface] void add(HTMLElement element, optional HTMLElement? before = null); [RaisesException, TypeChecking=Interface] void add(HTMLElement element, [Default=Null] optional HTMLElement? before);
[ImplementedAs=addBeforeOptionAtIndex, RaisesException, TypeChecking=Interface] void add(HTMLElement element, long before); [ImplementedAs=addBeforeOptionAtIndex, RaisesException, TypeChecking=Interface] void add(HTMLElement element, long before);
[RaisesException] void remove(); // ChildNode overload [RaisesException] void remove(); // ChildNode overload
void remove(long index); void remove(long index);
......
...@@ -56,7 +56,7 @@ interface HTMLTextAreaElement : HTMLElement { ...@@ -56,7 +56,7 @@ interface HTMLTextAreaElement : HTMLElement {
[RaisesException] void setRangeText(DOMString replacement, [RaisesException] void setRangeText(DOMString replacement,
unsigned long start, unsigned long start,
unsigned long end, unsigned long end,
optional DOMString selectionMode = null); [Default=NullString] optional DOMString selectionMode);
void setSelectionRange([Default=Undefined] optional long start, void setSelectionRange([Default=Undefined] optional long start,
[Default=Undefined] optional long end, [Default=Undefined] optional long end,
......
...@@ -48,5 +48,5 @@ ...@@ -48,5 +48,5 @@
attribute ByteString testByteString; attribute ByteString testByteString;
void setTestByteString(ByteString byteString); void setTestByteString(ByteString byteString);
[ImplementedAs=setTestByteString] void setTestByteStringDefaultNull(optional ByteString byteString = null); [ImplementedAs=setTestByteString] void setTestByteStringDefaultNull([Default=NullString] optional ByteString byteString);
}; };
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
[MeasureAs=UnprefixedPerformanceTimeline] sequence<PerformanceEntry> getEntries(); [MeasureAs=UnprefixedPerformanceTimeline] sequence<PerformanceEntry> getEntries();
[MeasureAs=UnprefixedPerformanceTimeline] sequence<PerformanceEntry> getEntriesByType(DOMString entryType); [MeasureAs=UnprefixedPerformanceTimeline] sequence<PerformanceEntry> getEntriesByType(DOMString entryType);
[MeasureAs=UnprefixedPerformanceTimeline] sequence<PerformanceEntry> getEntriesByName(DOMString name, optional DOMString entryType = null); [MeasureAs=UnprefixedPerformanceTimeline] sequence<PerformanceEntry> getEntriesByName(DOMString name, [Default=NullString] optional DOMString entryType);
[MeasureAs=PrefixedPerformanceClearResourceTimings] void webkitClearResourceTimings(); [MeasureAs=PrefixedPerformanceClearResourceTimings] void webkitClearResourceTimings();
[MeasureAs=PrefixedPerformanceSetResourceTimingBufferSize] void webkitSetResourceTimingBufferSize(unsigned long maxSize); [MeasureAs=PrefixedPerformanceSetResourceTimingBufferSize] void webkitSetResourceTimingBufferSize(unsigned long maxSize);
...@@ -48,10 +48,10 @@ ...@@ -48,10 +48,10 @@
// See http://www.w3.org/TR/2012/CR-user-timing-20120726/ // See http://www.w3.org/TR/2012/CR-user-timing-20120726/
[RaisesException,MeasureAs=UnprefixedUserTiming] void mark(DOMString markName); [RaisesException,MeasureAs=UnprefixedUserTiming] void mark(DOMString markName);
[MeasureAs=UnprefixedUserTiming] void clearMarks(optional DOMString markName = null); [MeasureAs=UnprefixedUserTiming] void clearMarks([Default=NullString] optional DOMString markName);
[RaisesException,MeasureAs=UnprefixedUserTiming] void measure(DOMString measureName, optional DOMString startMark = null, optional DOMString endMark = null); [RaisesException,MeasureAs=UnprefixedUserTiming] void measure(DOMString measureName, [Default=NullString] optional DOMString startMark, [Default=NullString] optional DOMString endMark);
[MeasureAs=UnprefixedUserTiming] void clearMeasures(optional DOMString measureName = null); [MeasureAs=UnprefixedUserTiming] void clearMeasures([Default=NullString] optional DOMString measureName);
// See http://www.w3.org/TR/hr-time/ for details. // See http://www.w3.org/TR/hr-time/ for details.
double now(); double now();
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
[ [
ActiveDOMObject, ActiveDOMObject,
Constructor(DOMString scriptURL, optional DOMString name = null), Constructor(DOMString scriptURL, [Default=NullString] optional DOMString name),
ConstructorCallWith=ExecutionContext, ConstructorCallWith=ExecutionContext,
RaisesException=Constructor, RaisesException=Constructor,
RuntimeEnabled=SharedWorker, RuntimeEnabled=SharedWorker,
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
[ [
RuntimeEnabled=EncodingAPI, RuntimeEnabled=EncodingAPI,
Exposed=Window&Worker, Exposed=Window&Worker,
Constructor(optional DOMString label = null, optional Dictionary options), Constructor([Default=NullString] optional DOMString label, optional Dictionary options),
RaisesException=Constructor, RaisesException=Constructor,
GarbageCollected, GarbageCollected,
MeasureAs=TextDecoderConstructor MeasureAs=TextDecoderConstructor
......
...@@ -31,11 +31,11 @@ ...@@ -31,11 +31,11 @@
[ [
RuntimeEnabled=EncodingAPI, RuntimeEnabled=EncodingAPI,
Exposed=Window&Worker, Exposed=Window&Worker,
Constructor(optional DOMString utfLabel = null), Constructor([Default=NullString] optional DOMString utfLabel),
RaisesException=Constructor, RaisesException=Constructor,
GarbageCollected, GarbageCollected,
MeasureAs=TextEncoderConstructor MeasureAs=TextEncoderConstructor
] interface TextEncoder { ] interface TextEncoder {
readonly attribute DOMString encoding; readonly attribute DOMString encoding;
[MeasureAs=TextEncoderEncode] Uint8Array encode(optional DOMString input = null, optional Dictionary options); [MeasureAs=TextEncoderEncode] Uint8Array encode([Default=NullString] optional DOMString input, optional Dictionary options);
}; };
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
partial interface HTMLMediaElement { partial interface HTMLMediaElement {
[RuntimeEnabled=PrefixedEncryptedMedia, RaisesException, MeasureAs=PrefixedMediaGenerateKeyRequest] void webkitGenerateKeyRequest([TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString keySystem, optional Uint8Array initData); [RuntimeEnabled=PrefixedEncryptedMedia, RaisesException, MeasureAs=PrefixedMediaGenerateKeyRequest] void webkitGenerateKeyRequest([TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString keySystem, optional Uint8Array initData);
[RuntimeEnabled=PrefixedEncryptedMedia, RaisesException, MeasureAs=PrefixedMediaAddKey] void webkitAddKey([TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString keySystem, Uint8Array key, optional Uint8Array initData, optional DOMString sessionId = null); [RuntimeEnabled=PrefixedEncryptedMedia, RaisesException, MeasureAs=PrefixedMediaAddKey] void webkitAddKey([TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString keySystem, Uint8Array key, optional Uint8Array initData, [Default=NullString] optional DOMString sessionId);
[RuntimeEnabled=PrefixedEncryptedMedia, RaisesException, MeasureAs=PrefixedMediaCancelKeyRequest] void webkitCancelKeyRequest([TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString keySystem, optional DOMString sessionId = null); [RuntimeEnabled=PrefixedEncryptedMedia, RaisesException, MeasureAs=PrefixedMediaCancelKeyRequest] void webkitCancelKeyRequest([TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString keySystem, [Default=NullString] optional DOMString sessionId);
[RuntimeEnabled=PrefixedEncryptedMedia] attribute EventHandler onwebkitkeyadded; [RuntimeEnabled=PrefixedEncryptedMedia] attribute EventHandler onwebkitkeyadded;
[RuntimeEnabled=PrefixedEncryptedMedia] attribute EventHandler onwebkitkeyerror; [RuntimeEnabled=PrefixedEncryptedMedia] attribute EventHandler onwebkitkeyerror;
......
...@@ -35,5 +35,5 @@ ...@@ -35,5 +35,5 @@
[CallWith=ExecutionContext, RaisesException] MediaKeySession createSession(DOMString type, Uint8Array initData); [CallWith=ExecutionContext, RaisesException] MediaKeySession createSession(DOMString type, Uint8Array initData);
static boolean isTypeSupported(DOMString keySystem, optional DOMString contentType = null); static boolean isTypeSupported(DOMString keySystem, [Default=NullString] optional DOMString contentType);
}; };
...@@ -36,9 +36,9 @@ ...@@ -36,9 +36,9 @@
[RaisesException] IDBObjectStore createObjectStore(DOMString name, optional Dictionary options); [RaisesException] IDBObjectStore createObjectStore(DOMString name, optional Dictionary options);
[RaisesException] void deleteObjectStore(DOMString name); [RaisesException] void deleteObjectStore(DOMString name);
// FIXME: should be union type http://crbug.com/240176 // FIXME: should be union type http://crbug.com/240176
[CallWith=ExecutionContext, RaisesException] IDBTransaction transaction(DOMString storeName, optional DOMString mode = null); [CallWith=ExecutionContext, RaisesException] IDBTransaction transaction(DOMString storeName, [Default=NullString] optional DOMString mode);
[CallWith=ExecutionContext, RaisesException] IDBTransaction transaction(sequence<DOMString> storeNames, optional DOMString mode = null); [CallWith=ExecutionContext, RaisesException] IDBTransaction transaction(sequence<DOMString> storeNames, [Default=NullString] optional DOMString mode);
[CallWith=ExecutionContext, RaisesException] IDBTransaction transaction(DOMStringList storeNames, optional DOMString mode = null); [CallWith=ExecutionContext, RaisesException] IDBTransaction transaction(DOMStringList storeNames, [Default=NullString] optional DOMString mode);
void close(); void close();
attribute EventHandler onabort; attribute EventHandler onabort;
attribute EventHandler onclose; attribute EventHandler onclose;
......
...@@ -32,8 +32,8 @@ ...@@ -32,8 +32,8 @@
readonly attribute boolean unique; readonly attribute boolean unique;
readonly attribute boolean multiEntry; readonly attribute boolean multiEntry;
[CallWith=ScriptState, RaisesException] IDBRequest openCursor([Default=Undefined] optional any range, optional DOMString direction = null); [CallWith=ScriptState, RaisesException] IDBRequest openCursor([Default=Undefined] optional any range, [Default=NullString] optional DOMString direction);
[CallWith=ScriptState, RaisesException] IDBRequest openKeyCursor([Default=Undefined] optional any range, optional DOMString direction = null); [CallWith=ScriptState, RaisesException] IDBRequest openKeyCursor([Default=Undefined] optional any range, [Default=NullString] optional DOMString direction);
[CallWith=ScriptState, RaisesException] IDBRequest get(any key); [CallWith=ScriptState, RaisesException] IDBRequest get(any key);
[CallWith=ScriptState, RaisesException] IDBRequest getKey(any key); [CallWith=ScriptState, RaisesException] IDBRequest getKey(any key);
......
...@@ -39,8 +39,8 @@ ...@@ -39,8 +39,8 @@
[CallWith=ScriptState, ImplementedAs=deleteFunction, RaisesException] IDBRequest delete(any key); [CallWith=ScriptState, ImplementedAs=deleteFunction, RaisesException] IDBRequest delete(any key);
[CallWith=ScriptState, RaisesException] IDBRequest get(any key); [CallWith=ScriptState, RaisesException] IDBRequest get(any key);
[CallWith=ScriptState, RaisesException] IDBRequest clear(); [CallWith=ScriptState, RaisesException] IDBRequest clear();
[CallWith=ScriptState, RaisesException] IDBRequest openCursor([Default=Undefined] optional any range, optional DOMString direction = null); [CallWith=ScriptState, RaisesException] IDBRequest openCursor([Default=Undefined] optional any range, [Default=NullString] optional DOMString direction);
[CallWith=ScriptState, RaisesException, RuntimeEnabled=IndexedDBExperimental] IDBRequest openKeyCursor([Default=Undefined] optional any range, optional DOMString direction = null); [CallWith=ScriptState, RaisesException, RuntimeEnabled=IndexedDBExperimental] IDBRequest openKeyCursor([Default=Undefined] optional any range, [Default=NullString] optional DOMString direction);
// FIXME: should be union type http://crbug.com/240176 // FIXME: should be union type http://crbug.com/240176
[CallWith=ScriptState, RaisesException] IDBIndex createIndex(DOMString name, DOMString keyPath, optional Dictionary options); [CallWith=ScriptState, RaisesException] IDBIndex createIndex(DOMString name, DOMString keyPath, optional Dictionary options);
[CallWith=ScriptState, RaisesException] IDBIndex createIndex(DOMString name, sequence<DOMString> keyPath, optional Dictionary options); [CallWith=ScriptState, RaisesException] IDBIndex createIndex(DOMString name, sequence<DOMString> keyPath, optional Dictionary options);
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
[ [
GarbageCollected, GarbageCollected,
Constructor(optional DOMString text = null), Constructor([Default=NullString] optional DOMString text),
ConstructorCallWith=ExecutionContext, ConstructorCallWith=ExecutionContext,
RuntimeEnabled=SpeechSynthesis, RuntimeEnabled=SpeechSynthesis,
] interface SpeechSynthesisUtterance : EventTarget { ] interface SpeechSynthesisUtterance : EventTarget {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment