Replace "Optional" extended attribute by proper Web IDL "optional" keyword

https://bugs.webkit.org/show_bug.cgi?id=115380

Reviewed by Kentaro Hara.

Source/WebCore:

Replace [Optional] with standard WebIDL optional type prefix:
http://dev.w3.org/2006/webapi/WebIDL/#dfn-optional-argument

The default behavior now matches WebIDL: [Optional] => optional

Two cases where WebKit has extended bindings behavior still
require a non-standard IDL attribute:
[Optional=DefaultIsNullString] => [Default=NullString] optional
[Optional=DefaultIsUndefined] => [Default=Undefined] optional

Based on corresponding Blink patch from Joshua Bell for compatibility.

No new tests, no behavior change.

* Modules/battery/BatteryManager.idl:
* Modules/encryptedmedia/MediaKeySession.idl:
* Modules/encryptedmedia/MediaKeys.idl:
* Modules/filesystem/DOMWindowFileSystem.idl:
* Modules/filesystem/DirectoryEntry.idl:
* Modules/filesystem/DirectoryReader.idl:
* Modules/filesystem/Entry.idl:
* Modules/filesystem/FileEntry.idl:
* Modules/filesystem/FileWriter.idl:
* Modules/filesystem/WorkerContextFileSystem.idl:
* Modules/gamepad/GamepadList.idl:
* Modules/geolocation/Geolocation.idl:
* Modules/indexeddb/IDBCursor.idl:
* Modules/indexeddb/IDBDatabase.idl:
* Modules/indexeddb/IDBFactory.idl:
* Modules/indexeddb/IDBIndex.idl:
* Modules/indexeddb/IDBKeyRange.idl:
* Modules/indexeddb/IDBObjectStore.idl:
* Modules/indexeddb/IDBRequest.idl:
* Modules/indexeddb/IDBTransaction.idl:
* Modules/mediasource/MediaSource.idl:
* Modules/mediasource/SourceBufferList.idl:
* Modules/mediastream/MediaStream.idl:
* Modules/mediastream/MediaStreamTrack.idl:
* Modules/mediastream/NavigatorMediaStream.idl:
* Modules/mediastream/RTCDTMFSender.idl:
* Modules/mediastream/RTCDataChannel.idl:
* Modules/mediastream/RTCPeerConnection.idl:
* Modules/mediastream/RTCStatsResponse.idl:
* Modules/networkinfo/NetworkInfoConnection.idl:
* Modules/notifications/Notification.idl:
* Modules/notifications/NotificationCenter.idl:
* Modules/quota/StorageInfo.idl:
* Modules/quota/StorageQuota.idl:
* Modules/speech/SpeechGrammarList.idl:
* Modules/speech/SpeechRecognition.idl:
* Modules/speech/SpeechSynthesisUtterance.idl:
* Modules/webaudio/AudioContext.idl:
* Modules/webaudio/AudioNode.idl:
* Modules/webdatabase/DOMWindowWebDatabase.idl:
* Modules/webdatabase/Database.idl:
* Modules/webdatabase/DatabaseSync.idl:
* Modules/webdatabase/SQLTransaction.idl:
* Modules/webdatabase/WorkerContextWebDatabase.idl:
* Modules/websockets/WebSocket.idl:
* bindings/scripts/CodeGeneratorJS.pm:
(GetFunctionLength):
(GenerateFunctionParametersCheck):
(GenerateArgumentsCountCheck):
(GenerateParametersCheck):
(GenerateConstructorDefinition):
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/IDLParser.pm:
(parseOptionalOrRequiredArgument):
* bindings/scripts/test/TestEventTarget.idl:
* bindings/scripts/test/TestInterface.idl:
* bindings/scripts/test/TestNamedConstructor.idl:
* bindings/scripts/test/TestObj.idl:
* bindings/scripts/test/TestSerializedScriptValueInterface.idl:
* bindings/scripts/test/TestTypedefs.idl: optional cannot be used in a typedef.
* css/CSSHostRule.idl:
* css/CSSMediaRule.idl:
* css/CSSPrimitiveValue.idl:
* css/CSSRuleList.idl:
* css/CSSStyleDeclaration.idl:
* css/CSSStyleSheet.idl:
* css/CSSSupportsRule.idl:
* css/CSSValueList.idl:
* css/FontLoader.idl:
* css/MediaList.idl:
* css/MediaQueryList.idl:
* css/MediaQueryListListener.idl:
* css/StyleMedia.idl:
* css/StyleSheetList.idl:
* css/WebKitCSSKeyframesRule.idl:
* css/WebKitCSSMatrix.idl:
* dom/CharacterData.idl:
* dom/ClientRectList.idl:
* dom/Clipboard.idl:
* dom/CompositionEvent.idl:
* dom/CustomEvent.idl:
* dom/DOMImplementation.idl:
* dom/DOMStringList.idl:
* dom/DataTransferItem.idl:
* dom/DataTransferItemList.idl:
* dom/DeviceMotionEvent.idl:
* dom/DeviceOrientationEvent.idl:
* dom/Document.idl:
* dom/Element.idl:
* dom/Event.idl:
* dom/EventTarget.idl:
* dom/HashChangeEvent.idl:
* dom/KeyboardEvent.idl:
* dom/MessageEvent.idl:
* dom/MessagePort.idl:
* dom/MouseEvent.idl:
* dom/MutationEvent.idl:
* dom/NamedNodeMap.idl:
* dom/Node.idl:
* dom/NodeFilter.idl:
* dom/NodeList.idl:
* dom/OverflowEvent.idl:
* dom/Range.idl:
* dom/ShadowRoot.idl:
* dom/Text.idl:
* dom/TextEvent.idl:
* dom/TouchEvent.idl:
* dom/UIEvent.idl:
* dom/WebKitNamedFlow.idl:
* dom/WheelEvent.idl:
* fileapi/Blob.idl:
* fileapi/FileReader.idl:
* fileapi/FileReaderSync.idl:
* html/DOMFormData.idl:
* html/DOMTokenList.idl:
* html/HTMLAllCollection.idl:
* html/HTMLAudioElement.idl:
* html/HTMLCanvasElement.idl:
* html/HTMLCollection.idl:
* html/HTMLDocument.idl:
* html/HTMLElement.idl:
* html/HTMLFormControlsCollection.idl:
* html/HTMLInputElement.idl:
* html/HTMLMediaElement.idl:
* html/HTMLOptionElement.idl:
* html/HTMLOptionsCollection.idl:
* html/HTMLSelectElement.idl:
* html/HTMLTableElement.idl:
* html/HTMLTableRowElement.idl:
* html/HTMLTableSectionElement.idl:
* html/HTMLTextAreaElement.idl:
* html/MediaController.idl:
* html/canvas/ArrayBuffer.idl:
* html/canvas/CanvasGradient.idl:
* html/canvas/CanvasRenderingContext2D.idl:
* html/canvas/DOMPath.idl:
* html/canvas/DataView.idl:
* html/canvas/Float32Array.idl:
* html/canvas/Float64Array.idl:
* html/canvas/Int16Array.idl:
* html/canvas/Int32Array.idl:
* html/canvas/Int8Array.idl:
* html/canvas/OESVertexArrayObject.idl:
* html/canvas/Uint16Array.idl:
* html/canvas/Uint32Array.idl:
* html/canvas/Uint8Array.idl:
* html/canvas/Uint8ClampedArray.idl:
* html/track/AudioTrackList.idl:
* html/track/TextTrack.idl:
* html/track/TextTrackCue.idl:
* html/track/TextTrackList.idl:
* html/track/VideoTrackList.idl:
* loader/appcache/DOMApplicationCache.idl:
* page/DOMSelection.idl:
* page/DOMWindow.idl:
* page/EventSource.idl:
* page/History.idl:
* page/Location.idl:
* page/Performance.idl:
* plugins/DOMMimeTypeArray.idl:
* plugins/DOMPlugin.idl:
* plugins/DOMPluginArray.idl:
* storage/StorageEvent.idl:
* svg/ElementTimeControl.idl:
* svg/SVGDocument.idl:
* svg/SVGElementInstanceList.idl:
* svg/SVGFEDropShadowElement.idl:
* svg/SVGFEGaussianBlurElement.idl:
* svg/SVGFEMorphologyElement.idl:
* svg/SVGFilterElement.idl:
* svg/SVGLocatable.idl:
* svg/SVGMarkerElement.idl:
* svg/SVGPathElement.idl:
* svg/SVGSVGElement.idl:
* svg/SVGStyledElement.idl:
* svg/SVGTests.idl:
* svg/SVGTextContentElement.idl:
* testing/Internals.idl:
* workers/AbstractWorker.idl:
* workers/DedicatedWorkerContext.idl:
* workers/SharedWorker.idl:
* workers/Worker.idl:
* workers/WorkerContext.idl:
* xml/DOMParser.idl:
* xml/XMLHttpRequest.idl:
* xml/XMLHttpRequestUpload.idl:
* xml/XMLSerializer.idl:
* xml/XPathEvaluator.idl:
* xml/XPathExpression.idl:
* xml/XPathNSResolver.idl:
* xml/XPathResult.idl:
* xml/XSLTProcessor.idl:

Source/WebKit/win:

Replace [Optional] by optional.

* Interfaces/DOMWindow.idl:

Tools:

Replace WebKit-specific [Optional] extended attribute by Web IDL "optional"
keyword.

* WebKitTestRunner/InjectedBundle/Bindings/EventSendingController.idl:
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@149356 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 8de2203b
2013-04-30 Christophe Dumez <ch.dumez@sisa.samsung.com>
Replace "Optional" extended attribute by proper Web IDL "optional" keyword
https://bugs.webkit.org/show_bug.cgi?id=115380
Reviewed by Kentaro Hara.
Replace [Optional] with standard WebIDL optional type prefix:
http://dev.w3.org/2006/webapi/WebIDL/#dfn-optional-argument
The default behavior now matches WebIDL: [Optional] => optional
Two cases where WebKit has extended bindings behavior still
require a non-standard IDL attribute:
[Optional=DefaultIsNullString] => [Default=NullString] optional
[Optional=DefaultIsUndefined] => [Default=Undefined] optional
Based on corresponding Blink patch from Joshua Bell for compatibility.
No new tests, no behavior change.
* Modules/battery/BatteryManager.idl:
* Modules/encryptedmedia/MediaKeySession.idl:
* Modules/encryptedmedia/MediaKeys.idl:
* Modules/filesystem/DOMWindowFileSystem.idl:
* Modules/filesystem/DirectoryEntry.idl:
* Modules/filesystem/DirectoryReader.idl:
* Modules/filesystem/Entry.idl:
* Modules/filesystem/FileEntry.idl:
* Modules/filesystem/FileWriter.idl:
* Modules/filesystem/WorkerContextFileSystem.idl:
* Modules/gamepad/GamepadList.idl:
* Modules/geolocation/Geolocation.idl:
* Modules/indexeddb/IDBCursor.idl:
* Modules/indexeddb/IDBDatabase.idl:
* Modules/indexeddb/IDBFactory.idl:
* Modules/indexeddb/IDBIndex.idl:
* Modules/indexeddb/IDBKeyRange.idl:
* Modules/indexeddb/IDBObjectStore.idl:
* Modules/indexeddb/IDBRequest.idl:
* Modules/indexeddb/IDBTransaction.idl:
* Modules/mediasource/MediaSource.idl:
* Modules/mediasource/SourceBufferList.idl:
* Modules/mediastream/MediaStream.idl:
* Modules/mediastream/MediaStreamTrack.idl:
* Modules/mediastream/NavigatorMediaStream.idl:
* Modules/mediastream/RTCDTMFSender.idl:
* Modules/mediastream/RTCDataChannel.idl:
* Modules/mediastream/RTCPeerConnection.idl:
* Modules/mediastream/RTCStatsResponse.idl:
* Modules/networkinfo/NetworkInfoConnection.idl:
* Modules/notifications/Notification.idl:
* Modules/notifications/NotificationCenter.idl:
* Modules/quota/StorageInfo.idl:
* Modules/quota/StorageQuota.idl:
* Modules/speech/SpeechGrammarList.idl:
* Modules/speech/SpeechRecognition.idl:
* Modules/speech/SpeechSynthesisUtterance.idl:
* Modules/webaudio/AudioContext.idl:
* Modules/webaudio/AudioNode.idl:
* Modules/webdatabase/DOMWindowWebDatabase.idl:
* Modules/webdatabase/Database.idl:
* Modules/webdatabase/DatabaseSync.idl:
* Modules/webdatabase/SQLTransaction.idl:
* Modules/webdatabase/WorkerContextWebDatabase.idl:
* Modules/websockets/WebSocket.idl:
* bindings/scripts/CodeGeneratorJS.pm:
(GetFunctionLength):
(GenerateFunctionParametersCheck):
(GenerateArgumentsCountCheck):
(GenerateParametersCheck):
(GenerateConstructorDefinition):
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/IDLParser.pm:
(parseOptionalOrRequiredArgument):
* bindings/scripts/test/TestEventTarget.idl:
* bindings/scripts/test/TestInterface.idl:
* bindings/scripts/test/TestNamedConstructor.idl:
* bindings/scripts/test/TestObj.idl:
* bindings/scripts/test/TestSerializedScriptValueInterface.idl:
* bindings/scripts/test/TestTypedefs.idl: optional cannot be used in a typedef.
* css/CSSHostRule.idl:
* css/CSSMediaRule.idl:
* css/CSSPrimitiveValue.idl:
* css/CSSRuleList.idl:
* css/CSSStyleDeclaration.idl:
* css/CSSStyleSheet.idl:
* css/CSSSupportsRule.idl:
* css/CSSValueList.idl:
* css/FontLoader.idl:
* css/MediaList.idl:
* css/MediaQueryList.idl:
* css/MediaQueryListListener.idl:
* css/StyleMedia.idl:
* css/StyleSheetList.idl:
* css/WebKitCSSKeyframesRule.idl:
* css/WebKitCSSMatrix.idl:
* dom/CharacterData.idl:
* dom/ClientRectList.idl:
* dom/Clipboard.idl:
* dom/CompositionEvent.idl:
* dom/CustomEvent.idl:
* dom/DOMImplementation.idl:
* dom/DOMStringList.idl:
* dom/DataTransferItem.idl:
* dom/DataTransferItemList.idl:
* dom/DeviceMotionEvent.idl:
* dom/DeviceOrientationEvent.idl:
* dom/Document.idl:
* dom/Element.idl:
* dom/Event.idl:
* dom/EventTarget.idl:
* dom/HashChangeEvent.idl:
* dom/KeyboardEvent.idl:
* dom/MessageEvent.idl:
* dom/MessagePort.idl:
* dom/MouseEvent.idl:
* dom/MutationEvent.idl:
* dom/NamedNodeMap.idl:
* dom/Node.idl:
* dom/NodeFilter.idl:
* dom/NodeList.idl:
* dom/OverflowEvent.idl:
* dom/Range.idl:
* dom/ShadowRoot.idl:
* dom/Text.idl:
* dom/TextEvent.idl:
* dom/TouchEvent.idl:
* dom/UIEvent.idl:
* dom/WebKitNamedFlow.idl:
* dom/WheelEvent.idl:
* fileapi/Blob.idl:
* fileapi/FileReader.idl:
* fileapi/FileReaderSync.idl:
* html/DOMFormData.idl:
* html/DOMTokenList.idl:
* html/HTMLAllCollection.idl:
* html/HTMLAudioElement.idl:
* html/HTMLCanvasElement.idl:
* html/HTMLCollection.idl:
* html/HTMLDocument.idl:
* html/HTMLElement.idl:
* html/HTMLFormControlsCollection.idl:
* html/HTMLInputElement.idl:
* html/HTMLMediaElement.idl:
* html/HTMLOptionElement.idl:
* html/HTMLOptionsCollection.idl:
* html/HTMLSelectElement.idl:
* html/HTMLTableElement.idl:
* html/HTMLTableRowElement.idl:
* html/HTMLTableSectionElement.idl:
* html/HTMLTextAreaElement.idl:
* html/MediaController.idl:
* html/canvas/ArrayBuffer.idl:
* html/canvas/CanvasGradient.idl:
* html/canvas/CanvasRenderingContext2D.idl:
* html/canvas/DOMPath.idl:
* html/canvas/DataView.idl:
* html/canvas/Float32Array.idl:
* html/canvas/Float64Array.idl:
* html/canvas/Int16Array.idl:
* html/canvas/Int32Array.idl:
* html/canvas/Int8Array.idl:
* html/canvas/OESVertexArrayObject.idl:
* html/canvas/Uint16Array.idl:
* html/canvas/Uint32Array.idl:
* html/canvas/Uint8Array.idl:
* html/canvas/Uint8ClampedArray.idl:
* html/track/AudioTrackList.idl:
* html/track/TextTrack.idl:
* html/track/TextTrackCue.idl:
* html/track/TextTrackList.idl:
* html/track/VideoTrackList.idl:
* loader/appcache/DOMApplicationCache.idl:
* page/DOMSelection.idl:
* page/DOMWindow.idl:
* page/EventSource.idl:
* page/History.idl:
* page/Location.idl:
* page/Performance.idl:
* plugins/DOMMimeTypeArray.idl:
* plugins/DOMPlugin.idl:
* plugins/DOMPluginArray.idl:
* storage/StorageEvent.idl:
* svg/ElementTimeControl.idl:
* svg/SVGDocument.idl:
* svg/SVGElementInstanceList.idl:
* svg/SVGFEDropShadowElement.idl:
* svg/SVGFEGaussianBlurElement.idl:
* svg/SVGFEMorphologyElement.idl:
* svg/SVGFilterElement.idl:
* svg/SVGLocatable.idl:
* svg/SVGMarkerElement.idl:
* svg/SVGPathElement.idl:
* svg/SVGSVGElement.idl:
* svg/SVGStyledElement.idl:
* svg/SVGTests.idl:
* svg/SVGTextContentElement.idl:
* testing/Internals.idl:
* workers/AbstractWorker.idl:
* workers/DedicatedWorkerContext.idl:
* workers/SharedWorker.idl:
* workers/Worker.idl:
* workers/WorkerContext.idl:
* xml/DOMParser.idl:
* xml/XMLHttpRequest.idl:
* xml/XMLHttpRequestUpload.idl:
* xml/XMLSerializer.idl:
* xml/XPathEvaluator.idl:
* xml/XPathExpression.idl:
* xml/XPathNSResolver.idl:
* xml/XPathResult.idl:
* xml/XSLTProcessor.idl:
2013-04-30 Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Fix the USE(3D_GRAPHICS) build with the standard OpenGL on Windows
......
......@@ -36,10 +36,10 @@
// EventTarget interface
void addEventListener(in DOMString type,
in EventListener listener,
in [Optional] boolean useCapture);
in optional boolean useCapture);
void removeEventListener(in DOMString type,
in EventListener listener,
in [Optional] boolean useCapture);
in optional boolean useCapture);
boolean dispatchEvent(in Event event)
raises(EventException);
};
......
......@@ -47,10 +47,10 @@ interface [
// EventTarget interface
void addEventListener(in DOMString type,
in EventListener listener,
in [Optional] boolean useCapture);
in optional boolean useCapture);
void removeEventListener(in DOMString type,
in EventListener listener,
in [Optional] boolean useCapture);
in optional boolean useCapture);
boolean dispatchEvent(in Event evt)
raises(EventException);
};
......@@ -28,7 +28,7 @@ interface [
Constructor(in DOMString keySystem),
ConstructorRaisesException,
] MediaKeys {
[CallWith=ScriptExecutionContext] MediaKeySession createSession(in [Optional=DefaultIsUndefined] DOMString type, in [Optional=DefaultIsUndefined] Uint8Array initData)
[CallWith=ScriptExecutionContext] MediaKeySession createSession(in [Default=Undefined] optional DOMString type, in [Default=Undefined] optional Uint8Array initData)
raises(DOMException);
readonly attribute DOMString keySystem;
......
......@@ -31,8 +31,8 @@
const unsigned short PERSISTENT = 1;
void webkitRequestFileSystem(in unsigned short type, in long long size,
in FileSystemCallback successCallback, in [Optional] ErrorCallback errorCallback);
in FileSystemCallback successCallback, in optional ErrorCallback errorCallback);
void webkitResolveLocalFileSystemURL(in DOMString url,
in EntryCallback successCallback, in [Optional] ErrorCallback errorCallback);
in EntryCallback successCallback, in optional ErrorCallback errorCallback);
};
......@@ -35,7 +35,7 @@
JSNoStaticTables
] interface DirectoryEntry : Entry {
DirectoryReader createReader();
void getFile(in [TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString path, in [Optional] Dictionary options, in [Optional] EntryCallback successCallback, in [Optional] ErrorCallback errorCallback);
void getDirectory(in [TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString path, in [Optional] Dictionary options, in [Optional] EntryCallback successCallback, in [Optional] ErrorCallback errorCallback);
void removeRecursively(in VoidCallback successCallback, in [Optional] ErrorCallback errorCallback);
void getFile(in [TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString path, in optional Dictionary options, in optional EntryCallback successCallback, in optional ErrorCallback errorCallback);
void getDirectory(in [TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString path, in optional Dictionary options, in optional EntryCallback successCallback, in optional ErrorCallback errorCallback);
void removeRecursively(in VoidCallback successCallback, in optional ErrorCallback errorCallback);
};
......@@ -33,5 +33,5 @@
JSNoStaticTables,
ImplementationLacksVTable
] interface DirectoryReader {
void readEntries(in EntriesCallback successCallback, in [Optional] ErrorCallback errorCallback);
void readEntries(in EntriesCallback successCallback, in optional ErrorCallback errorCallback);
};
......@@ -39,10 +39,10 @@
readonly attribute DOMString fullPath;
readonly attribute DOMFileSystem filesystem;
void getMetadata(in MetadataCallback successCallback, in [Optional] ErrorCallback errorCallback);
void moveTo(in DirectoryEntry parent, in [Optional, TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString name, in [Optional] EntryCallback successCallback, in [Optional] ErrorCallback errorCallback);
void copyTo(in DirectoryEntry parent, in [Optional, TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString name, in [Optional] EntryCallback successCallback, in [Optional] ErrorCallback errorCallback);
void getMetadata(in MetadataCallback successCallback, in optional ErrorCallback errorCallback);
void moveTo(in DirectoryEntry parent, in [TreatNullAs=NullString, TreatUndefinedAs=NullString] optional DOMString name, in optional EntryCallback successCallback, in optional ErrorCallback errorCallback);
void copyTo(in DirectoryEntry parent, in [TreatNullAs=NullString, TreatUndefinedAs=NullString] optional DOMString name, in optional EntryCallback successCallback, in optional ErrorCallback errorCallback);
DOMString toURL();
void remove(in VoidCallback successCallback, in [Optional] ErrorCallback errorCallback);
void getParent(in [Optional] EntryCallback successCallback, in [Optional] ErrorCallback errorCallback);
void remove(in VoidCallback successCallback, in optional ErrorCallback errorCallback);
void getParent(in optional EntryCallback successCallback, in optional ErrorCallback errorCallback);
};
......@@ -34,6 +34,6 @@
JSGenerateToJSObject,
JSNoStaticTables
] interface FileEntry : Entry {
void createWriter(in FileWriterCallback successCallback, in [Optional] ErrorCallback errorCallback);
void file(in FileCallback successCallback, in [Optional] ErrorCallback errorCallback);
void createWriter(in FileWriterCallback successCallback, in optional ErrorCallback errorCallback);
void file(in FileCallback successCallback, in optional ErrorCallback errorCallback);
};
......@@ -63,10 +63,10 @@
// EventTarget interface
void addEventListener(in DOMString type,
in EventListener listener,
in [Optional] boolean useCapture);
in optional boolean useCapture);
void removeEventListener(in DOMString type,
in EventListener listener,
in [Optional] boolean useCapture);
in optional boolean useCapture);
boolean dispatchEvent(in Event evt)
raises(EventException);
};
......@@ -30,9 +30,9 @@
const unsigned short TEMPORARY = 0;
const unsigned short PERSISTENT = 1;
void webkitRequestFileSystem(in unsigned short type, in long long size, in [Optional] FileSystemCallback successCallback, in [Optional] ErrorCallback errorCallback);
void webkitRequestFileSystem(in unsigned short type, in long long size, in optional FileSystemCallback successCallback, in optional ErrorCallback errorCallback);
DOMFileSystemSync webkitRequestFileSystemSync(in unsigned short type, in long long size) raises (FileException);
void webkitResolveLocalFileSystemURL(in DOMString url, in EntryCallback successCallback, in [Optional] ErrorCallback errorCallback);
void webkitResolveLocalFileSystemURL(in DOMString url, in EntryCallback successCallback, in optional ErrorCallback errorCallback);
EntrySync webkitResolveLocalFileSystemSyncURL(in DOMString url) raises (FileException);
attribute FileErrorConstructor FileError;
......
......@@ -29,6 +29,6 @@
ImplementationLacksVTable
] interface GamepadList {
readonly attribute unsigned long length;
Gamepad item(in [Optional=DefaultIsUndefined] unsigned long index);
Gamepad item(in [Default=Undefined] optional unsigned long index);
};
......@@ -30,12 +30,12 @@
OmitConstructor
] interface Geolocation {
[Custom] void getCurrentPosition(in PositionCallback successCallback,
in [Optional] PositionErrorCallback errorCallback,
in [Optional] PositionOptions options);
in optional PositionErrorCallback errorCallback,
in optional PositionOptions options);
[Custom] long watchPosition(in PositionCallback successCallback,
in [Optional] PositionErrorCallback errorCallback,
in [Optional] PositionOptions options);
in optional PositionErrorCallback errorCallback,
in optional PositionOptions options);
void clearWatch(in long watchID);
};
......
......@@ -37,7 +37,7 @@
raises (DOMException);
void advance(in [EnforceRange] unsigned long count)
raises (DOMException);
[CallWith=ScriptExecutionContext, ImplementedAs=continueFunction] void continue(in [Optional] any key)
[CallWith=ScriptExecutionContext, ImplementedAs=continueFunction] void continue(in optional any key)
raises (DOMException);
[CallWith=ScriptExecutionContext, ImplementedAs=deleteFunction] IDBRequest delete()
raises (DOMException);
......
......@@ -38,15 +38,15 @@
attribute EventListener onerror;
attribute EventListener onversionchange;
[Custom] IDBObjectStore createObjectStore(in DOMString name, in [Optional] Dictionary options)
[Custom] IDBObjectStore createObjectStore(in DOMString name, in optional Dictionary options)
raises (DOMException);
void deleteObjectStore(in DOMString name)
raises (DOMException);
[CallWith=ScriptExecutionContext] IDBTransaction transaction(in DOMStringList storeNames, in [Optional=DefaultIsNullString] DOMString mode)
[CallWith=ScriptExecutionContext] IDBTransaction transaction(in DOMStringList storeNames, in [Default=NullString] optional DOMString mode)
raises (DOMException);
[CallWith=ScriptExecutionContext] IDBTransaction transaction(in sequence<DOMString> storeNames, in [Optional=DefaultIsNullString] DOMString mode)
[CallWith=ScriptExecutionContext] IDBTransaction transaction(in sequence<DOMString> storeNames, in [Default=NullString] optional DOMString mode)
raises (DOMException);
[CallWith=ScriptExecutionContext] IDBTransaction transaction(in DOMString storeName, in [Optional=DefaultIsNullString] DOMString mode)
[CallWith=ScriptExecutionContext] IDBTransaction transaction(in DOMString storeName, in [Default=NullString] optional DOMString mode)
raises (DOMException);
void close();
......@@ -54,10 +54,10 @@
// EventTarget interface
void addEventListener(in DOMString type,
in EventListener listener,
in [Optional] boolean useCapture);
in optional boolean useCapture);
void removeEventListener(in DOMString type,
in EventListener listener,
in [Optional] boolean useCapture);
in optional boolean useCapture);
boolean dispatchEvent(in Event evt)
raises(EventException);
};
......
......@@ -31,7 +31,7 @@
[CallWith=ScriptExecutionContext, ImplementedAs=getDatabaseNames] IDBRequest webkitGetDatabaseNames()
raises (DOMException);
[CallWith=ScriptExecutionContext] IDBOpenDBRequest open(in DOMString name, in [EnforceRange, Optional] unsigned long long version)
[CallWith=ScriptExecutionContext] IDBOpenDBRequest open(in DOMString name, in [EnforceRange] optional unsigned long long version)
raises (DOMException);
[CallWith=ScriptExecutionContext] IDBOpenDBRequest deleteDatabase(in DOMString name)
raises (DOMException);
......
......@@ -34,14 +34,14 @@
readonly attribute boolean unique;
readonly attribute boolean multiEntry;
[CallWith=ScriptExecutionContext] IDBRequest openCursor(in [Optional] IDBKeyRange? range, in [Optional] DOMString direction)
[CallWith=ScriptExecutionContext] IDBRequest openCursor(in optional IDBKeyRange? range, in optional DOMString direction)
raises (DOMException);
[CallWith=ScriptExecutionContext] IDBRequest openCursor(in any key, in [Optional] DOMString direction)
[CallWith=ScriptExecutionContext] IDBRequest openCursor(in any key, in optional DOMString direction)
raises (DOMException);
[CallWith=ScriptExecutionContext] IDBRequest openKeyCursor(in [Optional] IDBKeyRange? range, in [Optional] DOMString direction)
[CallWith=ScriptExecutionContext] IDBRequest openKeyCursor(in optional IDBKeyRange? range, in optional DOMString direction)
raises (DOMException);
[CallWith=ScriptExecutionContext] IDBRequest openKeyCursor(in any key, in [Optional] DOMString direction)
[CallWith=ScriptExecutionContext] IDBRequest openKeyCursor(in any key, in optional DOMString direction)
raises (DOMException);
[CallWith=ScriptExecutionContext] IDBRequest get(in IDBKeyRange? key)
......@@ -52,7 +52,7 @@
raises (DOMException);
[CallWith=ScriptExecutionContext] IDBRequest getKey(in any key)
raises (DOMException);
[CallWith=ScriptExecutionContext] IDBRequest count(in [Optional] IDBKeyRange? range)
[CallWith=ScriptExecutionContext] IDBRequest count(in optional IDBKeyRange? range)
raises (DOMException);
[CallWith=ScriptExecutionContext] IDBRequest count(in any key)
raises (DOMException);
......
......@@ -35,11 +35,11 @@
[CallWith=ScriptExecutionContext] static IDBKeyRange only(in any value)
raises (DOMException);
[CallWith=ScriptExecutionContext] static IDBKeyRange lowerBound(in any bound, in [Optional] boolean open)
[CallWith=ScriptExecutionContext] static IDBKeyRange lowerBound(in any bound, in optional boolean open)
raises (DOMException);
[CallWith=ScriptExecutionContext] static IDBKeyRange upperBound(in any bound, in [Optional] boolean open)
[CallWith=ScriptExecutionContext] static IDBKeyRange upperBound(in any bound, in optional boolean open)
raises (DOMException);
[CallWith=ScriptExecutionContext] static IDBKeyRange bound(in any lower, in any upper, in [Optional] boolean lowerOpen, in [Optional] boolean upperOpen)
[CallWith=ScriptExecutionContext] static IDBKeyRange bound(in any lower, in any upper, in optional boolean lowerOpen, in optional boolean upperOpen)
raises (DOMException);
};
......@@ -34,9 +34,9 @@
readonly attribute IDBTransaction transaction;
readonly attribute boolean autoIncrement;
[CallWith=ScriptState] IDBRequest put(in any value, in [Optional] any key)
[CallWith=ScriptState] IDBRequest put(in any value, in optional any key)
raises (DOMException);
[CallWith=ScriptState] IDBRequest add(in any value, in [Optional] any key)
[CallWith=ScriptState] IDBRequest add(in any value, in optional any key)
raises (DOMException);
[CallWith=ScriptExecutionContext, ImplementedAs=deleteFunction] IDBRequest delete(in IDBKeyRange? keyRange)
raises (DOMException);
......@@ -48,20 +48,20 @@
raises (DOMException);
[CallWith=ScriptExecutionContext] IDBRequest get(in any key)
raises (DOMException);
[CallWith=ScriptExecutionContext] IDBRequest openCursor(in [Optional] IDBKeyRange? range, in [Optional] DOMString direction)
[CallWith=ScriptExecutionContext] IDBRequest openCursor(in optional IDBKeyRange? range, in optional DOMString direction)
raises (DOMException);
[CallWith=ScriptExecutionContext] IDBRequest openCursor(in any key, in [Optional] DOMString direction)
[CallWith=ScriptExecutionContext] IDBRequest openCursor(in any key, in optional DOMString direction)
raises (DOMException);
[CallWith=ScriptExecutionContext, Custom] IDBIndex createIndex(in DOMString name, in sequence<DOMString> keyPath, in [Optional] Dictionary options)
[CallWith=ScriptExecutionContext, Custom] IDBIndex createIndex(in DOMString name, in sequence<DOMString> keyPath, in optional Dictionary options)
raises (DOMException);
[CallWith=ScriptExecutionContext, Custom] IDBIndex createIndex(in DOMString name, in DOMString keyPath, in [Optional] Dictionary options)
[CallWith=ScriptExecutionContext, Custom] IDBIndex createIndex(in DOMString name, in DOMString keyPath, in optional Dictionary options)
raises (DOMException);
IDBIndex index(in DOMString name)
raises (DOMException);
void deleteIndex(in DOMString name)
raises (DOMException);
[CallWith=ScriptExecutionContext] IDBRequest count(in [Optional] IDBKeyRange? range)
[CallWith=ScriptExecutionContext] IDBRequest count(in optional IDBKeyRange? range)
raises (DOMException);
[CallWith=ScriptExecutionContext] IDBRequest count(in any key)
raises (DOMException);
......
......@@ -53,10 +53,10 @@
// EventTarget interface
void addEventListener(in DOMString type,