From c76764bdf39eca52abd2165330a16f7988708e76 Mon Sep 17 00:00:00 2001 From: "haraken@chromium.org" Date: Thu, 9 Feb 2012 06:58:35 +0000 Subject: [PATCH] Rename [Optional=CallWithDefalutValue] and [Optional=CallWithNullValue] https://bugs.webkit.org/show_bug.cgi?id=78200 Reviewed by Adam Barth. [Optional=CallWithDefalutValue] and [Optional=CallWithNullValue] are confusing. - [Optional=CallWithDefalutValue] indicates that a missing value should be treated as if the JavaScript undefined is passed. - [Optional=CallWithNullValue] indicates that a missing value should be treated as the WebKit null value (i.e. JSValue() or v8::Local()). - Actually, the difference between [Optional=CallWithDefalutValue] and [Optional=CallWithNullValue] appears only when the type of the missing value is DOMString. In case of [Optional=CallWithDefalutValue], the missing value is converted to the string "undefined". On the other hand, in case of [Optional=CallWithNullValue], the missing value is converted to the WebKit null string. With these observations, this patch renames them as follows: - Rename [Optional=CallWithDefalutValue] to [Optional=TreatAsUndefined]. - Remove [Optional=CallWithNullValue]. Instead, we use [Optional=TreatAsUndefined, TreatUndefinedAs=NullString]. Test: bindings/scripts/test/TestInterface.idl * bindings/js/JSDOMBinding.h: Renamed MissingIsUndefined to MissingIsUndefinedValue, renamed MissingIsEmpty to MissingIsNullValue. * bindings/v8/V8Binding.h: Ditto. * bindings/v8/custom/V8BindingMacros.h: Ditto. * bindings/scripts/CodeGeneratorJS.pm: Modified to support the IDL attribute renaming. (GenerateParametersCheck): (GenerateConstructorDefinition): * bindings/scripts/CodeGeneratorV8.pm: Ditto. (GenerateParametersCheck): (RequiresCustomSignature): * Modules/gamepad/GamepadList.idl: Renamed IDL attributes as described above. * Modules/intents/Intent.idl: * css/CSSMediaRule.idl: * css/CSSPrimitiveValue.idl: * css/CSSRuleList.idl: * css/CSSStyleDeclaration.idl: * css/CSSStyleSheet.idl: * css/CSSValueList.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/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/HashChangeEvent.idl: * dom/KeyboardEvent.idl: * dom/MessageEvent.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/WheelEvent.idl: * html/DOMFormData.idl: * html/HTMLAllCollection.idl: * html/HTMLAudioElement.idl: * html/HTMLCanvasElement.idl: * html/HTMLCollection.idl: * html/HTMLDocument.idl: * html/HTMLElement.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/TextTrackCue.idl: * html/canvas/CanvasGradient.idl: * html/canvas/CanvasRenderingContext2D.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: * page/Console.idl: * page/DOMSelection.idl: * page/DOMWindow.idl: * page/History.idl: * page/Location.idl: * plugins/DOMMimeTypeArray.idl: * plugins/DOMPlugin.idl: * plugins/DOMPluginArray.idl: * storage/IDBDatabase.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/SVGStylable.idl: * svg/SVGTests.idl: * svg/SVGTextContentElement.idl: * webaudio/AudioNode.idl: * workers/SharedWorker.idl: * workers/WorkerContext.idl: * xml/DOMParser.idl: * xml/XMLSerializer.idl: * xml/XPathEvaluator.idl: * xml/XPathExpression.idl: * xml/XPathNSResolver.idl: * xml/XPathResult.idl: * bindings/scripts/test/TestInterface.idl: Added test cases for [Optional], [Optional=TreatAsUndefined] and [Optional=TreatAsUndefined, TreatUndefinedAs=NullString] * bindings/scripts/test/TestNamedConstructor.idl: Renamed IDL attributes as described above. * bindings/scripts/test/TestObj.idl: Ditto. * bindings/scripts/test/CPP/WebDOMTestObj.cpp: Updated run-bindings-tests results. (WebDOMTestObj::methodWithOptionalString): (WebDOMTestObj::methodWithOptionalIsTreatAsUndefinedString): (WebDOMTestObj::methodWithOptionalIsNullStringString): * bindings/scripts/test/CPP/WebDOMTestObj.h: Ditto. * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: Ditto. (webkit_dom_test_obj_method_with_optional_string): (webkit_dom_test_obj_method_with_optional_is_treat_as_undefined_string): (webkit_dom_test_obj_method_with_optional_is_null_string_string): * bindings/scripts/test/GObject/WebKitDOMTestObj.h: Ditto. * bindings/scripts/test/JS/JSFloat64Array.cpp: Ditto. (WebCore::jsFloat64ArrayPrototypeFunctionFoo): * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: Ditto. (WebCore::jsTestActiveDOMObjectPrototypeFunctionExcitingFunction): (WebCore::jsTestActiveDOMObjectPrototypeFunctionPostMessage): * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp: Ditto. (WebCore::jsTestCustomNamedGetterPrototypeFunctionAnotherFunction): * bindings/scripts/test/JS/JSTestEventTarget.cpp: Ditto. (WebCore::jsTestEventTargetPrototypeFunctionItem): (WebCore::jsTestEventTargetPrototypeFunctionDispatchEvent): * bindings/scripts/test/JS/JSTestInterface.cpp: Ditto. (WebCore::JSTestInterfaceConstructor::constructJSTestInterface): (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2): * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: Ditto. (WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethod): * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: Ditto. (WebCore::JSTestNamedConstructorNamedConstructor::constructJSTestNamedConstructor): * bindings/scripts/test/JS/JSTestObj.cpp: Ditto. (WebCore): (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs): (WebCore::jsTestObjPrototypeFunctionIntMethodWithArgs): (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs): (WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows): (WebCore::jsTestObjPrototypeFunctionSerializedValue): (WebCore::jsTestObjPrototypeFunctionIdbKey): (WebCore::jsTestObjPrototypeFunctionOptionsObject): (WebCore::jsTestObjPrototypeFunctionCustomArgsAndException): (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArg): (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg): (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs): (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalString): (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalIsTreatAsUndefinedString): (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalIsNullStringString): (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod1): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod3): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod4): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod6): (WebCore::jsTestObjPrototypeFunctionOverloadedMethod7): (WebCore::jsTestObjConstructorFunctionClassMethodWithOptional): (WebCore::jsTestObjConstructorFunctionOverloadedMethod11): (WebCore::jsTestObjConstructorFunctionOverloadedMethod12): (WebCore::jsTestObjPrototypeFunctionConvert1): (WebCore::jsTestObjPrototypeFunctionConvert2): (WebCore::jsTestObjPrototypeFunctionConvert3): (WebCore::jsTestObjPrototypeFunctionConvert4): (WebCore::jsTestObjPrototypeFunctionConvert5): (WebCore::jsTestObjPrototypeFunctionStrictFunction): * bindings/scripts/test/JS/JSTestObj.h: Ditto. (WebCore): * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: Ditto. (WebCore::JSTestSerializedScriptValueInterfaceConstructor::constructJSTestSerializedScriptValueInterface): * bindings/scripts/test/ObjC/DOMTestObj.h: Ditto. * bindings/scripts/test/ObjC/DOMTestObj.mm: Ditto. (-[DOMTestObj methodWithOptionalString:]): (-[DOMTestObj methodWithOptionalIsTreatAsUndefinedString:]): (-[DOMTestObj methodWithOptionalIsNullStringString:]): * bindings/scripts/test/V8/V8Float64Array.cpp: Ditto. (WebCore::Float64ArrayInternal::fooCallback): * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp: Ditto. (WebCore::TestActiveDOMObjectInternal::excitingFunctionCallback): (WebCore::TestActiveDOMObjectInternal::postMessageCallback): * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp: Ditto. (WebCore::TestCustomNamedGetterInternal::anotherFunctionCallback): * bindings/scripts/test/V8/V8TestEventTarget.cpp: Ditto. (WebCore::TestEventTargetInternal::itemCallback): (WebCore::TestEventTargetInternal::dispatchEventCallback): * bindings/scripts/test/V8/V8TestInterface.cpp: Ditto. (WebCore::TestInterfaceInternal::supplementalMethod2Callback): (WebCore::V8TestInterface::constructorCallback): * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp: Ditto. (WebCore::TestMediaQueryListListenerInternal::methodCallback): * bindings/scripts/test/V8/V8TestNamedConstructor.cpp: Ditto. (WebCore::V8TestNamedConstructorConstructorCallback): * bindings/scripts/test/V8/V8TestObj.cpp: Ditto. (WebCore::TestObjInternal::voidMethodWithArgsCallback): (WebCore::TestObjInternal::intMethodWithArgsCallback): (WebCore::TestObjInternal::objMethodWithArgsCallback): (WebCore::TestObjInternal::methodThatRequiresAllArgsAndThrowsCallback): (WebCore::TestObjInternal::idbKeyCallback): (WebCore::TestObjInternal::optionsObjectCallback): (WebCore::TestObjInternal::customArgsAndExceptionCallback): (WebCore::TestObjInternal::methodWithOptionalArgCallback): (WebCore::TestObjInternal::methodWithNonOptionalArgAndOptionalArgCallback): (WebCore::TestObjInternal::methodWithNonOptionalArgAndTwoOptionalArgsCallback): (WebCore::TestObjInternal::methodWithOptionalStringCallback): (TestObjInternal): (WebCore::TestObjInternal::methodWithOptionalIsTreatAsUndefinedStringCallback): (WebCore::TestObjInternal::methodWithOptionalIsNullStringStringCallback): (WebCore::TestObjInternal::methodWithNonCallbackArgAndCallbackArgCallback): (WebCore::TestObjInternal::overloadedMethod1Callback): (WebCore::TestObjInternal::overloadedMethod2Callback): (WebCore::TestObjInternal::overloadedMethod3Callback): (WebCore::TestObjInternal::overloadedMethod4Callback): (WebCore::TestObjInternal::overloadedMethod6Callback): (WebCore::TestObjInternal::overloadedMethod7Callback): (WebCore::TestObjInternal::classMethodWithOptionalCallback): (WebCore::TestObjInternal::overloadedMethod11Callback): (WebCore::TestObjInternal::overloadedMethod12Callback): (WebCore::TestObjInternal::enabledAtRuntimeMethod1Callback): (WebCore::TestObjInternal::enabledAtRuntimeMethod2Callback): (WebCore::TestObjInternal::convert1Callback): (WebCore::TestObjInternal::convert2Callback): (WebCore::TestObjInternal::convert3Callback): (WebCore::TestObjInternal::convert4Callback): (WebCore::TestObjInternal::convert5Callback): (WebCore::TestObjInternal::strictFunctionCallback): (WebCore): * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp: Ditto. (WebCore::V8TestSerializedScriptValueInterface::constructorCallback): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@107182 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- Source/WebCore/ChangeLog | 274 +++++++++++++++++++++ Source/WebCore/Modules/gamepad/GamepadList.idl | 2 +- Source/WebCore/Modules/intents/Intent.idl | 2 +- Source/WebCore/bindings/js/JSDOMBinding.h | 6 +- Source/WebCore/bindings/scripts/CodeGeneratorJS.pm | 20 +- Source/WebCore/bindings/scripts/CodeGeneratorV8.pm | 17 +- .../bindings/scripts/test/CPP/WebDOMTestObj.cpp | 24 ++ .../bindings/scripts/test/CPP/WebDOMTestObj.h | 3 + .../scripts/test/GObject/WebKitDOMTestObj.cpp | 33 +++ .../scripts/test/GObject/WebKitDOMTestObj.h | 33 +++ .../bindings/scripts/test/JS/JSFloat64Array.cpp | 2 +- .../scripts/test/JS/JSTestActiveDOMObject.cpp | 4 +- .../scripts/test/JS/JSTestCustomNamedGetter.cpp | 2 +- .../bindings/scripts/test/JS/JSTestEventTarget.cpp | 4 +- .../bindings/scripts/test/JS/JSTestInterface.cpp | 8 +- .../test/JS/JSTestMediaQueryListListener.cpp | 2 +- .../scripts/test/JS/JSTestNamedConstructor.cpp | 6 +- .../WebCore/bindings/scripts/test/JS/JSTestObj.cpp | 141 +++++++---- .../WebCore/bindings/scripts/test/JS/JSTestObj.h | 3 + .../JS/JSTestSerializedScriptValueInterface.cpp | 4 +- .../bindings/scripts/test/ObjC/DOMTestObj.h | 3 + .../bindings/scripts/test/ObjC/DOMTestObj.mm | 18 ++ .../bindings/scripts/test/TestInterface.idl | 2 +- .../bindings/scripts/test/TestNamedConstructor.idl | 2 +- Source/WebCore/bindings/scripts/test/TestObj.idl | 3 + .../bindings/scripts/test/V8/V8Float64Array.cpp | 2 +- .../scripts/test/V8/V8TestActiveDOMObject.cpp | 4 +- .../scripts/test/V8/V8TestCustomNamedGetter.cpp | 2 +- .../bindings/scripts/test/V8/V8TestEventTarget.cpp | 4 +- .../bindings/scripts/test/V8/V8TestInterface.cpp | 8 +- .../test/V8/V8TestMediaQueryListListener.cpp | 2 +- .../scripts/test/V8/V8TestNamedConstructor.cpp | 6 +- .../WebCore/bindings/scripts/test/V8/V8TestObj.cpp | 120 +++++---- .../V8/V8TestSerializedScriptValueInterface.cpp | 2 +- Source/WebCore/bindings/v8/V8Binding.h | 4 +- .../WebCore/bindings/v8/custom/V8BindingMacros.h | 2 +- Source/WebCore/css/CSSMediaRule.idl | 6 +- Source/WebCore/css/CSSPrimitiveValue.idl | 10 +- Source/WebCore/css/CSSRuleList.idl | 2 +- Source/WebCore/css/CSSStyleDeclaration.idl | 20 +- Source/WebCore/css/CSSStyleSheet.idl | 12 +- Source/WebCore/css/CSSValueList.idl | 2 +- Source/WebCore/css/MediaList.idl | 6 +- Source/WebCore/css/MediaQueryList.idl | 4 +- Source/WebCore/css/MediaQueryListListener.idl | 2 +- Source/WebCore/css/StyleMedia.idl | 2 +- Source/WebCore/css/StyleSheetList.idl | 2 +- Source/WebCore/css/WebKitCSSKeyframesRule.idl | 6 +- Source/WebCore/css/WebKitCSSMatrix.idl | 36 +-- Source/WebCore/dom/CharacterData.idl | 20 +- Source/WebCore/dom/ClientRectList.idl | 2 +- Source/WebCore/dom/CompositionEvent.idl | 10 +- Source/WebCore/dom/CustomEvent.idl | 8 +- Source/WebCore/dom/DOMImplementation.idl | 22 +- Source/WebCore/dom/DOMStringList.idl | 4 +- Source/WebCore/dom/DataTransferItem.idl | 2 +- Source/WebCore/dom/DataTransferItemList.idl | 6 +- Source/WebCore/dom/DeviceMotionEvent.idl | 14 +- Source/WebCore/dom/DeviceOrientationEvent.idl | 14 +- Source/WebCore/dom/Document.idl | 124 +++++----- Source/WebCore/dom/Element.idl | 50 ++-- Source/WebCore/dom/Event.idl | 6 +- Source/WebCore/dom/HashChangeEvent.idl | 10 +- Source/WebCore/dom/KeyboardEvent.idl | 44 ++-- Source/WebCore/dom/MessageEvent.idl | 48 ++-- Source/WebCore/dom/MouseEvent.idl | 30 +-- Source/WebCore/dom/MutationEvent.idl | 16 +- Source/WebCore/dom/NamedNodeMap.idl | 18 +- Source/WebCore/dom/Node.idl | 20 +- Source/WebCore/dom/NodeFilter.idl | 2 +- Source/WebCore/dom/NodeList.idl | 2 +- Source/WebCore/dom/OverflowEvent.idl | 6 +- Source/WebCore/dom/Range.idl | 46 ++-- Source/WebCore/dom/ShadowRoot.idl | 10 +- Source/WebCore/dom/Text.idl | 4 +- Source/WebCore/dom/TextEvent.idl | 10 +- Source/WebCore/dom/TouchEvent.idl | 26 +- Source/WebCore/dom/UIEvent.idl | 10 +- Source/WebCore/dom/WheelEvent.idl | 44 ++-- Source/WebCore/html/DOMFormData.idl | 6 +- Source/WebCore/html/HTMLAllCollection.idl | 2 +- Source/WebCore/html/HTMLAudioElement.idl | 2 +- Source/WebCore/html/HTMLCanvasElement.idl | 4 +- Source/WebCore/html/HTMLCollection.idl | 6 +- Source/WebCore/html/HTMLDocument.idl | 4 +- Source/WebCore/html/HTMLElement.idl | 12 +- Source/WebCore/html/HTMLInputElement.idl | 4 +- Source/WebCore/html/HTMLMediaElement.idl | 2 +- Source/WebCore/html/HTMLOptionElement.idl | 2 +- Source/WebCore/html/HTMLOptionsCollection.idl | 4 +- Source/WebCore/html/HTMLSelectElement.idl | 8 +- Source/WebCore/html/HTMLTableElement.idl | 4 +- Source/WebCore/html/HTMLTableRowElement.idl | 4 +- Source/WebCore/html/HTMLTableSectionElement.idl | 4 +- Source/WebCore/html/HTMLTextAreaElement.idl | 4 +- Source/WebCore/html/TextTrackCue.idl | 2 +- Source/WebCore/html/canvas/CanvasGradient.idl | 4 +- .../html/canvas/CanvasRenderingContext2D.idl | 160 ++++++------ Source/WebCore/html/canvas/Float32Array.idl | 2 +- Source/WebCore/html/canvas/Float64Array.idl | 2 +- Source/WebCore/html/canvas/Int16Array.idl | 2 +- Source/WebCore/html/canvas/Int32Array.idl | 2 +- Source/WebCore/html/canvas/Int8Array.idl | 2 +- .../WebCore/html/canvas/OESVertexArrayObject.idl | 6 +- Source/WebCore/html/canvas/Uint16Array.idl | 2 +- Source/WebCore/html/canvas/Uint32Array.idl | 2 +- Source/WebCore/html/canvas/Uint8Array.idl | 2 +- Source/WebCore/html/canvas/Uint8ClampedArray.idl | 2 +- Source/WebCore/page/Console.idl | 2 +- Source/WebCore/page/DOMSelection.idl | 36 +-- Source/WebCore/page/DOMWindow.idl | 68 ++--- Source/WebCore/page/History.idl | 2 +- Source/WebCore/page/Location.idl | 4 +- Source/WebCore/plugins/DOMMimeTypeArray.idl | 4 +- Source/WebCore/plugins/DOMPlugin.idl | 4 +- Source/WebCore/plugins/DOMPluginArray.idl | 6 +- Source/WebCore/storage/IDBDatabase.idl | 6 +- Source/WebCore/storage/StorageEvent.idl | 16 +- Source/WebCore/svg/ElementTimeControl.idl | 4 +- Source/WebCore/svg/SVGDocument.idl | 2 +- Source/WebCore/svg/SVGElementInstanceList.idl | 2 +- Source/WebCore/svg/SVGFEDropShadowElement.idl | 4 +- Source/WebCore/svg/SVGFEGaussianBlurElement.idl | 4 +- Source/WebCore/svg/SVGFEMorphologyElement.idl | 4 +- Source/WebCore/svg/SVGFilterElement.idl | 4 +- Source/WebCore/svg/SVGLocatable.idl | 2 +- Source/WebCore/svg/SVGMarkerElement.idl | 2 +- Source/WebCore/svg/SVGPathElement.idl | 120 ++++----- Source/WebCore/svg/SVGSVGElement.idl | 26 +- Source/WebCore/svg/SVGStylable.idl | 2 +- Source/WebCore/svg/SVGTests.idl | 2 +- Source/WebCore/svg/SVGTextContentElement.idl | 18 +- Source/WebCore/webaudio/AudioNode.idl | 4 +- Source/WebCore/workers/SharedWorker.idl | 2 +- Source/WebCore/workers/WorkerContext.idl | 4 +- Source/WebCore/xml/DOMParser.idl | 4 +- Source/WebCore/xml/XMLSerializer.idl | 2 +- Source/WebCore/xml/XPathEvaluator.idl | 16 +- Source/WebCore/xml/XPathExpression.idl | 6 +- Source/WebCore/xml/XPathNSResolver.idl | 2 +- Source/WebCore/xml/XPathResult.idl | 2 +- 141 files changed, 1317 insertions(+), 843 deletions(-) diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog index 3b9dc1c..86d9a10 100644 --- a/Source/WebCore/ChangeLog +++ b/Source/WebCore/ChangeLog @@ -1,5 +1,279 @@ 2012-02-08 Kentaro Hara + Rename [Optional=CallWithDefalutValue] and [Optional=CallWithNullValue] + https://bugs.webkit.org/show_bug.cgi?id=78200 + + Reviewed by Adam Barth. + + [Optional=CallWithDefalutValue] and [Optional=CallWithNullValue] are confusing. + + - [Optional=CallWithDefalutValue] indicates that a missing value should be treated + as if the JavaScript undefined is passed. + - [Optional=CallWithNullValue] indicates that a missing value should be treated as + the WebKit null value (i.e. JSValue() or v8::Local()). + - Actually, the difference between [Optional=CallWithDefalutValue] and + [Optional=CallWithNullValue] appears only when the type of the missing value is DOMString. + In case of [Optional=CallWithDefalutValue], the missing value is converted to the string + "undefined". On the other hand, in case of [Optional=CallWithNullValue], the missing + value is converted to the WebKit null string. + + With these observations, this patch renames them as follows: + + - Rename [Optional=CallWithDefalutValue] to [Optional=TreatAsUndefined]. + - Remove [Optional=CallWithNullValue]. Instead, we use + [Optional=TreatAsUndefined, TreatUndefinedAs=NullString]. + + Test: bindings/scripts/test/TestInterface.idl + + * bindings/js/JSDOMBinding.h: Renamed MissingIsUndefined to MissingIsUndefinedValue, + renamed MissingIsEmpty to MissingIsNullValue. + * bindings/v8/V8Binding.h: Ditto. + * bindings/v8/custom/V8BindingMacros.h: Ditto. + + * bindings/scripts/CodeGeneratorJS.pm: Modified to support the IDL attribute renaming. + (GenerateParametersCheck): + (GenerateConstructorDefinition): + * bindings/scripts/CodeGeneratorV8.pm: Ditto. + (GenerateParametersCheck): + (RequiresCustomSignature): + + * Modules/gamepad/GamepadList.idl: Renamed IDL attributes as described above. + * Modules/intents/Intent.idl: + * css/CSSMediaRule.idl: + * css/CSSPrimitiveValue.idl: + * css/CSSRuleList.idl: + * css/CSSStyleDeclaration.idl: + * css/CSSStyleSheet.idl: + * css/CSSValueList.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/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/HashChangeEvent.idl: + * dom/KeyboardEvent.idl: + * dom/MessageEvent.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/WheelEvent.idl: + * html/DOMFormData.idl: + * html/HTMLAllCollection.idl: + * html/HTMLAudioElement.idl: + * html/HTMLCanvasElement.idl: + * html/HTMLCollection.idl: + * html/HTMLDocument.idl: + * html/HTMLElement.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/TextTrackCue.idl: + * html/canvas/CanvasGradient.idl: + * html/canvas/CanvasRenderingContext2D.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: + * page/Console.idl: + * page/DOMSelection.idl: + * page/DOMWindow.idl: + * page/History.idl: + * page/Location.idl: + * plugins/DOMMimeTypeArray.idl: + * plugins/DOMPlugin.idl: + * plugins/DOMPluginArray.idl: + * storage/IDBDatabase.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/SVGStylable.idl: + * svg/SVGTests.idl: + * svg/SVGTextContentElement.idl: + * webaudio/AudioNode.idl: + * workers/SharedWorker.idl: + * workers/WorkerContext.idl: + * xml/DOMParser.idl: + * xml/XMLSerializer.idl: + * xml/XPathEvaluator.idl: + * xml/XPathExpression.idl: + * xml/XPathNSResolver.idl: + * xml/XPathResult.idl: + + * bindings/scripts/test/TestInterface.idl: Added test cases for [Optional], + [Optional=TreatAsUndefined] and [Optional=TreatAsUndefined, TreatUndefinedAs=NullString] + * bindings/scripts/test/TestNamedConstructor.idl: Renamed IDL attributes as described above. + * bindings/scripts/test/TestObj.idl: Ditto. + + * bindings/scripts/test/CPP/WebDOMTestObj.cpp: Updated run-bindings-tests results. + (WebDOMTestObj::methodWithOptionalString): + (WebDOMTestObj::methodWithOptionalIsTreatAsUndefinedString): + (WebDOMTestObj::methodWithOptionalIsNullStringString): + * bindings/scripts/test/CPP/WebDOMTestObj.h: Ditto. + * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: Ditto. + (webkit_dom_test_obj_method_with_optional_string): + (webkit_dom_test_obj_method_with_optional_is_treat_as_undefined_string): + (webkit_dom_test_obj_method_with_optional_is_null_string_string): + * bindings/scripts/test/GObject/WebKitDOMTestObj.h: Ditto. + * bindings/scripts/test/JS/JSFloat64Array.cpp: Ditto. + (WebCore::jsFloat64ArrayPrototypeFunctionFoo): + * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: Ditto. + (WebCore::jsTestActiveDOMObjectPrototypeFunctionExcitingFunction): + (WebCore::jsTestActiveDOMObjectPrototypeFunctionPostMessage): + * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp: Ditto. + (WebCore::jsTestCustomNamedGetterPrototypeFunctionAnotherFunction): + * bindings/scripts/test/JS/JSTestEventTarget.cpp: Ditto. + (WebCore::jsTestEventTargetPrototypeFunctionItem): + (WebCore::jsTestEventTargetPrototypeFunctionDispatchEvent): + * bindings/scripts/test/JS/JSTestInterface.cpp: Ditto. + (WebCore::JSTestInterfaceConstructor::constructJSTestInterface): + (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2): + * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: Ditto. + (WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethod): + * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: Ditto. + (WebCore::JSTestNamedConstructorNamedConstructor::constructJSTestNamedConstructor): + * bindings/scripts/test/JS/JSTestObj.cpp: Ditto. + (WebCore): + (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs): + (WebCore::jsTestObjPrototypeFunctionIntMethodWithArgs): + (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs): + (WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows): + (WebCore::jsTestObjPrototypeFunctionSerializedValue): + (WebCore::jsTestObjPrototypeFunctionIdbKey): + (WebCore::jsTestObjPrototypeFunctionOptionsObject): + (WebCore::jsTestObjPrototypeFunctionCustomArgsAndException): + (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArg): + (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg): + (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs): + (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalString): + (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalIsTreatAsUndefinedString): + (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalIsNullStringString): + (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg): + (WebCore::jsTestObjPrototypeFunctionOverloadedMethod1): + (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2): + (WebCore::jsTestObjPrototypeFunctionOverloadedMethod3): + (WebCore::jsTestObjPrototypeFunctionOverloadedMethod4): + (WebCore::jsTestObjPrototypeFunctionOverloadedMethod6): + (WebCore::jsTestObjPrototypeFunctionOverloadedMethod7): + (WebCore::jsTestObjConstructorFunctionClassMethodWithOptional): + (WebCore::jsTestObjConstructorFunctionOverloadedMethod11): + (WebCore::jsTestObjConstructorFunctionOverloadedMethod12): + (WebCore::jsTestObjPrototypeFunctionConvert1): + (WebCore::jsTestObjPrototypeFunctionConvert2): + (WebCore::jsTestObjPrototypeFunctionConvert3): + (WebCore::jsTestObjPrototypeFunctionConvert4): + (WebCore::jsTestObjPrototypeFunctionConvert5): + (WebCore::jsTestObjPrototypeFunctionStrictFunction): + * bindings/scripts/test/JS/JSTestObj.h: Ditto. + (WebCore): + * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: Ditto. + (WebCore::JSTestSerializedScriptValueInterfaceConstructor::constructJSTestSerializedScriptValueInterface): + * bindings/scripts/test/ObjC/DOMTestObj.h: Ditto. + * bindings/scripts/test/ObjC/DOMTestObj.mm: Ditto. + (-[DOMTestObj methodWithOptionalString:]): + (-[DOMTestObj methodWithOptionalIsTreatAsUndefinedString:]): + (-[DOMTestObj methodWithOptionalIsNullStringString:]): + * bindings/scripts/test/V8/V8Float64Array.cpp: Ditto. + (WebCore::Float64ArrayInternal::fooCallback): + * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp: Ditto. + (WebCore::TestActiveDOMObjectInternal::excitingFunctionCallback): + (WebCore::TestActiveDOMObjectInternal::postMessageCallback): + * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp: Ditto. + (WebCore::TestCustomNamedGetterInternal::anotherFunctionCallback): + * bindings/scripts/test/V8/V8TestEventTarget.cpp: Ditto. + (WebCore::TestEventTargetInternal::itemCallback): + (WebCore::TestEventTargetInternal::dispatchEventCallback): + * bindings/scripts/test/V8/V8TestInterface.cpp: Ditto. + (WebCore::TestInterfaceInternal::supplementalMethod2Callback): + (WebCore::V8TestInterface::constructorCallback): + * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp: Ditto. + (WebCore::TestMediaQueryListListenerInternal::methodCallback): + * bindings/scripts/test/V8/V8TestNamedConstructor.cpp: Ditto. + (WebCore::V8TestNamedConstructorConstructorCallback): + * bindings/scripts/test/V8/V8TestObj.cpp: Ditto. + (WebCore::TestObjInternal::voidMethodWithArgsCallback): + (WebCore::TestObjInternal::intMethodWithArgsCallback): + (WebCore::TestObjInternal::objMethodWithArgsCallback): + (WebCore::TestObjInternal::methodThatRequiresAllArgsAndThrowsCallback): + (WebCore::TestObjInternal::idbKeyCallback): + (WebCore::TestObjInternal::optionsObjectCallback): + (WebCore::TestObjInternal::customArgsAndExceptionCallback): + (WebCore::TestObjInternal::methodWithOptionalArgCallback): + (WebCore::TestObjInternal::methodWithNonOptionalArgAndOptionalArgCallback): + (WebCore::TestObjInternal::methodWithNonOptionalArgAndTwoOptionalArgsCallback): + (WebCore::TestObjInternal::methodWithOptionalStringCallback): + (TestObjInternal): + (WebCore::TestObjInternal::methodWithOptionalIsTreatAsUndefinedStringCallback): + (WebCore::TestObjInternal::methodWithOptionalIsNullStringStringCallback): + (WebCore::TestObjInternal::methodWithNonCallbackArgAndCallbackArgCallback): + (WebCore::TestObjInternal::overloadedMethod1Callback): + (WebCore::TestObjInternal::overloadedMethod2Callback): + (WebCore::TestObjInternal::overloadedMethod3Callback): + (WebCore::TestObjInternal::overloadedMethod4Callback): + (WebCore::TestObjInternal::overloadedMethod6Callback): + (WebCore::TestObjInternal::overloadedMethod7Callback): + (WebCore::TestObjInternal::classMethodWithOptionalCallback): + (WebCore::TestObjInternal::overloadedMethod11Callback): + (WebCore::TestObjInternal::overloadedMethod12Callback): + (WebCore::TestObjInternal::enabledAtRuntimeMethod1Callback): + (WebCore::TestObjInternal::enabledAtRuntimeMethod2Callback): + (WebCore::TestObjInternal::convert1Callback): + (WebCore::TestObjInternal::convert2Callback): + (WebCore::TestObjInternal::convert3Callback): + (WebCore::TestObjInternal::convert4Callback): + (WebCore::TestObjInternal::convert5Callback): + (WebCore::TestObjInternal::strictFunctionCallback): + (WebCore): + * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp: Ditto. + (WebCore::V8TestSerializedScriptValueInterface::constructorCallback): + +2012-02-08 Kentaro Hara + Rename [HasNumericIndexGetter] to [NumericIndexedGetter] https://bugs.webkit.org/show_bug.cgi?id=78096 diff --git a/Source/WebCore/Modules/gamepad/GamepadList.idl b/Source/WebCore/Modules/gamepad/GamepadList.idl index 6189ddc..e49fe15 100644 --- a/Source/WebCore/Modules/gamepad/GamepadList.idl +++ b/Source/WebCore/Modules/gamepad/GamepadList.idl @@ -30,7 +30,7 @@ module dom { IndexedGetter ] GamepadList { readonly attribute unsigned long length; - Gamepad item(in [Optional=CallWithDefaultValue] unsigned long index); + Gamepad item(in [Optional=TreatAsUndefined] unsigned long index); }; } diff --git a/Source/WebCore/Modules/intents/Intent.idl b/Source/WebCore/Modules/intents/Intent.idl index 33657f4..12c77f1 100644 --- a/Source/WebCore/Modules/intents/Intent.idl +++ b/Source/WebCore/Modules/intents/Intent.idl @@ -26,7 +26,7 @@ module window { interface [ Conditional=WEB_INTENTS, - Constructor(in DOMString action, in DOMString type, in [Optional=CallWithNullValue] SerializedScriptValue data), + Constructor(in DOMString action, in DOMString type, in [Optional=TreatAsUndefined, TreatUndefinedAs=NullString] SerializedScriptValue data), ConstructorRaisesException ] Intent { readonly attribute DOMString action; diff --git a/Source/WebCore/bindings/js/JSDOMBinding.h b/Source/WebCore/bindings/js/JSDOMBinding.h index 7e1af20..8d1599a 100644 --- a/Source/WebCore/bindings/js/JSDOMBinding.h +++ b/Source/WebCore/bindings/js/JSDOMBinding.h @@ -42,11 +42,11 @@ namespace WebCore { enum ParameterMissingPolicy { - MissingIsUndefined, - MissingIsEmpty + MissingIsUndefinedValue, + MissingIsNullValue }; -#define MAYBE_MISSING_PARAMETER(exec, index, policy) (((policy) == MissingIsEmpty && (index) >= (exec)->argumentCount()) ? (JSValue()) : ((exec)->argument(index))) +#define MAYBE_MISSING_PARAMETER(exec, index, policy) (((policy) == MissingIsNullValue && (index) >= (exec)->argumentCount()) ? (JSValue()) : ((exec)->argument(index))) class Frame; class KURL; diff --git a/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm b/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm index 2e91426..3312fc2 100644 --- a/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm +++ b/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm @@ -2427,13 +2427,9 @@ sub GenerateParametersCheck $implIncludes{"JSDOMBinding.h"} = 1; foreach my $parameter (@{$function->parameters}) { - # Optional callbacks should be treated differently, because they always have a default value (0), - # and we can reduce the number of overloaded functions that take a different number of parameters. - # Optional arguments with [Optional=CallWithDefaultValue] or [Optional=CallWithNullValue] - # should not generate an early call. - my $optional = $parameter->extendedAttributes->{"Optional"}; - if ($optional && $optional ne "CallWithDefaultValue" && $optional ne "CallWithNullValue" && !$parameter->extendedAttributes->{"Callback"}) { - # Generate early call if there are enough parameters. + # Optional arguments with [Optional] should generate an early call with fewer arguments. + # Optional arguments with [Optional=TreatAsUndefined] should not generate the early call. + if ($parameter->extendedAttributes->{"Optional"} && $parameter->extendedAttributes->{"Optional"} ne "TreatAsUndefined" && !$parameter->extendedAttributes->{"Callback"}) { if (!$hasOptionalArguments) { push(@$outputArray, "\n size_t argsCount = exec->argumentCount();\n"); $hasOptionalArguments = 1; @@ -2499,10 +2495,9 @@ sub GenerateParametersCheck } } - my $optional = $parameter->extendedAttributes->{"Optional"}; - my $parameterMissingPolicy = "MissingIsUndefined"; - if ($optional && $optional eq "CallWithNullValue") { - $parameterMissingPolicy = "MissingIsEmpty"; + my $parameterMissingPolicy = "MissingIsUndefinedValue"; + if ($parameter->extendedAttributes->{"TreatAsUndefined"} and $parameter->extendedAttributes->{"TreatAsUndefined"} eq "NullString") { + $parameterMissingPolicy = "MissingIsNullValue"; } push(@$outputArray, " " . GetNativeTypeFromSignature($parameter) . " $name(" . JSValueToNative($parameter, "MAYBE_MISSING_PARAMETER(exec, $argsIndex, $parameterMissingPolicy)") . ");\n"); @@ -3521,8 +3516,7 @@ END } # For now, we do not support SVG constructors. - # We do not also support a constructor [Optional] argument without CallWithDefaultValue - # nor CallWithNullValue. + # In constructor arguments, we can use [Optional=TreatAsUndefined] but cannot use [Optional]. my $numParameters = @{$function->parameters}; my ($dummy, $paramIndex) = GenerateParametersCheck($outputArray, $function, $dataNode, $numParameters, $interfaceName, "constructorCallback", undef, undef, undef); diff --git a/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm b/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm index 10015ad..7ea32a7 100644 --- a/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm +++ b/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm @@ -1526,11 +1526,9 @@ sub GenerateParametersCheck my $parameterName = $parameter->name; - # Optional callbacks should be treated differently, because they always have a default value (0), - # and we can reduce the number of overloaded functions that take a different number of parameters. - # Optional arguments with default values [Optional=CallWithDefaultValue] or [Optional=CallWithNullValue] should not generate an early call. - my $optional = $parameter->extendedAttributes->{"Optional"}; - if ($optional && $optional ne "CallWithDefaultValue" && $optional ne "CallWithNullValue" && !$parameter->extendedAttributes->{"Callback"}) { + # Optional arguments with [Optional] should generate an early call with fewer arguments. + # Optional arguments with [Optional=TreatAsUndefined] should not generate the early call. + if ($parameter->extendedAttributes->{"Optional"} && $parameter->extendedAttributes->{"Optional"} ne "TreatAsUndefined" && !$parameter->extendedAttributes->{"Callback"}) { # Generate early call if there are not enough parameters. $parameterCheckString .= " if (args.Length() <= $paramIndex) {\n"; my $functionCall = GenerateFunctionCallString($function, $paramIndex, " " x 2, $implClassName); @@ -1538,9 +1536,9 @@ sub GenerateParametersCheck $parameterCheckString .= " }\n"; } - my $parameterMissingPolicy = "MissingIsUndefined"; - if ($optional && $optional eq "CallWithNullValue") { - $parameterMissingPolicy = "MissingIsEmpty"; + my $parameterMissingPolicy = "MissingIsUndefinedValue"; + if ($parameter->extendedAttributes->{"TreatUndefinedAs"} and $parameter->extendedAttributes->{"TreatUndefinedAs"} eq "NullString") { + $parameterMissingPolicy = "MissingIsNullValue"; } AddToImplIncludes("ExceptionCode.h"); @@ -3593,8 +3591,7 @@ sub RequiresCustomSignature return 0; } foreach my $parameter (@{$function->parameters}) { - my $optional = $parameter->extendedAttributes->{"Optional"}; - if (($optional && $optional ne "CallWithDefaultValue" && $optional ne "CallWithNullValue") || $parameter->extendedAttributes->{"Callback"}) { + if (($parameter->extendedAttributes->{"Optional"} && $parameter->extendedAttributes->{"Optional"} ne "TreatAsUndefined") || $parameter->extendedAttributes->{"Callback"}) { return 0; } } diff --git a/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.cpp b/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.cpp index d81871f..b98184d 100644 --- a/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.cpp +++ b/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.cpp @@ -943,6 +943,30 @@ void WebDOMTestObj::methodWithNonOptionalArgAndTwoOptionalArgs(int nonOpt, int o impl()->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt, opt1, opt2); } +void WebDOMTestObj::methodWithOptionalString(const WebDOMString& str) +{ + if (!impl()) + return; + + impl()->methodWithOptionalString(str); +} + +void WebDOMTestObj::methodWithOptionalIsTreatAsUndefinedString(const WebDOMString& str) +{ + if (!impl()) + return; + + impl()->methodWithOptionalIsTreatAsUndefinedString(str); +} + +void WebDOMTestObj::methodWithOptionalIsNullStringString(const WebDOMString& str) +{ + if (!impl()) + return; + + impl()->methodWithOptionalIsNullStringString(str); +} + #if ENABLE(Condition1) WebDOMString WebDOMTestObj::conditionalMethod1() diff --git a/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.h b/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.h index 6f9101d..a5b81dd 100644 --- a/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.h +++ b/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.h @@ -186,6 +186,9 @@ public: void methodWithOptionalArg(int opt); void methodWithNonOptionalArgAndOptionalArg(int nonOpt, int opt); void methodWithNonOptionalArgAndTwoOptionalArgs(int nonOpt, int opt1, int opt2); + void methodWithOptionalString(const WebDOMString& str); + void methodWithOptionalIsTreatAsUndefinedString(const WebDOMString& str); + void methodWithOptionalIsNullStringString(const WebDOMString& str); WebDOMString conditionalMethod1(); void conditionalMethod2(); void conditionalMethod3(); diff --git a/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp b/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp index 5f9f95f..8f2815b 100644 --- a/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp +++ b/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp @@ -334,6 +334,39 @@ webkit_dom_test_obj_method_with_non_optional_arg_and_two_optional_args(WebKitDOM item->methodWithNonOptionalArgAndTwoOptionalArgs(non_opt, opt1, opt2); } +void +webkit_dom_test_obj_method_with_optional_string(WebKitDOMTestObj* self, const gchar* str) +{ + g_return_if_fail(self); + WebCore::JSMainThreadNullState state; + WebCore::TestObj * item = WebKit::core(self); + g_return_if_fail(str); + WTF::String converted_str = WTF::String::fromUTF8(str); + item->methodWithOptionalString(converted_str); +} + +void +webkit_dom_test_obj_method_with_optional_is_treat_as_undefined_string(WebKitDOMTestObj* self, const gchar* str) +{ + g_return_if_fail(self); + WebCore::JSMainThreadNullState state; + WebCore::TestObj * item = WebKit::core(self); + g_return_if_fail(str); + WTF::String converted_str = WTF::String::fromUTF8(str); + item->methodWithOptionalIsTreatAsUndefinedString(converted_str); +} + +void +webkit_dom_test_obj_method_with_optional_is_null_string_string(WebKitDOMTestObj* self, const gchar* str) +{ + g_return_if_fail(self); + WebCore::JSMainThreadNullState state; + WebCore::TestObj * item = WebKit::core(self); + g_return_if_fail(str); + WTF::String converted_str = WTF::String::fromUTF8(str); + item->methodWithOptionalIsNullStringString(converted_str); +} + gchar* webkit_dom_test_obj_conditional_method1(WebKitDOMTestObj* self) { diff --git a/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h b/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h index f118dd8..7fe932c 100644 --- a/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h +++ b/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h @@ -262,6 +262,39 @@ WEBKIT_API void webkit_dom_test_obj_method_with_non_optional_arg_and_two_optional_args(WebKitDOMTestObj* self, glong non_opt, glong opt1, glong opt2); /** + * webkit_dom_test_obj_method_with_optional_string: + * @self: A #WebKitDOMTestObj + * @str: A #gchar + * + * Returns: + * +**/ +WEBKIT_API void +webkit_dom_test_obj_method_with_optional_string(WebKitDOMTestObj* self, const gchar* str); + +/** + * webkit_dom_test_obj_method_with_optional_is_treat_as_undefined_string: + * @self: A #WebKitDOMTestObj + * @str: A #gchar + * + * Returns: + * +**/ +WEBKIT_API void +webkit_dom_test_obj_method_with_optional_is_treat_as_undefined_string(WebKitDOMTestObj* self, const gchar* str); + +/** + * webkit_dom_test_obj_method_with_optional_is_null_string_string: + * @self: A #WebKitDOMTestObj + * @str: A #gchar + * + * Returns: + * +**/ +WEBKIT_API void +webkit_dom_test_obj_method_with_optional_is_null_string_string(WebKitDOMTestObj* self, const gchar* str); + +/** * webkit_dom_test_obj_conditional_method1: * @self: A #WebKitDOMTestObj * diff --git a/Source/WebCore/bindings/scripts/test/JS/JSFloat64Array.cpp b/Source/WebCore/bindings/scripts/test/JS/JSFloat64Array.cpp index e2aabcd..6aae275 100644 --- a/Source/WebCore/bindings/scripts/test/JS/JSFloat64Array.cpp +++ b/Source/WebCore/bindings/scripts/test/JS/JSFloat64Array.cpp @@ -235,7 +235,7 @@ EncodedJSValue JSC_HOST_CALL jsFloat64ArrayPrototypeFunctionFoo(ExecState* exec) Float64Array* impl = static_cast(castedThis->impl()); if (exec->argumentCount() < 1) return throwVMError(exec, createTypeError(exec, "Not enough arguments")); - Float32Array* array(toFloat32Array(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined))); + Float32Array* array(toFloat32Array(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefinedValue))); if (exec->hadException()) return JSValue::encode(jsUndefined()); diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp index f886cdd..1e3ea63 100644 --- a/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp +++ b/Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp @@ -186,7 +186,7 @@ EncodedJSValue JSC_HOST_CALL jsTestActiveDOMObjectPrototypeFunctionExcitingFunct TestActiveDOMObject* impl = static_cast(castedThis->impl()); if (exec->argumentCount() < 1) return throwVMError(exec, createTypeError(exec, "Not enough arguments")); - Node* nextChild(toNode(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined))); + Node* nextChild(toNode(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefinedValue))); if (exec->hadException()) return JSValue::encode(jsUndefined()); impl->excitingFunction(nextChild); @@ -203,7 +203,7 @@ EncodedJSValue JSC_HOST_CALL jsTestActiveDOMObjectPrototypeFunctionPostMessage(E TestActiveDOMObject* impl = static_cast(castedThis->impl()); if (exec->argumentCount() < 1) return throwVMError(exec, createTypeError(exec, "Not enough arguments")); - const String& message(ustringToString(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).isEmpty() ? UString() : MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).toString(exec)->value(exec))); + const String& message(ustringToString(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefinedValue).isEmpty() ? UString() : MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefinedValue).toString(exec)->value(exec))); if (exec->hadException()) return JSValue::encode(jsUndefined()); impl->postMessage(message); diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp index fdf0fa1..accb624 100644 --- a/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp +++ b/Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp @@ -176,7 +176,7 @@ EncodedJSValue JSC_HOST_CALL jsTestCustomNamedGetterPrototypeFunctionAnotherFunc TestCustomNamedGetter* impl = static_cast(castedThis->impl()); if (exec->argumentCount() < 1) return throwVMError(exec, createTypeError(exec, "Not enough arguments")); - const String& str(ustringToString(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).isEmpty() ? UString() : MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).toString(exec)->value(exec))); + const String& str(ustringToString(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefinedValue).isEmpty() ? UString() : MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefinedValue).toString(exec)->value(exec))); if (exec->hadException()) return JSValue::encode(jsUndefined()); impl->anotherFunction(str); diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp index 9a522f3..7409293 100644 --- a/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp +++ b/Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp @@ -231,7 +231,7 @@ EncodedJSValue JSC_HOST_CALL jsTestEventTargetPrototypeFunctionItem(ExecState* e TestEventTarget* impl = static_cast(castedThis->impl()); if (exec->argumentCount() < 1) return throwVMError(exec, createTypeError(exec, "Not enough arguments")); - int index(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).toUInt32(exec)); + int index(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefinedValue).toUInt32(exec)); if (index < 0) { setDOMException(exec, INDEX_SIZE_ERR); return JSValue::encode(jsUndefined()); @@ -288,7 +288,7 @@ EncodedJSValue JSC_HOST_CALL jsTestEventTargetPrototypeFunctionDispatchEvent(Exe if (exec->argumentCount() < 1) return throwVMError(exec, createTypeError(exec, "Not enough arguments")); ExceptionCode ec = 0; - Event* evt(toEvent(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined))); + Event* evt(toEvent(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefinedValue))); if (exec->hadException()) return JSValue::encode(jsUndefined()); diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp index 476d725..bac2f21 100644 --- a/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp +++ b/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp @@ -118,10 +118,10 @@ EncodedJSValue JSC_HOST_CALL JSTestInterfaceConstructor::constructJSTestInterfac if (exec->argumentCount() < 1) return throwVMError(exec, createTypeError(exec, "Not enough arguments")); ExceptionCode ec = 0; - const String& str1(ustringToString(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).isEmpty() ? UString() : MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).toString(exec)->value(exec))); + const String& str1(ustringToString(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefinedValue).isEmpty() ? UString() : MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefinedValue).toString(exec)->value(exec))); if (exec->hadException()) return JSValue::encode(jsUndefined()); - const String& str2(ustringToString(MAYBE_MISSING_PARAMETER(exec, 1, MissingIsUndefined).isEmpty() ? UString() : MAYBE_MISSING_PARAMETER(exec, 1, MissingIsUndefined).toString(exec)->value(exec))); + const String& str2(ustringToString(MAYBE_MISSING_PARAMETER(exec, 1, MissingIsUndefinedValue).isEmpty() ? UString() : MAYBE_MISSING_PARAMETER(exec, 1, MissingIsUndefinedValue).toString(exec)->value(exec))); if (exec->hadException()) return JSValue::encode(jsUndefined()); ScriptExecutionContext* context = jsConstructor->scriptExecutionContext(); @@ -323,10 +323,10 @@ EncodedJSValue JSC_HOST_CALL jsTestInterfacePrototypeFunctionSupplementalMethod2 ScriptExecutionContext* scriptContext = static_cast(exec->lexicalGlobalObject())->scriptExecutionContext(); if (!scriptContext) return JSValue::encode(jsUndefined()); - const String& strArg(ustringToString(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).isEmpty() ? UString() : MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).toString(exec)->value(exec))); + const String& strArg(ustringToString(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefinedValue).isEmpty() ? UString() : MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefinedValue).toString(exec)->value(exec))); if (exec->hadException()) return JSValue::encode(jsUndefined()); - TestObj* objArg(toTestObj(MAYBE_MISSING_PARAMETER(exec, 1, MissingIsUndefined))); + TestObj* objArg(toTestObj(MAYBE_MISSING_PARAMETER(exec, 1, MissingIsUndefinedValue))); if (exec->hadException()) return JSValue::encode(jsUndefined()); diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp index 1a7821f..761ec56 100644 --- a/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp +++ b/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp @@ -166,7 +166,7 @@ EncodedJSValue JSC_HOST_CALL jsTestMediaQueryListListenerPrototypeFunctionMethod TestMediaQueryListListener* impl = static_cast(castedThis->impl()); if (exec->argumentCount() < 1) return throwVMError(exec, createTypeError(exec, "Not enough arguments")); - RefPtr listener(MediaQueryListListener::create(ScriptValue(exec->globalData(), MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined)))); + RefPtr listener(MediaQueryListListener::create(ScriptValue(exec->globalData(), MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefinedValue)))); if (exec->hadException()) return JSValue::encode(jsUndefined()); impl->method(listener); diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp index 147f2c1..e75a8e2 100644 --- a/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp +++ b/Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp @@ -97,13 +97,13 @@ EncodedJSValue JSC_HOST_CALL JSTestNamedConstructorNamedConstructor::constructJS if (exec->argumentCount() < 1) return throwVMError(exec, createTypeError(exec, "Not enough arguments")); ExceptionCode ec = 0; - const String& str1(ustringToString(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).isEmpty() ? UString() : MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).toString(exec)->value(exec))); + const String& str1(ustringToString(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefinedValue).isEmpty() ? UString() : MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefinedValue).toString(exec)->value(exec))); if (exec->hadException()) return JSValue::encode(jsUndefined()); - const String& str2(ustringToString(MAYBE_MISSING_PARAMETER(exec, 1, MissingIsUndefined).isEmpty() ? UString() : MAYBE_MISSING_PARAMETER(exec, 1, MissingIsUndefined).toString(exec)->value(exec))); + const String& str2(ustringToString(MAYBE_MISSING_PARAMETER(exec, 1, MissingIsUndefinedValue).isEmpty() ? UString() : MAYBE_MISSING_PARAMETER(exec, 1, MissingIsUndefinedValue).toString(exec)->value(exec))); if (exec->hadException()) return JSValue::encode(jsUndefined()); - const String& str3(ustringToString(MAYBE_MISSING_PARAMETER(exec, 2, MissingIsEmpty).isEmpty() ? UString() : MAYBE_MISSING_PARAMETER(exec, 2, MissingIsEmpty).toString(exec)->value(exec))); + const String& str3(ustringToString(MAYBE_MISSING_PARAMETER(exec, 2, MissingIsUndefinedValue).isEmpty() ? UString() : MAYBE_MISSING_PARAMETER(exec, 2, MissingIsUndefinedValue).toString(exec)->value(exec))); if (exec->hadException()) return JSValue::encode(jsUndefined()); RefPtr object = TestNamedConstructor::createForJSConstructor(jsConstructor->document(), str1, str2, str3, ec); diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp index 98e79b3..3b81f26 100644 --- a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp +++ b/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp @@ -269,6 +269,9 @@ static const HashTableValue JSTestObjPrototypeTableValues[] = { "methodWithOptionalArg", DontDelete | JSC::Function, (intptr_t)static_cast(jsTestObjPrototypeFunctionMethodWithOptionalArg), (intptr_t)1, NoIntrinsic }, { "methodWithNonOptionalArgAndOptionalArg", DontDelete | JSC::Function, (intptr_t)static_cast(jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg), (intptr_t)2, NoIntrinsic }, { "methodWithNonOptionalArgAndTwoOptionalArgs", DontDelete | JSC::Function, (intptr_t)static_cast(jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs), (intptr_t)3, NoIntrinsic }, + { "methodWithOptionalString", DontDelete | JSC::Function, (intptr_t)static_cast(jsTestObjPrototypeFunctionMethodWithOptionalString), (intptr_t)1, NoIntrinsic }, + { "methodWithOptionalIsTreatAsUndefinedString", DontDelete | JSC::Function, (intptr_t)static_cast(jsTestObjPrototypeFunctionMethodWithOptionalIsTreatAsUndefinedString), (intptr_t)1, NoIntrinsic }, + { "methodWithOptionalIsNullStringString", DontDelete | JSC::Function, (intptr_t)static_cast(jsTestObjPrototypeFunctionMethodWithOptionalIsNullStringString), (intptr_t)1, NoIntrinsic }, { "methodWithCallbackArg", DontDelete | JSC::Function, (intptr_t)static_cast(jsTestObjPrototypeFunctionMethodWithCallbackArg), (intptr_t)1, NoIntrinsic }, { "methodWithNonCallbackArgAndCallbackArg", DontDelete | JSC::Function, (intptr_t)static_cast(jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg), (intptr_t)2, NoIntrinsic }, { "methodWithCallbackAndOptionalArg", DontDelete | JSC::Function, (intptr_t)static_cast(jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArg), (intptr_t)1, NoIntrinsic }, @@ -295,7 +298,7 @@ static const HashTableValue JSTestObjPrototypeTableValues[] = { 0, 0, 0, 0, NoIntrinsic } }; -static const HashTable JSTestObjPrototypeTable = { 138, 127, JSTestObjPrototypeTableValues, 0 }; +static const HashTable JSTestObjPrototypeTable = { 265, 255, JSTestObjPrototypeTableValues, 0 }; const ClassInfo JSTestObjPrototype::s_info = { "TestObjPrototype", &Base::s_info, &JSTestObjPrototypeTable, 0, CREATE_METHOD_TABLE(JSTestObjPrototype) }; JSObject* JSTestObjPrototype::self(ExecState* exec, JSGlobalObject* globalObject) @@ -1187,13 +1190,13 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionVoidMethodWithArgs(ExecSt TestObj* impl = static_cast(castedThis->impl()); if (exec->argumentCount() < 3) return throwVMError(exec, createTypeError(exec, "Not enough arguments")); - int intArg(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).toInt32(exec)); + int intArg(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefinedValue).toInt32(exec)); if (exec->hadException()) return JSValue::encode(jsUndefined()); - const String& strArg(ustringToString(MAYBE_MISSING_PARAMETER(exec, 1, MissingIsUndefined).isEmpty() ? UString() : MAYBE_MISSING_PARAMETER(exec, 1, MissingIsUndefined).toString(exec)->value(exec))); + const String& strArg(ustringToString(MAYBE_MISSING_PARAMETER(exec, 1, MissingIsUndefinedValue).isEmpty() ? UString() : MAYBE_MISSING_PARAMETER(exec, 1, MissingIsUndefinedValue).toString(exec)->value(exec))); if (exec->hadException()) return JSValue::encode(jsUndefined()); - TestObj* objArg(toTestObj(MAYBE_MISSING_PARAMETER(exec, 2, MissingIsUndefined))); + TestObj* objArg(toTestObj(MAYBE_MISSING_PARAMETER(exec, 2, MissingIsUndefinedValue))); if (exec->hadException()) return JSValue::encode(jsUndefined()); impl->voidMethodWithArgs(intArg, strArg, objArg); @@ -1223,13 +1226,13 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionIntMethodWithArgs(ExecSta TestObj* impl = static_cast(castedThis->impl()); if (exec->argumentCount() < 3) return throwVMError(exec, createTypeError(exec, "Not enough arguments")); - int intArg(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).toInt32(exec)); + int intArg(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefinedValue).toInt32(exec)); if (exec->hadException()) return JSValue::encode(jsUndefined()); - const String& strArg(ustringToString(MAYBE_MISSING_PARAMETER(exec, 1, MissingIsUndefined).isEmpty() ? UString() : MAYBE_MISSING_PARAMETER(exec, 1, MissingIsUndefined).toString(exec)->value(exec))); + const String& strArg(ustringToString(MAYBE_MISSING_PARAMETER(exec, 1, MissingIsUndefinedValue).isEmpty() ? UString() : MAYBE_MISSING_PARAMETER(exec, 1, MissingIsUndefinedValue).toString(exec)->value(exec))); if (exec->hadException()) return JSValue::encode(jsUndefined()); - TestObj* objArg(toTestObj(MAYBE_MISSING_PARAMETER(exec, 2, MissingIsUndefined))); + TestObj* objArg(toTestObj(MAYBE_MISSING_PARAMETER(exec, 2, MissingIsUndefinedValue))); if (exec->hadException()) return JSValue::encode(jsUndefined()); @@ -1260,13 +1263,13 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionObjMethodWithArgs(ExecSta TestObj* impl = static_cast(castedThis->impl()); if (exec->argumentCount() < 3) return throwVMError(exec, createTypeError(exec, "Not enough arguments")); - int intArg(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).toInt32(exec)); + int intArg(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefinedValue).toInt32(exec)); if (exec->hadException()) return JSValue::encode(jsUndefined()); - const String& strArg(ustringToString(MAYBE_MISSING_PARAMETER(exec, 1, MissingIsUndefined).isEmpty() ? UString() : MAYBE_MISSING_PARAMETER(exec, 1, MissingIsUndefined).toString(exec)->value(exec))); + const String& strArg(ustringToString(MAYBE_MISSING_PARAMETER(exec, 1, MissingIsUndefinedValue).isEmpty() ? UString() : MAYBE_MISSING_PARAMETER(exec, 1, MissingIsUndefinedValue).toString(exec)->value(exec))); if (exec->hadException()) return JSValue::encode(jsUndefined()); - TestObj* objArg(toTestObj(MAYBE_MISSING_PARAMETER(exec, 2, MissingIsUndefined))); + TestObj* objArg(toTestObj(MAYBE_MISSING_PARAMETER(exec, 2, MissingIsUndefinedValue))); if (exec->hadException()) return JSValue::encode(jsUndefined()); @@ -1285,10 +1288,10 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodThatRequiresAllArgs if (exec->argumentCount() < 2) return throwVMError(exec, createTypeError(exec, "Not enough arguments")); ExceptionCode ec = 0; - const String& strArg(ustringToString(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).isEmpty() ? UString() : MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).toString(exec)->value(exec))); + const String& strArg(ustringToString(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefinedValue).isEmpty() ? UString() : MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefinedValue).toString(exec)->value(exec))); if (exec->hadException()) return JSValue::encode(jsUndefined()); - TestObj* objArg(toTestObj(MAYBE_MISSING_PARAMETER(exec, 1, MissingIsUndefined))); + TestObj* objArg(toTestObj(MAYBE_MISSING_PARAMETER(exec, 1, MissingIsUndefinedValue))); if (exec->hadException()) return JSValue::encode(jsUndefined()); @@ -1307,7 +1310,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionSerializedValue(ExecState TestObj* impl = static_cast(castedThis->impl()); if (exec->argumentCount() < 1) return throwVMError(exec, createTypeError(exec, "Not enough arguments")); - RefPtr serializedArg(SerializedScriptValue::create(exec, MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined))); + RefPtr serializedArg(SerializedScriptValue::create(exec, MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefinedValue))); if (exec->hadException()) return JSValue::encode(jsUndefined()); impl->serializedValue(serializedArg); @@ -1324,7 +1327,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionIdbKey(ExecState* exec) TestObj* impl = static_cast(castedThis->impl()); if (exec->argumentCount() < 1) return throwVMError(exec, createTypeError(exec, "Not enough arguments")); - RefPtr key(createIDBKeyFromValue(exec, MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined))); + RefPtr key(createIDBKeyFromValue(exec, MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefinedValue))); if (exec->hadException()) return JSValue::encode(jsUndefined()); impl->idbKey(key); @@ -1341,7 +1344,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOptionsObject(ExecState* TestObj* impl = static_cast(castedThis->impl()); if (exec->argumentCount() < 1) return throwVMError(exec, createTypeError(exec, "Not enough arguments")); - OptionsObject* oo(toOptionsObject(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined))); + OptionsObject* oo(toOptionsObject(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefinedValue))); if (exec->hadException()) return JSValue::encode(jsUndefined()); @@ -1351,7 +1354,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOptionsObject(ExecState* return JSValue::encode(jsUndefined()); } - OptionsObject* ooo(toOptionsObject(MAYBE_MISSING_PARAMETER(exec, 1, MissingIsUndefined))); + OptionsObject* ooo(toOptionsObject(MAYBE_MISSING_PARAMETER(exec, 1, MissingIsUndefinedValue))); if (exec->hadException()) return JSValue::encode(jsUndefined()); impl->optionsObject(oo, ooo); @@ -1405,7 +1408,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionCustomArgsAndException(Ex ExceptionCode ec = 0; RefPtr scriptArguments(createScriptArguments(exec, 1)); RefPtr callStack(createScriptCallStackForInspector(exec)); - log* intArg(tolog(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined))); + log* intArg(tolog(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefinedValue))); if (exec->hadException()) return JSValue::encode(jsUndefined()); impl->customArgsAndException(intArg, scriptArguments, callStack, ec); @@ -1535,7 +1538,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalArg(Exe return JSValue::encode(jsUndefined()); } - int opt(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).toInt32(exec)); + int opt(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefinedValue).toInt32(exec)); if (exec->hadException()) return JSValue::encode(jsUndefined()); impl->methodWithOptionalArg(opt); @@ -1552,7 +1555,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNonOptionalArgA TestObj* impl = static_cast(castedThis->impl()); if (exec->argumentCount() < 1) return throwVMError(exec, createTypeError(exec, "Not enough arguments")); - int nonOpt(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).toInt32(exec)); + int nonOpt(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefinedValue).toInt32(exec)); if (exec->hadException()) return JSValue::encode(jsUndefined()); @@ -1562,7 +1565,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNonOptionalArgA return JSValue::encode(jsUndefined()); } - int opt(MAYBE_MISSING_PARAMETER(exec, 1, MissingIsUndefined).toInt32(exec)); + int opt(MAYBE_MISSING_PARAMETER(exec, 1, MissingIsUndefinedValue).toInt32(exec)); if (exec->hadException()) return JSValue::encode(jsUndefined()); impl->methodWithNonOptionalArgAndOptionalArg(nonOpt, opt); @@ -1579,7 +1582,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNonOptionalArgA TestObj* impl = static_cast(castedThis->impl()); if (exec->argumentCount() < 1) return throwVMError(exec, createTypeError(exec, "Not enough arguments")); - int nonOpt(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).toInt32(exec)); + int nonOpt(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefinedValue).toInt32(exec)); if (exec->hadException()) return JSValue::encode(jsUndefined()); @@ -1589,7 +1592,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNonOptionalArgA return JSValue::encode(jsUndefined()); } - int opt1(MAYBE_MISSING_PARAMETER(exec, 1, MissingIsUndefined).toInt32(exec)); + int opt1(MAYBE_MISSING_PARAMETER(exec, 1, MissingIsUndefinedValue).toInt32(exec)); if (exec->hadException()) return JSValue::encode(jsUndefined()); if (argsCount <= 2) { @@ -1597,13 +1600,65 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNonOptionalArgA return JSValue::encode(jsUndefined()); } - int opt2(MAYBE_MISSING_PARAMETER(exec, 2, MissingIsUndefined).toInt32(exec)); + int opt2(MAYBE_MISSING_PARAMETER(exec, 2, MissingIsUndefinedValue).toInt32(exec)); if (exec->hadException()) return JSValue::encode(jsUndefined()); impl->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt, opt1, opt2); return JSValue::encode(jsUndefined()); } +EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalString(ExecState* exec) +{ + JSValue thisValue = exec->hostThisValue(); + if (!thisValue.inherits(&JSTestObj::s_info)) + return throwVMTypeError(exec); + JSTestObj* castedThis = static_cast(asObject(thisValue)); + ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info); + TestObj* impl = static_cast(castedThis->impl()); + + size_t argsCount = exec->argumentCount(); + if (argsCount <= 0) { + impl->methodWithOptionalString(); + return JSValue::encode(jsUndefined()); + } + + const String& str(ustringToString(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefinedValue).isEmpty() ? UString() : MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefinedValue).toString(exec)->value(exec))); + if (exec->hadException()) + return JSValue::encode(jsUndefined()); + impl->methodWithOptionalString(str); + return JSValue::encode(jsUndefined()); +} + +EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalIsTreatAsUndefinedString(ExecState* exec) +{ + JSValue thisValue = exec->hostThisValue(); + if (!thisValue.inherits(&JSTestObj::s_info)) + return throwVMTypeError(exec); + JSTestObj* castedThis = static_cast(asObject(thisValue)); + ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info); + TestObj* impl = static_cast(castedThis->impl()); + const String& str(ustringToString(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefinedValue).isEmpty() ? UString() : MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefinedValue).toString(exec)->value(exec))); + if (exec->hadException()) + return JSValue::encode(jsUndefined()); + impl->methodWithOptionalIsTreatAsUndefinedString(str); + return JSValue::encode(jsUndefined()); +} + +EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalIsNullStringString(ExecState* exec) +{ + JSValue thisValue = exec->hostThisValue(); + if (!thisValue.inherits(&JSTestObj::s_info)) + return throwVMTypeError(exec); + JSTestObj* castedThis = static_cast(asObject(thisValue)); + ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info); + TestObj* impl = static_cast(castedThis->impl()); + const String& str(ustringToString(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefinedValue).isEmpty() ? UString() : MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefinedValue).toString(exec)->value(exec))); + if (exec->hadException()) + return JSValue::encode(jsUndefined()); + impl->methodWithOptionalIsNullStringString(str); + return JSValue::encode(jsUndefined()); +} + EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithCallbackArg(ExecState* exec) { JSValue thisValue = exec->hostThisValue(); @@ -1633,7 +1688,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNonCallbackArgA TestObj* impl = static_cast(castedThis->impl()); if (exec->argumentCount() < 2) return throwVMError(exec, createTypeError(exec, "Not enough arguments")); - int nonCallback(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).toInt32(exec)); + int nonCallback(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefinedValue).toInt32(exec)); if (exec->hadException()) return JSValue::encode(jsUndefined()); if (exec->argumentCount() <= 1 || !exec->argument(1).isObject()) { @@ -1721,10 +1776,10 @@ static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod1( TestObj* impl = static_cast(castedThis->impl()); if (exec->argumentCount() < 2) return throwVMError(exec, createTypeError(exec, "Not enough arguments")); - TestObj* objArg(toTestObj(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined))); + TestObj* objArg(toTestObj(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefinedValue))); if (exec->hadException()) return JSValue::encode(jsUndefined()); - const String& strArg(ustringToString(MAYBE_MISSING_PARAMETER(exec, 1, MissingIsUndefined).isEmpty() ? UString() : MAYBE_MISSING_PARAMETER(exec, 1, MissingIsUndefined).toString(exec)->value(exec))); + const String& strArg(ustringToString(MAYBE_MISSING_PARAMETER(exec, 1, MissingIsUndefinedValue).isEmpty() ? UString() : MAYBE_MISSING_PARAMETER(exec, 1, MissingIsUndefinedValue).toString(exec)->value(exec))); if (exec->hadException()) return JSValue::encode(jsUndefined()); impl->overloadedMethod(objArg, strArg); @@ -1741,7 +1796,7 @@ static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod2( TestObj* impl = static_cast(castedThis->impl()); if (exec->argumentCount() < 1) return throwVMError(exec, createTypeError(exec, "Not enough arguments")); - TestObj* objArg(toTestObj(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined))); + TestObj* objArg(toTestObj(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefinedValue))); if (exec->hadException()) return JSValue::encode(jsUndefined()); @@ -1751,7 +1806,7 @@ static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod2( return JSValue::encode(jsUndefined()); } - int intArg(MAYBE_MISSING_PARAMETER(exec, 1, MissingIsUndefined).toInt32(exec)); + int intArg(MAYBE_MISSING_PARAMETER(exec, 1, MissingIsUndefinedValue).toInt32(exec)); if (exec->hadException()) return JSValue::encode(jsUndefined()); impl->overloadedMethod(objArg, intArg); @@ -1768,7 +1823,7 @@ static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod3( TestObj* impl = static_cast(castedThis->impl()); if (exec->argumentCount() < 1) return throwVMError(exec, createTypeError(exec, "Not enough arguments")); - const String& strArg(ustringToString(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).isEmpty() ? UString() : MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).toString(exec)->value(exec))); + const String& strArg(ustringToString(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefinedValue).isEmpty() ? UString() : MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefinedValue).toString(exec)->value(exec))); if (exec->hadException()) return JSValue::encode(jsUndefined()); impl->overloadedMethod(strArg); @@ -1785,7 +1840,7 @@ static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod4( TestObj* impl = static_cast(castedThis->impl()); if (exec->argumentCount() < 1) return throwVMError(exec, createTypeError(exec, "Not enough arguments")); - int intArg(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).toInt32(exec)); + int intArg(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefinedValue).toInt32(exec)); if (exec->hadException()) return JSValue::encode(jsUndefined()); impl->overloadedMethod(intArg); @@ -1821,7 +1876,7 @@ static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod6( TestObj* impl = static_cast(castedThis->impl()); if (exec->argumentCount() < 1) return throwVMError(exec, createTypeError(exec, "Not enough arguments")); - DOMStringList* listArg(toDOMStringList(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined))); + DOMStringList* listArg(toDOMStringList(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefinedValue))); if (exec->hadException()) return JSValue::encode(jsUndefined()); impl->overloadedMethod(listArg); @@ -1838,7 +1893,7 @@ static EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOverloadedMethod7( TestObj* impl = static_cast(castedThis->impl()); if (exec->argumentCount() < 1) return throwVMError(exec, createTypeError(exec, "Not enough arguments")); - DOMStringList* arrayArg(toDOMStringList(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined))); + DOMStringList* arrayArg(toDOMStringList(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefinedValue))); if (exec->hadException()) return JSValue::encode(jsUndefined()); impl->overloadedMethod(arrayArg); @@ -1883,7 +1938,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjConstructorFunctionClassMethodWithOptional return JSValue::encode(result); } - int arg(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).toInt32(exec)); + int arg(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefinedValue).toInt32(exec)); if (exec->hadException()) return JSValue::encode(jsUndefined()); @@ -1896,7 +1951,7 @@ static EncodedJSValue JSC_HOST_CALL jsTestObjConstructorFunctionOverloadedMethod { if (exec->argumentCount() < 1) return throwVMError(exec, createTypeError(exec, "Not enough arguments")); - int arg(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).toInt32(exec)); + int arg(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefinedValue).toInt32(exec)); if (exec->hadException()) return JSValue::encode(jsUndefined()); TestObj::overloadedMethod1(arg); @@ -1910,7 +1965,7 @@ static EncodedJSValue JSC_HOST_CALL jsTestObjConstructorFunctionOverloadedMethod { if (exec->argumentCount() < 1) return throwVMError(exec, createTypeError(exec, "Not enough arguments")); - const String& type(ustringToString(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).isEmpty() ? UString() : MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).toString(exec)->value(exec))); + const String& type(ustringToString(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefinedValue).isEmpty() ? UString() : MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefinedValue).toString(exec)->value(exec))); if (exec->hadException()) return JSValue::encode(jsUndefined()); TestObj::overloadedMethod1(type); @@ -1957,7 +2012,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConvert1(ExecState* exec) TestObj* impl = static_cast(castedThis->impl()); if (exec->argumentCount() < 1) return throwVMError(exec, createTypeError(exec, "Not enough arguments")); - a* (toa(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined))); + a* (toa(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefinedValue))); if (exec->hadException()) return JSValue::encode(jsUndefined()); impl->convert1(); @@ -1974,7 +2029,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConvert2(ExecState* exec) TestObj* impl = static_cast(castedThis->impl()); if (exec->argumentCount() < 1) return throwVMError(exec, createTypeError(exec, "Not enough arguments")); - b* (tob(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined))); + b* (tob(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefinedValue))); if (exec->hadException()) return JSValue::encode(jsUndefined()); impl->convert2(); @@ -1991,7 +2046,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConvert3(ExecState* exec) TestObj* impl = static_cast(castedThis->impl()); if (exec->argumentCount() < 1) return throwVMError(exec, createTypeError(exec, "Not enough arguments")); - c* (toc(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined))); + c* (toc(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefinedValue))); if (exec->hadException()) return JSValue::encode(jsUndefined()); impl->convert3(); @@ -2008,7 +2063,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConvert4(ExecState* exec) TestObj* impl = static_cast(castedThis->impl()); if (exec->argumentCount() < 1) return throwVMError(exec, createTypeError(exec, "Not enough arguments")); - d* (tod(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined))); + d* (tod(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefinedValue))); if (exec->hadException()) return JSValue::encode(jsUndefined()); impl->convert4(); @@ -2025,7 +2080,7 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConvert5(ExecState* exec) TestObj* impl = static_cast(castedThis->impl()); if (exec->argumentCount() < 1) return throwVMError(exec, createTypeError(exec, "Not enough arguments")); - e* (toe(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined))); + e* (toe(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefinedValue))); if (exec->hadException()) return JSValue::encode(jsUndefined()); impl->convert5(); @@ -2081,15 +2136,15 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionStrictFunction(ExecState* if (exec->argumentCount() < 3) return throwVMError(exec, createTypeError(exec, "Not enough arguments")); ExceptionCode ec = 0; - const String& str(ustringToString(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).isEmpty() ? UString() : MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).toString(exec)->value(exec))); + const String& str(ustringToString(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefinedValue).isEmpty() ? UString() : MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefinedValue).toString(exec)->value(exec))); if (exec->hadException()) return JSValue::encode(jsUndefined()); - float a(MAYBE_MISSING_PARAMETER(exec, 1, MissingIsUndefined).toFloat(exec)); + float a(MAYBE_MISSING_PARAMETER(exec, 1, MissingIsUndefinedValue).toFloat(exec)); if (exec->hadException()) return JSValue::encode(jsUndefined()); if (exec->argumentCount() > 2 && !exec->argument(2).isUndefinedOrNull() && !exec->argument(2).inherits(&JSint::s_info)) return throwVMTypeError(exec); - int* b(toint(MAYBE_MISSING_PARAMETER(exec, 2, MissingIsUndefined))); + int* b(toint(MAYBE_MISSING_PARAMETER(exec, 2, MissingIsUndefinedValue))); if (exec->hadException()) return JSValue::encode(jsUndefined()); diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h b/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h index 89cc932..5478b5b 100644 --- a/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h +++ b/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h @@ -174,6 +174,9 @@ JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionWithScriptExecutionC JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalArg(JSC::ExecState*); JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg(JSC::ExecState*); JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs(JSC::ExecState*); +JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalString(JSC::ExecState*); +JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalIsTreatAsUndefinedString(JSC::ExecState*); +JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalIsNullStringString(JSC::ExecState*); JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithCallbackArg(JSC::ExecState*); JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg(JSC::ExecState*); JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArg(JSC::ExecState*); diff --git a/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp b/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp index 02deeda..1fdb862 100644 --- a/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp +++ b/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp @@ -90,10 +90,10 @@ EncodedJSValue JSC_HOST_CALL JSTestSerializedScriptValueInterfaceConstructor::co JSTestSerializedScriptValueInterfaceConstructor* jsConstructor = static_cast(exec->callee()); if (exec->argumentCount() < 2) return throwVMError(exec, createTypeError(exec, "Not enough arguments")); - const String& hello(ustringToString(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).isEmpty() ? UString() : MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined).toString(exec)->value(exec))); + const String& hello(ustringToString(MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefinedValue).isEmpty() ? UString() : MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefinedValue).toString(exec)->value(exec))); if (exec->hadException()) return JSValue::encode(jsUndefined()); - RefPtr value(SerializedScriptValue::create(exec, MAYBE_MISSING_PARAMETER(exec, 1, MissingIsUndefined))); + RefPtr value(SerializedScriptValue::create(exec, MAYBE_MISSING_PARAMETER(exec, 1, MissingIsUndefinedValue))); if (exec->hadException()) return JSValue::encode(jsUndefined()); RefPtr object = TestSerializedScriptValueInterface::create(hello, value); diff --git a/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h b/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h index 5474556..badca42 100644 --- a/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h +++ b/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h @@ -183,6 +183,9 @@ enum { - (void)methodWithOptionalArg:(int)opt; - (void)methodWithNonOptionalArgAndOptionalArg:(int)nonOpt opt:(int)opt; - (void)methodWithNonOptionalArgAndTwoOptionalArgs:(int)nonOpt opt1:(int)opt1 opt2:(int)opt2; +- (void)methodWithOptionalString:(NSString *)str; +- (void)methodWithOptionalIsTreatAsUndefinedString:(NSString *)str; +- (void)methodWithOptionalIsNullStringString:(NSString *)str; - (NSString *)conditionalMethod1; - (void)conditionalMethod2; - (void)conditionalMethod3; diff --git a/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm b/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm index b4ff638..a67beeb 100644 --- a/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm +++ b/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm @@ -800,6 +800,24 @@ IMPL->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt, opt1, opt2); } +- (void)methodWithOptionalString:(NSString *)str +{ + WebCore::JSMainThreadNullState state; + IMPL->methodWithOptionalString(str); +} + +- (void)methodWithOptionalIsTreatAsUndefinedString:(NSString *)str +{ + WebCore::JSMainThreadNullState state; + IMPL->methodWithOptionalIsTreatAsUndefinedString(str); +} + +- (void)methodWithOptionalIsNullStringString:(NSString *)str +{ + WebCore::JSMainThreadNullState state; + IMPL->methodWithOptionalIsNullStringString(str); +} + #if ENABLE(Condition1) - (NSString *)conditionalMethod1 diff --git a/Source/WebCore/bindings/scripts/test/TestInterface.idl b/Source/WebCore/bindings/scripts/test/TestInterface.idl index b043061..4b2d444 100644 --- a/Source/WebCore/bindings/scripts/test/TestInterface.idl +++ b/Source/WebCore/bindings/scripts/test/TestInterface.idl @@ -34,7 +34,7 @@ module test { CustomNamedSetter, Conditional=Condition1|Condition2, CallWith=ScriptExecutionContext, - Constructor(in DOMString str1, in [Optional=CallWithDefaultValue] DOMString str2), + Constructor(in DOMString str1, in [Optional=TreatAsUndefined] DOMString str2), ConstructorRaisesException ] TestInterface { }; diff --git a/Source/WebCore/bindings/scripts/test/TestNamedConstructor.idl b/Source/WebCore/bindings/scripts/test/TestNamedConstructor.idl index fa8d3b3..2839f92 100644 --- a/Source/WebCore/bindings/scripts/test/TestNamedConstructor.idl +++ b/Source/WebCore/bindings/scripts/test/TestNamedConstructor.idl @@ -31,7 +31,7 @@ module test { interface [ ActiveDOMObject, - NamedConstructor=Audio(in DOMString str1, in [Optional=CallWithDefaultValue] DOMString str2, in [Optional=CallWithNullValue] DOMString str3), + NamedConstructor=Audio(in DOMString str1, in [Optional=TreatAsUndefined] DOMString str2, in [Optional=TreatAsUndefined, TreatUndefinedAs=NullString] DOMString str3), ConstructorRaisesException ] TestNamedConstructor { }; diff --git a/Source/WebCore/bindings/scripts/test/TestObj.idl b/Source/WebCore/bindings/scripts/test/TestObj.idl index 94e89e1..2b919a2 100644 --- a/Source/WebCore/bindings/scripts/test/TestObj.idl +++ b/Source/WebCore/bindings/scripts/test/TestObj.idl @@ -118,6 +118,9 @@ module test { void methodWithOptionalArg(in [Optional] long opt); void methodWithNonOptionalArgAndOptionalArg(in long nonOpt, in [Optional] long opt); void methodWithNonOptionalArgAndTwoOptionalArgs(in long nonOpt, in [Optional] long opt1, in [Optional] long opt2); + void methodWithOptionalString(in [Optional] DOMString str); + void methodWithOptionalIsTreatAsUndefinedString(in [Optional=TreatAsUndefined] DOMString str); + void methodWithOptionalIsNullStringString(in [Optional=TreatAsUndefined, TreatUndefinedAs=NullString] DOMString str); #if defined(TESTING_V8) || defined(TESTING_JS) // 'Callback' extended attribute diff --git a/Source/WebCore/bindings/scripts/test/V8/V8Float64Array.cpp b/Source/WebCore/bindings/scripts/test/V8/V8Float64Array.cpp index 26070b3..56367e0 100644 --- a/Source/WebCore/bindings/scripts/test/V8/V8Float64Array.cpp +++ b/Source/WebCore/bindings/scripts/test/V8/V8Float64Array.cpp @@ -54,7 +54,7 @@ static v8::Handle fooCallback(const v8::Arguments& args) if (args.Length() < 1) return throwError("Not enough arguments", V8Proxy::TypeError); Float64Array* imp = V8Float64Array::toNative(args.Holder()); - EXCEPTION_BLOCK(Float32Array*, array, V8Float32Array::HasInstance(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined)) ? V8Float32Array::toNative(v8::Handle::Cast(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined))) : 0); + EXCEPTION_BLOCK(Float32Array*, array, V8Float32Array::HasInstance(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue)) ? V8Float32Array::toNative(v8::Handle::Cast(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue))) : 0); return toV8(imp->foo(array)); } diff --git a/Source/WebCore/bindings/scripts/test/V8/V8TestActiveDOMObject.cpp b/Source/WebCore/bindings/scripts/test/V8/V8TestActiveDOMObject.cpp index 6658287..cef804a 100644 --- a/Source/WebCore/bindings/scripts/test/V8/V8TestActiveDOMObject.cpp +++ b/Source/WebCore/bindings/scripts/test/V8/V8TestActiveDOMObject.cpp @@ -55,7 +55,7 @@ static v8::Handle excitingFunctionCallback(const v8::Arguments& args) TestActiveDOMObject* imp = V8TestActiveDOMObject::toNative(args.Holder()); if (!V8BindingSecurity::canAccessFrame(V8BindingState::Only(), imp->frame(), true)) return v8::Handle(); - EXCEPTION_BLOCK(Node*, nextChild, V8Node::HasInstance(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined)) ? V8Node::toNative(v8::Handle::Cast(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined))) : 0); + EXCEPTION_BLOCK(Node*, nextChild, V8Node::HasInstance(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue)) ? V8Node::toNative(v8::Handle::Cast(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue))) : 0); imp->excitingFunction(nextChild); return v8::Handle(); } @@ -66,7 +66,7 @@ static v8::Handle postMessageCallback(const v8::Arguments& args) if (args.Length() < 1) return throwError("Not enough arguments", V8Proxy::TypeError); TestActiveDOMObject* imp = V8TestActiveDOMObject::toNative(args.Holder()); - STRING_TO_V8PARAMETER_EXCEPTION_BLOCK(V8Parameter<>, message, MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined)); + STRING_TO_V8PARAMETER_EXCEPTION_BLOCK(V8Parameter<>, message, MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue)); imp->postMessage(message); return v8::Handle(); } diff --git a/Source/WebCore/bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp b/Source/WebCore/bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp index bf1bc4a..9a7d58e 100644 --- a/Source/WebCore/bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp +++ b/Source/WebCore/bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp @@ -45,7 +45,7 @@ static v8::Handle anotherFunctionCallback(const v8::Arguments& args) if (args.Length() < 1) return throwError("Not enough arguments", V8Proxy::TypeError); TestCustomNamedGetter* imp = V8TestCustomNamedGetter::toNative(args.Holder()); - STRING_TO_V8PARAMETER_EXCEPTION_BLOCK(V8Parameter<>, str, MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined)); + STRING_TO_V8PARAMETER_EXCEPTION_BLOCK(V8Parameter<>, str, MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue)); imp->anotherFunction(str); return v8::Handle(); } diff --git a/Source/WebCore/bindings/scripts/test/V8/V8TestEventTarget.cpp b/Source/WebCore/bindings/scripts/test/V8/V8TestEventTarget.cpp index 00e0f34..c6cb53f 100644 --- a/Source/WebCore/bindings/scripts/test/V8/V8TestEventTarget.cpp +++ b/Source/WebCore/bindings/scripts/test/V8/V8TestEventTarget.cpp @@ -50,7 +50,7 @@ static v8::Handle itemCallback(const v8::Arguments& args) TestEventTarget* imp = V8TestEventTarget::toNative(args.Holder()); ExceptionCode ec = 0; { - EXCEPTION_BLOCK(int, index, toUInt32(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined))); + EXCEPTION_BLOCK(int, index, toUInt32(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue))); if (UNLIKELY(index < 0)) { ec = INDEX_SIZE_ERR; goto fail; @@ -92,7 +92,7 @@ static v8::Handle dispatchEventCallback(const v8::Arguments& args) TestEventTarget* imp = V8TestEventTarget::toNative(args.Holder()); ExceptionCode ec = 0; { - EXCEPTION_BLOCK(Event*, evt, V8Event::HasInstance(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined)) ? V8Event::toNative(v8::Handle::Cast(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined))) : 0); + EXCEPTION_BLOCK(Event*, evt, V8Event::HasInstance(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue)) ? V8Event::toNative(v8::Handle::Cast(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue))) : 0); bool result = imp->dispatchEvent(evt, ec); if (UNLIKELY(ec)) goto fail; diff --git a/Source/WebCore/bindings/scripts/test/V8/V8TestInterface.cpp b/Source/WebCore/bindings/scripts/test/V8/V8TestInterface.cpp index 0477223..999913b 100644 --- a/Source/WebCore/bindings/scripts/test/V8/V8TestInterface.cpp +++ b/Source/WebCore/bindings/scripts/test/V8/V8TestInterface.cpp @@ -103,8 +103,8 @@ static v8::Handle supplementalMethod2Callback(const v8::Arguments& ar TestInterface* imp = V8TestInterface::toNative(args.Holder()); ExceptionCode ec = 0; { - STRING_TO_V8PARAMETER_EXCEPTION_BLOCK(V8Parameter<>, strArg, MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined)); - EXCEPTION_BLOCK(TestObj*, objArg, V8TestObj::HasInstance(MAYBE_MISSING_PARAMETER(args, 1, MissingIsUndefined)) ? V8TestObj::toNative(v8::Handle::Cast(MAYBE_MISSING_PARAMETER(args, 1, MissingIsUndefined))) : 0); + STRING_TO_V8PARAMETER_EXCEPTION_BLOCK(V8Parameter<>, strArg, MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue)); + EXCEPTION_BLOCK(TestObj*, objArg, V8TestObj::HasInstance(MAYBE_MISSING_PARAMETER(args, 1, MissingIsUndefinedValue)) ? V8TestObj::toNative(v8::Handle::Cast(MAYBE_MISSING_PARAMETER(args, 1, MissingIsUndefinedValue))) : 0); ScriptExecutionContext* scriptContext = getScriptExecutionContext(); if (!scriptContext) return v8::Undefined(); @@ -176,8 +176,8 @@ v8::Handle V8TestInterface::constructorCallback(const v8::Arguments& return throwError("Not enough arguments", V8Proxy::TypeError); ExceptionCode ec = 0; - STRING_TO_V8PARAMETER_EXCEPTION_BLOCK(V8Parameter<>, str1, MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined)); - STRING_TO_V8PARAMETER_EXCEPTION_BLOCK(V8Parameter<>, str2, MAYBE_MISSING_PARAMETER(args, 1, MissingIsUndefined)); + STRING_TO_V8PARAMETER_EXCEPTION_BLOCK(V8Parameter<>, str1, MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue)); + STRING_TO_V8PARAMETER_EXCEPTION_BLOCK(V8Parameter<>, str2, MAYBE_MISSING_PARAMETER(args, 1, MissingIsUndefinedValue)); ScriptExecutionContext* context = getScriptExecutionContext(); if (!context) diff --git a/Source/WebCore/bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp b/Source/WebCore/bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp index 142012d..327db4c 100644 --- a/Source/WebCore/bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp +++ b/Source/WebCore/bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp @@ -46,7 +46,7 @@ static v8::Handle methodCallback(const v8::Arguments& args) if (args.Length() < 1) return throwError("Not enough arguments", V8Proxy::TypeError); TestMediaQueryListListener* imp = V8TestMediaQueryListListener::toNative(args.Holder()); - EXCEPTION_BLOCK(RefPtr, listener, MediaQueryListListener::create(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined))); + EXCEPTION_BLOCK(RefPtr, listener, MediaQueryListListener::create(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue))); imp->method(listener); return v8::Handle(); } diff --git a/Source/WebCore/bindings/scripts/test/V8/V8TestNamedConstructor.cpp b/Source/WebCore/bindings/scripts/test/V8/V8TestNamedConstructor.cpp index 97f4a26..5846b58 100644 --- a/Source/WebCore/bindings/scripts/test/V8/V8TestNamedConstructor.cpp +++ b/Source/WebCore/bindings/scripts/test/V8/V8TestNamedConstructor.cpp @@ -67,9 +67,9 @@ static v8::Handle V8TestNamedConstructorConstructorCallback(const v8: return throwError("Not enough arguments", V8Proxy::TypeError); ExceptionCode ec = 0; - STRING_TO_V8PARAMETER_EXCEPTION_BLOCK(V8Parameter<>, str1, MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined)); - STRING_TO_V8PARAMETER_EXCEPTION_BLOCK(V8Parameter<>, str2, MAYBE_MISSING_PARAMETER(args, 1, MissingIsUndefined)); - STRING_TO_V8PARAMETER_EXCEPTION_BLOCK(V8Parameter<>, str3, MAYBE_MISSING_PARAMETER(args, 2, MissingIsEmpty)); + STRING_TO_V8PARAMETER_EXCEPTION_BLOCK(V8Parameter<>, str1, MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue)); + STRING_TO_V8PARAMETER_EXCEPTION_BLOCK(V8Parameter<>, str2, MAYBE_MISSING_PARAMETER(args, 1, MissingIsUndefinedValue)); + STRING_TO_V8PARAMETER_EXCEPTION_BLOCK(V8Parameter<>, str3, MAYBE_MISSING_PARAMETER(args, 2, MissingIsNullValue)); RefPtr impl = TestNamedConstructor::createForJSConstructor(document, str1, str2, str3, ec); v8::Handle wrapper = args.Holder(); diff --git a/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp b/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp index 2ece582..d37e04e 100644 --- a/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp +++ b/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp @@ -875,9 +875,9 @@ static v8::Handle voidMethodWithArgsCallback(const v8::Arguments& arg if (args.Length() < 3) return throwError("Not enough arguments", V8Proxy::TypeError); TestObj* imp = V8TestObj::toNative(args.Holder()); - EXCEPTION_BLOCK(int, intArg, toInt32(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined))); - STRING_TO_V8PARAMETER_EXCEPTION_BLOCK(V8Parameter<>, strArg, MAYBE_MISSING_PARAMETER(args, 1, MissingIsUndefined)); - EXCEPTION_BLOCK(TestObj*, objArg, V8TestObj::HasInstance(MAYBE_MISSING_PARAMETER(args, 2, MissingIsUndefined)) ? V8TestObj::toNative(v8::Handle::Cast(MAYBE_MISSING_PARAMETER(args, 2, MissingIsUndefined))) : 0); + EXCEPTION_BLOCK(int, intArg, toInt32(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue))); + STRING_TO_V8PARAMETER_EXCEPTION_BLOCK(V8Parameter<>, strArg, MAYBE_MISSING_PARAMETER(args, 1, MissingIsUndefinedValue)); + EXCEPTION_BLOCK(TestObj*, objArg, V8TestObj::HasInstance(MAYBE_MISSING_PARAMETER(args, 2, MissingIsUndefinedValue)) ? V8TestObj::toNative(v8::Handle::Cast(MAYBE_MISSING_PARAMETER(args, 2, MissingIsUndefinedValue))) : 0); imp->voidMethodWithArgs(intArg, strArg, objArg); return v8::Handle(); } @@ -895,9 +895,9 @@ static v8::Handle intMethodWithArgsCallback(const v8::Arguments& args if (args.Length() < 3) return throwError("Not enough arguments", V8Proxy::TypeError); TestObj* imp = V8TestObj::toNative(args.Holder()); - EXCEPTION_BLOCK(int, intArg, toInt32(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined))); - STRING_TO_V8PARAMETER_EXCEPTION_BLOCK(V8Parameter<>, strArg, MAYBE_MISSING_PARAMETER(args, 1, MissingIsUndefined)); - EXCEPTION_BLOCK(TestObj*, objArg, V8TestObj::HasInstance(MAYBE_MISSING_PARAMETER(args, 2, MissingIsUndefined)) ? V8TestObj::toNative(v8::Handle::Cast(MAYBE_MISSING_PARAMETER(args, 2, MissingIsUndefined))) : 0); + EXCEPTION_BLOCK(int, intArg, toInt32(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue))); + STRING_TO_V8PARAMETER_EXCEPTION_BLOCK(V8Parameter<>, strArg, MAYBE_MISSING_PARAMETER(args, 1, MissingIsUndefinedValue)); + EXCEPTION_BLOCK(TestObj*, objArg, V8TestObj::HasInstance(MAYBE_MISSING_PARAMETER(args, 2, MissingIsUndefinedValue)) ? V8TestObj::toNative(v8::Handle::Cast(MAYBE_MISSING_PARAMETER(args, 2, MissingIsUndefinedValue))) : 0); return v8::Integer::New(imp->intMethodWithArgs(intArg, strArg, objArg)); } @@ -914,9 +914,9 @@ static v8::Handle objMethodWithArgsCallback(const v8::Arguments& args if (args.Length() < 3) return throwError("Not enough arguments", V8Proxy::TypeError); TestObj* imp = V8TestObj::toNative(args.Holder()); - EXCEPTION_BLOCK(int, intArg, toInt32(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined))); - STRING_TO_V8PARAMETER_EXCEPTION_BLOCK(V8Parameter<>, strArg, MAYBE_MISSING_PARAMETER(args, 1, MissingIsUndefined)); - EXCEPTION_BLOCK(TestObj*, objArg, V8TestObj::HasInstance(MAYBE_MISSING_PARAMETER(args, 2, MissingIsUndefined)) ? V8TestObj::toNative(v8::Handle::Cast(MAYBE_MISSING_PARAMETER(args, 2, MissingIsUndefined))) : 0); + EXCEPTION_BLOCK(int, intArg, toInt32(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue))); + STRING_TO_V8PARAMETER_EXCEPTION_BLOCK(V8Parameter<>, strArg, MAYBE_MISSING_PARAMETER(args, 1, MissingIsUndefinedValue)); + EXCEPTION_BLOCK(TestObj*, objArg, V8TestObj::HasInstance(MAYBE_MISSING_PARAMETER(args, 2, MissingIsUndefinedValue)) ? V8TestObj::toNative(v8::Handle::Cast(MAYBE_MISSING_PARAMETER(args, 2, MissingIsUndefinedValue))) : 0); return toV8(imp->objMethodWithArgs(intArg, strArg, objArg)); } @@ -928,8 +928,8 @@ static v8::Handle methodThatRequiresAllArgsAndThrowsCallback(const v8 TestObj* imp = V8TestObj::toNative(args.Holder()); ExceptionCode ec = 0; { - STRING_TO_V8PARAMETER_EXCEPTION_BLOCK(V8Parameter<>, strArg, MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined)); - EXCEPTION_BLOCK(TestObj*, objArg, V8TestObj::HasInstance(MAYBE_MISSING_PARAMETER(args, 1, MissingIsUndefined)) ? V8TestObj::toNative(v8::Handle::Cast(MAYBE_MISSING_PARAMETER(args, 1, MissingIsUndefined))) : 0); + STRING_TO_V8PARAMETER_EXCEPTION_BLOCK(V8Parameter<>, strArg, MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue)); + EXCEPTION_BLOCK(TestObj*, objArg, V8TestObj::HasInstance(MAYBE_MISSING_PARAMETER(args, 1, MissingIsUndefinedValue)) ? V8TestObj::toNative(v8::Handle::Cast(MAYBE_MISSING_PARAMETER(args, 1, MissingIsUndefinedValue))) : 0); RefPtr result = imp->methodThatRequiresAllArgsAndThrows(strArg, objArg, ec); if (UNLIKELY(ec)) goto fail; @@ -960,7 +960,7 @@ static v8::Handle idbKeyCallback(const v8::Arguments& args) if (args.Length() < 1) return throwError("Not enough arguments", V8Proxy::TypeError); TestObj* imp = V8TestObj::toNative(args.Holder()); - EXCEPTION_BLOCK(RefPtr, key, createIDBKeyFromValue(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined))); + EXCEPTION_BLOCK(RefPtr, key, createIDBKeyFromValue(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue))); imp->idbKey(key); return v8::Handle(); } @@ -971,7 +971,7 @@ static v8::Handle optionsObjectCallback(const v8::Arguments& args) if (args.Length() < 1) return throwError("Not enough arguments", V8Proxy::TypeError); TestObj* imp = V8TestObj::toNative(args.Holder()); - EXCEPTION_BLOCK(OptionsObject, oo, MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined)); + EXCEPTION_BLOCK(OptionsObject, oo, MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue)); if (args.Length() > 0 && !oo.isUndefinedOrNull() && !oo.isObject()) { ec = TYPE_MISMATCH_ERR; V8Proxy::setDOMException(ec); @@ -981,7 +981,7 @@ static v8::Handle optionsObjectCallback(const v8::Arguments& args) imp->optionsObject(oo); return v8::Handle(); } - EXCEPTION_BLOCK(OptionsObject, ooo, MAYBE_MISSING_PARAMETER(args, 1, MissingIsUndefined)); + EXCEPTION_BLOCK(OptionsObject, ooo, MAYBE_MISSING_PARAMETER(args, 1, MissingIsUndefinedValue)); if (args.Length() > 1 && !ooo.isUndefinedOrNull() && !ooo.isObject()) { ec = TYPE_MISMATCH_ERR; V8Proxy::setDOMException(ec); @@ -1019,7 +1019,7 @@ static v8::Handle customArgsAndExceptionCallback(const v8::Arguments& RefPtr callStack(createScriptCallStackForInspector()); if (!callStack) return v8::Undefined(); - EXCEPTION_BLOCK(log*, intArg, V8log::HasInstance(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined)) ? V8log::toNative(v8::Handle::Cast(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined))) : 0); + EXCEPTION_BLOCK(log*, intArg, V8log::HasInstance(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue)) ? V8log::toNative(v8::Handle::Cast(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue))) : 0); imp->customArgsAndException(intArg, scriptArguments, callStack, ec); if (UNLIKELY(ec)) goto fail; @@ -1131,7 +1131,7 @@ static v8::Handle methodWithOptionalArgCallback(const v8::Arguments& imp->methodWithOptionalArg(); return v8::Handle(); } - EXCEPTION_BLOCK(int, opt, toInt32(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined))); + EXCEPTION_BLOCK(int, opt, toInt32(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue))); imp->methodWithOptionalArg(opt); return v8::Handle(); } @@ -1142,12 +1142,12 @@ static v8::Handle methodWithNonOptionalArgAndOptionalArgCallback(cons if (args.Length() < 1) return throwError("Not enough arguments", V8Proxy::TypeError); TestObj* imp = V8TestObj::toNative(args.Holder()); - EXCEPTION_BLOCK(int, nonOpt, toInt32(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined))); + EXCEPTION_BLOCK(int, nonOpt, toInt32(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue))); if (args.Length() <= 1) { imp->methodWithNonOptionalArgAndOptionalArg(nonOpt); return v8::Handle(); } - EXCEPTION_BLOCK(int, opt, toInt32(MAYBE_MISSING_PARAMETER(args, 1, MissingIsUndefined))); + EXCEPTION_BLOCK(int, opt, toInt32(MAYBE_MISSING_PARAMETER(args, 1, MissingIsUndefinedValue))); imp->methodWithNonOptionalArgAndOptionalArg(nonOpt, opt); return v8::Handle(); } @@ -1158,21 +1158,52 @@ static v8::Handle methodWithNonOptionalArgAndTwoOptionalArgsCallback( if (args.Length() < 1) return throwError("Not enough arguments", V8Proxy::TypeError); TestObj* imp = V8TestObj::toNative(args.Holder()); - EXCEPTION_BLOCK(int, nonOpt, toInt32(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined))); + EXCEPTION_BLOCK(int, nonOpt, toInt32(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue))); if (args.Length() <= 1) { imp->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt); return v8::Handle(); } - EXCEPTION_BLOCK(int, opt1, toInt32(MAYBE_MISSING_PARAMETER(args, 1, MissingIsUndefined))); + EXCEPTION_BLOCK(int, opt1, toInt32(MAYBE_MISSING_PARAMETER(args, 1, MissingIsUndefinedValue))); if (args.Length() <= 2) { imp->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt, opt1); return v8::Handle(); } - EXCEPTION_BLOCK(int, opt2, toInt32(MAYBE_MISSING_PARAMETER(args, 2, MissingIsUndefined))); + EXCEPTION_BLOCK(int, opt2, toInt32(MAYBE_MISSING_PARAMETER(args, 2, MissingIsUndefinedValue))); imp->methodWithNonOptionalArgAndTwoOptionalArgs(nonOpt, opt1, opt2); return v8::Handle(); } +static v8::Handle methodWithOptionalStringCallback(const v8::Arguments& args) +{ + INC_STATS("DOM.TestObj.methodWithOptionalString"); + TestObj* imp = V8TestObj::toNative(args.Holder()); + if (args.Length() <= 0) { + imp->methodWithOptionalString(); + return v8::Handle(); + } + STRING_TO_V8PARAMETER_EXCEPTION_BLOCK(V8Parameter<>, str, MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue)); + imp->methodWithOptionalString(str); + return v8::Handle(); +} + +static v8::Handle methodWithOptionalIsTreatAsUndefinedStringCallback(const v8::Arguments& args) +{ + INC_STATS("DOM.TestObj.methodWithOptionalIsTreatAsUndefinedString"); + TestObj* imp = V8TestObj::toNative(args.Holder()); + STRING_TO_V8PARAMETER_EXCEPTION_BLOCK(V8Parameter<>, str, MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue)); + imp->methodWithOptionalIsTreatAsUndefinedString(str); + return v8::Handle(); +} + +static v8::Handle methodWithOptionalIsNullStringStringCallback(const v8::Arguments& args) +{ + INC_STATS("DOM.TestObj.methodWithOptionalIsNullStringString"); + TestObj* imp = V8TestObj::toNative(args.Holder()); + STRING_TO_V8PARAMETER_EXCEPTION_BLOCK(V8Parameter<>, str, MAYBE_MISSING_PARAMETER(args, 0, MissingIsNullValue)); + imp->methodWithOptionalIsNullStringString(str); + return v8::Handle(); +} + static v8::Handle methodWithCallbackArgCallback(const v8::Arguments& args) { INC_STATS("DOM.TestObj.methodWithCallbackArg"); @@ -1192,7 +1223,7 @@ static v8::Handle methodWithNonCallbackArgAndCallbackArgCallback(cons if (args.Length() < 2) return throwError("Not enough arguments", V8Proxy::TypeError); TestObj* imp = V8TestObj::toNative(args.Holder()); - EXCEPTION_BLOCK(int, nonCallback, toInt32(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined))); + EXCEPTION_BLOCK(int, nonCallback, toInt32(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue))); if (args.Length() <= 1 || !args[1]->IsObject()) return throwError(TYPE_MISMATCH_ERR); RefPtr callback = V8TestCallback::create(args[1], getScriptExecutionContext()); @@ -1255,8 +1286,8 @@ static v8::Handle overloadedMethod1Callback(const v8::Arguments& args if (args.Length() < 2) return throwError("Not enough arguments", V8Proxy::TypeError); TestObj* imp = V8TestObj::toNative(args.Holder()); - EXCEPTION_BLOCK(TestObj*, objArg, V8TestObj::HasInstance(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined)) ? V8TestObj::toNative(v8::Handle::Cast(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined))) : 0); - STRING_TO_V8PARAMETER_EXCEPTION_BLOCK(V8Parameter<>, strArg, MAYBE_MISSING_PARAMETER(args, 1, MissingIsUndefined)); + EXCEPTION_BLOCK(TestObj*, objArg, V8TestObj::HasInstance(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue)) ? V8TestObj::toNative(v8::Handle::Cast(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue))) : 0); + STRING_TO_V8PARAMETER_EXCEPTION_BLOCK(V8Parameter<>, strArg, MAYBE_MISSING_PARAMETER(args, 1, MissingIsUndefinedValue)); imp->overloadedMethod(objArg, strArg); return v8::Handle(); } @@ -1267,12 +1298,12 @@ static v8::Handle overloadedMethod2Callback(const v8::Arguments& args if (args.Length() < 1) return throwError("Not enough arguments", V8Proxy::TypeError); TestObj* imp = V8TestObj::toNative(args.Holder()); - EXCEPTION_BLOCK(TestObj*, objArg, V8TestObj::HasInstance(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined)) ? V8TestObj::toNative(v8::Handle::Cast(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined))) : 0); + EXCEPTION_BLOCK(TestObj*, objArg, V8TestObj::HasInstance(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue)) ? V8TestObj::toNative(v8::Handle::Cast(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue))) : 0); if (args.Length() <= 1) { imp->overloadedMethod(objArg); return v8::Handle(); } - EXCEPTION_BLOCK(int, intArg, toInt32(MAYBE_MISSING_PARAMETER(args, 1, MissingIsUndefined))); + EXCEPTION_BLOCK(int, intArg, toInt32(MAYBE_MISSING_PARAMETER(args, 1, MissingIsUndefinedValue))); imp->overloadedMethod(objArg, intArg); return v8::Handle(); } @@ -1283,7 +1314,7 @@ static v8::Handle overloadedMethod3Callback(const v8::Arguments& args if (args.Length() < 1) return throwError("Not enough arguments", V8Proxy::TypeError); TestObj* imp = V8TestObj::toNative(args.Holder()); - STRING_TO_V8PARAMETER_EXCEPTION_BLOCK(V8Parameter<>, strArg, MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined)); + STRING_TO_V8PARAMETER_EXCEPTION_BLOCK(V8Parameter<>, strArg, MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue)); imp->overloadedMethod(strArg); return v8::Handle(); } @@ -1294,7 +1325,7 @@ static v8::Handle overloadedMethod4Callback(const v8::Arguments& args if (args.Length() < 1) return throwError("Not enough arguments", V8Proxy::TypeError); TestObj* imp = V8TestObj::toNative(args.Holder()); - EXCEPTION_BLOCK(int, intArg, toInt32(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined))); + EXCEPTION_BLOCK(int, intArg, toInt32(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue))); imp->overloadedMethod(intArg); return v8::Handle(); } @@ -1318,7 +1349,7 @@ static v8::Handle overloadedMethod6Callback(const v8::Arguments& args if (args.Length() < 1) return throwError("Not enough arguments", V8Proxy::TypeError); TestObj* imp = V8TestObj::toNative(args.Holder()); - EXCEPTION_BLOCK(RefPtr, listArg, v8ValueToWebCoreDOMStringList(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined))); + EXCEPTION_BLOCK(RefPtr, listArg, v8ValueToWebCoreDOMStringList(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue))); imp->overloadedMethod(listArg); return v8::Handle(); } @@ -1329,7 +1360,7 @@ static v8::Handle overloadedMethod7Callback(const v8::Arguments& args if (args.Length() < 1) return throwError("Not enough arguments", V8Proxy::TypeError); TestObj* imp = V8TestObj::toNative(args.Holder()); - EXCEPTION_BLOCK(RefPtr, arrayArg, v8ValueToWebCoreDOMStringList(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined))); + EXCEPTION_BLOCK(RefPtr, arrayArg, v8ValueToWebCoreDOMStringList(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue))); imp->overloadedMethod(arrayArg); return v8::Handle(); } @@ -1368,7 +1399,7 @@ static v8::Handle classMethodWithOptionalCallback(const v8::Arguments if (args.Length() <= 0) { return v8::Integer::New(TestObj::classMethodWithOptional()); } - EXCEPTION_BLOCK(int, arg, toInt32(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined))); + EXCEPTION_BLOCK(int, arg, toInt32(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue))); return v8::Integer::New(TestObj::classMethodWithOptional(arg)); } @@ -1379,7 +1410,7 @@ static v8::Handle overloadedMethod11Callback(const v8::Arguments& arg INC_STATS("DOM.TestObj.overloadedMethod11"); if (args.Length() < 1) return throwError("Not enough arguments", V8Proxy::TypeError); - EXCEPTION_BLOCK(int, arg, toInt32(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined))); + EXCEPTION_BLOCK(int, arg, toInt32(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue))); TestObj::overloadedMethod1(arg); return v8::Handle(); } @@ -1393,7 +1424,7 @@ static v8::Handle overloadedMethod12Callback(const v8::Arguments& arg INC_STATS("DOM.TestObj.overloadedMethod12"); if (args.Length() < 1) return throwError("Not enough arguments", V8Proxy::TypeError); - STRING_TO_V8PARAMETER_EXCEPTION_BLOCK(V8Parameter<>, type, MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined)); + STRING_TO_V8PARAMETER_EXCEPTION_BLOCK(V8Parameter<>, type, MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue)); TestObj::overloadedMethod1(type); return v8::Handle(); } @@ -1421,7 +1452,7 @@ static v8::Handle enabledAtRuntimeMethod1Callback(const v8::Arguments if (args.Length() < 1) return throwError("Not enough arguments", V8Proxy::TypeError); TestObj* imp = V8TestObj::toNative(args.Holder()); - EXCEPTION_BLOCK(int, intArg, V8int::HasInstance(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined)) ? V8int::toNative(v8::Handle::Cast(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined))) : 0); + EXCEPTION_BLOCK(int, intArg, V8int::HasInstance(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue)) ? V8int::toNative(v8::Handle::Cast(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue))) : 0); imp->enabledAtRuntimeMethod1(intArg); return v8::Handle(); } @@ -1432,7 +1463,7 @@ static v8::Handle enabledAtRuntimeMethod2Callback(const v8::Arguments if (args.Length() < 1) return throwError("Not enough arguments", V8Proxy::TypeError); TestObj* imp = V8TestObj::toNative(args.Holder()); - EXCEPTION_BLOCK(int, intArg, V8int::HasInstance(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined)) ? V8int::toNative(v8::Handle::Cast(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined))) : 0); + EXCEPTION_BLOCK(int, intArg, V8int::HasInstance(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue)) ? V8int::toNative(v8::Handle::Cast(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue))) : 0); imp->enabledAtRuntimeMethod2(intArg); return v8::Handle(); } @@ -1461,7 +1492,7 @@ static v8::Handle convert1Callback(const v8::Arguments& args) if (args.Length() < 1) return throwError("Not enough arguments", V8Proxy::TypeError); TestObj* imp = V8TestObj::toNative(args.Holder()); - EXCEPTION_BLOCK(a*, , V8a::HasInstance(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined)) ? V8a::toNative(v8::Handle::Cast(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined))) : 0); + EXCEPTION_BLOCK(a*, , V8a::HasInstance(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue)) ? V8a::toNative(v8::Handle::Cast(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue))) : 0); imp->convert1(); return v8::Handle(); } @@ -1472,7 +1503,7 @@ static v8::Handle convert2Callback(const v8::Arguments& args) if (args.Length() < 1) return throwError("Not enough arguments", V8Proxy::TypeError); TestObj* imp = V8TestObj::toNative(args.Holder()); - EXCEPTION_BLOCK(b*, , V8b::HasInstance(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined)) ? V8b::toNative(v8::Handle::Cast(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined))) : 0); + EXCEPTION_BLOCK(b*, , V8b::HasInstance(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue)) ? V8b::toNative(v8::Handle::Cast(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue))) : 0); imp->convert2(); return v8::Handle(); } @@ -1483,7 +1514,7 @@ static v8::Handle convert3Callback(const v8::Arguments& args) if (args.Length() < 1) return throwError("Not enough arguments", V8Proxy::TypeError); TestObj* imp = V8TestObj::toNative(args.Holder()); - EXCEPTION_BLOCK(c*, , V8c::HasInstance(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined)) ? V8c::toNative(v8::Handle::Cast(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined))) : 0); + EXCEPTION_BLOCK(c*, , V8c::HasInstance(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue)) ? V8c::toNative(v8::Handle::Cast(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue))) : 0); imp->convert3(); return v8::Handle(); } @@ -1494,7 +1525,7 @@ static v8::Handle convert4Callback(const v8::Arguments& args) if (args.Length() < 1) return throwError("Not enough arguments", V8Proxy::TypeError); TestObj* imp = V8TestObj::toNative(args.Holder()); - EXCEPTION_BLOCK(d*, , V8d::HasInstance(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined)) ? V8d::toNative(v8::Handle::Cast(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined))) : 0); + EXCEPTION_BLOCK(d*, , V8d::HasInstance(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue)) ? V8d::toNative(v8::Handle::Cast(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue))) : 0); imp->convert4(); return v8::Handle(); } @@ -1505,7 +1536,7 @@ static v8::Handle convert5Callback(const v8::Arguments& args) if (args.Length() < 1) return throwError("Not enough arguments", V8Proxy::TypeError); TestObj* imp = V8TestObj::toNative(args.Holder()); - EXCEPTION_BLOCK(e*, , V8e::HasInstance(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined)) ? V8e::toNative(v8::Handle::Cast(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined))) : 0); + EXCEPTION_BLOCK(e*, , V8e::HasInstance(MAYBE_MISSING_PARAMETER(args, 0, MissingIsNullValue)) ? V8e::toNative(v8::Handle::Cast(MAYBE_MISSING_PARAMETER(args, 0, MissingIsNullValue))) : 0); imp->convert5(); return v8::Handle(); } @@ -1540,9 +1571,9 @@ static v8::Handle strictFunctionCallback(const v8::Arguments& args) TestObj* imp = V8TestObj::toNative(args.Holder()); ExceptionCode ec = 0; { - STRING_TO_V8PARAMETER_EXCEPTION_BLOCK(V8Parameter<>, str, MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined)); - EXCEPTION_BLOCK(float, a, static_cast(MAYBE_MISSING_PARAMETER(args, 1, MissingIsUndefined)->NumberValue())); - EXCEPTION_BLOCK(int, b, V8int::HasInstance(MAYBE_MISSING_PARAMETER(args, 2, MissingIsUndefined)) ? V8int::toNative(v8::Handle::Cast(MAYBE_MISSING_PARAMETER(args, 2, MissingIsUndefined))) : 0); + STRING_TO_V8PARAMETER_EXCEPTION_BLOCK(V8Parameter<>, str, MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue)); + EXCEPTION_BLOCK(float, a, static_cast(MAYBE_MISSING_PARAMETER(args, 1, MissingIsUndefinedValue)->NumberValue())); + EXCEPTION_BLOCK(int, b, V8int::HasInstance(MAYBE_MISSING_PARAMETER(args, 2, MissingIsUndefinedValue)) ? V8int::toNative(v8::Handle::Cast(MAYBE_MISSING_PARAMETER(args, 2, MissingIsUndefinedValue))) : 0); RefPtr result = imp->strictFunction(str, a, b, ec); if (UNLIKELY(ec)) goto fail; @@ -1686,6 +1717,9 @@ static const BatchedCallback TestObjCallbacks[] = { {"methodWithOptionalArg", TestObjInternal::methodWithOptionalArgCallback}, {"methodWithNonOptionalArgAndOptionalArg", TestObjInternal::methodWithNonOptionalArgAndOptionalArgCallback}, {"methodWithNonOptionalArgAndTwoOptionalArgs", TestObjInternal::methodWithNonOptionalArgAndTwoOptionalArgsCallback}, + {"methodWithOptionalString", TestObjInternal::methodWithOptionalStringCallback}, + {"methodWithOptionalIsTreatAsUndefinedString", TestObjInternal::methodWithOptionalIsTreatAsUndefinedStringCallback}, + {"methodWithOptionalIsNullStringString", TestObjInternal::methodWithOptionalIsNullStringStringCallback}, {"methodWithCallbackArg", TestObjInternal::methodWithCallbackArgCallback}, {"methodWithNonCallbackArgAndCallbackArg", TestObjInternal::methodWithNonCallbackArgAndCallbackArgCallback}, {"methodWithCallbackAndOptionalArg", TestObjInternal::methodWithCallbackAndOptionalArgCallback}, diff --git a/Source/WebCore/bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp b/Source/WebCore/bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp index 27e51b2..f409e04 100644 --- a/Source/WebCore/bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp +++ b/Source/WebCore/bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp @@ -127,7 +127,7 @@ v8::Handle V8TestSerializedScriptValueInterface::constructorCallback( return args.Holder(); if (args.Length() < 2) return throwError("Not enough arguments", V8Proxy::TypeError); - STRING_TO_V8PARAMETER_EXCEPTION_BLOCK(V8Parameter<>, hello, MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined)); + STRING_TO_V8PARAMETER_EXCEPTION_BLOCK(V8Parameter<>, hello, MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue)); bool valueDidThrow = false; RefPtr value = SerializedScriptValue::create(args[1], 0, 0, valueDidThrow); if (valueDidThrow) diff --git a/Source/WebCore/bindings/v8/V8Binding.h b/Source/WebCore/bindings/v8/V8Binding.h index 528b4fb..8fd1a88 100644 --- a/Source/WebCore/bindings/v8/V8Binding.h +++ b/Source/WebCore/bindings/v8/V8Binding.h @@ -512,8 +512,8 @@ namespace WebCore { } enum ParameterMissingPolicy { - MissingIsUndefined, - MissingIsEmpty + MissingIsUndefinedValue, + MissingIsNullValue }; } // namespace WebCore diff --git a/Source/WebCore/bindings/v8/custom/V8BindingMacros.h b/Source/WebCore/bindings/v8/custom/V8BindingMacros.h index 7242a36..a3c3e9d 100644 --- a/Source/WebCore/bindings/v8/custom/V8BindingMacros.h +++ b/Source/WebCore/bindings/v8/custom/V8BindingMacros.h @@ -48,4 +48,4 @@ return; #define MAYBE_MISSING_PARAMETER(args, index, policy) \ - (((policy) == MissingIsEmpty && (index) >= (args).Length()) ? (v8::Local()) : ((args)[(index)])) + (((policy) == MissingIsNullValue && (index) >= (args).Length()) ? (v8::Local()) : ((args)[(index)])) diff --git a/Source/WebCore/css/CSSMediaRule.idl b/Source/WebCore/css/CSSMediaRule.idl index c62ac9b..a8542f2 100644 --- a/Source/WebCore/css/CSSMediaRule.idl +++ b/Source/WebCore/css/CSSMediaRule.idl @@ -25,10 +25,10 @@ module css { readonly attribute MediaList media; readonly attribute CSSRuleList cssRules; - [ObjCLegacyUnnamedParameters] unsigned long insertRule(in [Optional=CallWithDefaultValue] DOMString rule, - in [Optional=CallWithDefaultValue] unsigned long index) + [ObjCLegacyUnnamedParameters] unsigned long insertRule(in [Optional=TreatAsUndefined] DOMString rule, + in [Optional=TreatAsUndefined] unsigned long index) raises(DOMException); - void deleteRule(in [Optional=CallWithDefaultValue] unsigned long index) + void deleteRule(in [Optional=TreatAsUndefined] unsigned long index) raises(DOMException); }; diff --git a/Source/WebCore/css/CSSPrimitiveValue.idl b/Source/WebCore/css/CSSPrimitiveValue.idl index 8d44737..6d6658f 100644 --- a/Source/WebCore/css/CSSPrimitiveValue.idl +++ b/Source/WebCore/css/CSSPrimitiveValue.idl @@ -51,13 +51,13 @@ module css { readonly attribute unsigned short primitiveType; - [ObjCLegacyUnnamedParameters] void setFloatValue(in [Optional=CallWithDefaultValue] unsigned short unitType, - in [Optional=CallWithDefaultValue] float floatValue) + [ObjCLegacyUnnamedParameters] void setFloatValue(in [Optional=TreatAsUndefined] unsigned short unitType, + in [Optional=TreatAsUndefined] float floatValue) raises(DOMException); - float getFloatValue(in [Optional=CallWithDefaultValue] unsigned short unitType) + float getFloatValue(in [Optional=TreatAsUndefined] unsigned short unitType) raises(DOMException); - [ObjCLegacyUnnamedParameters] void setStringValue(in [Optional=CallWithDefaultValue] unsigned short stringType, - in [Optional=CallWithDefaultValue] DOMString stringValue) + [ObjCLegacyUnnamedParameters] void setStringValue(in [Optional=TreatAsUndefined] unsigned short stringType, + in [Optional=TreatAsUndefined] DOMString stringValue) raises(DOMException); DOMString getStringValue() raises(DOMException); diff --git a/Source/WebCore/css/CSSRuleList.idl b/Source/WebCore/css/CSSRuleList.idl index eff0293..1c6f46b 100644 --- a/Source/WebCore/css/CSSRuleList.idl +++ b/Source/WebCore/css/CSSRuleList.idl @@ -32,7 +32,7 @@ module css { V8DependentLifetime ] CSSRuleList { readonly attribute unsigned long length; - CSSRule item(in [Optional=CallWithDefaultValue] unsigned long index); + CSSRule item(in [Optional=TreatAsUndefined] unsigned long index); }; } diff --git a/Source/WebCore/css/CSSStyleDeclaration.idl b/Source/WebCore/css/CSSStyleDeclaration.idl index 14683d1..44a9326 100644 --- a/Source/WebCore/css/CSSStyleDeclaration.idl +++ b/Source/WebCore/css/CSSStyleDeclaration.idl @@ -33,23 +33,23 @@ module css { attribute [ConvertNullStringTo=Null, TreatNullAs=NullString] DOMString cssText setter raises(DOMException); - [ConvertNullStringTo=Null] DOMString getPropertyValue(in [Optional=CallWithDefaultValue] DOMString propertyName); - [JSCustom] CSSValue getPropertyCSSValue(in [Optional=CallWithDefaultValue] DOMString propertyName); - [ConvertNullStringTo=Null] DOMString removeProperty(in [Optional=CallWithDefaultValue] DOMString propertyName) + [ConvertNullStringTo=Null] DOMString getPropertyValue(in [Optional=TreatAsUndefined] DOMString propertyName); + [JSCustom] CSSValue getPropertyCSSValue(in [Optional=TreatAsUndefined] DOMString propertyName); + [ConvertNullStringTo=Null] DOMString removeProperty(in [Optional=TreatAsUndefined] DOMString propertyName) raises(DOMException); - [ConvertNullStringTo=Null] DOMString getPropertyPriority(in [Optional=CallWithDefaultValue] DOMString propertyName); - [ObjCLegacyUnnamedParameters] void setProperty(in [Optional=CallWithDefaultValue] DOMString propertyName, - in [TreatNullAs=NullString,Optional=CallWithDefaultValue] DOMString value, - in [Optional=CallWithDefaultValue] DOMString priority) + [ConvertNullStringTo=Null] DOMString getPropertyPriority(in [Optional=TreatAsUndefined] DOMString propertyName); + [ObjCLegacyUnnamedParameters] void setProperty(in [Optional=TreatAsUndefined] DOMString propertyName, + in [TreatNullAs=NullString,Optional=TreatAsUndefined] DOMString value, + in [Optional=TreatAsUndefined] DOMString priority) raises(DOMException); readonly attribute unsigned long length; - DOMString item(in [Optional=CallWithDefaultValue] unsigned long index); + DOMString item(in [Optional=TreatAsUndefined] unsigned long index); readonly attribute CSSRule parentRule; // Extensions - [ConvertNullStringTo=Null] DOMString getPropertyShorthand(in [Optional=CallWithDefaultValue] DOMString propertyName); - boolean isPropertyImplicit(in [Optional=CallWithDefaultValue] DOMString propertyName); + [ConvertNullStringTo=Null] DOMString getPropertyShorthand(in [Optional=TreatAsUndefined] DOMString propertyName); + boolean isPropertyImplicit(in [Optional=TreatAsUndefined] DOMString propertyName); }; } diff --git a/Source/WebCore/css/CSSStyleSheet.idl b/Source/WebCore/css/CSSStyleSheet.idl index e2514f0..6fae6d6 100644 --- a/Source/WebCore/css/CSSStyleSheet.idl +++ b/Source/WebCore/css/CSSStyleSheet.idl @@ -25,20 +25,20 @@ module css { readonly attribute CSSRule ownerRule; readonly attribute CSSRuleList cssRules; - [ObjCLegacyUnnamedParameters] unsigned long insertRule(in [Optional=CallWithDefaultValue] DOMString rule, - in [Optional=CallWithDefaultValue] unsigned long index) + [ObjCLegacyUnnamedParameters] unsigned long insertRule(in [Optional=TreatAsUndefined] DOMString rule, + in [Optional=TreatAsUndefined] unsigned long index) raises(DOMException); - void deleteRule(in [Optional=CallWithDefaultValue] unsigned long index) + void deleteRule(in [Optional=TreatAsUndefined] unsigned long index) raises(DOMException); // IE Extensions readonly attribute CSSRuleList rules; - long addRule(in [Optional=CallWithDefaultValue] DOMString selector, - in [Optional=CallWithDefaultValue] DOMString style, + long addRule(in [Optional=TreatAsUndefined] DOMString selector, + in [Optional=TreatAsUndefined] DOMString style, in [Optional] unsigned long index) raises(DOMException); - void removeRule(in [Optional=CallWithDefaultValue] unsigned long index) + void removeRule(in [Optional=TreatAsUndefined] unsigned long index) raises(DOMException); }; diff --git a/Source/WebCore/css/CSSValueList.idl b/Source/WebCore/css/CSSValueList.idl index 0a4051b..42d8e05 100644 --- a/Source/WebCore/css/CSSValueList.idl +++ b/Source/WebCore/css/CSSValueList.idl @@ -30,7 +30,7 @@ module css { IndexedGetter ] CSSValueList : CSSValue { readonly attribute unsigned long length; - CSSValue item(in [Optional=CallWithDefaultValue] unsigned long index); + CSSValue item(in [Optional=TreatAsUndefined] unsigned long index); }; } diff --git a/Source/WebCore/css/MediaList.idl b/Source/WebCore/css/MediaList.idl index ed0d2ba..e11698d 100644 --- a/Source/WebCore/css/MediaList.idl +++ b/Source/WebCore/css/MediaList.idl @@ -35,10 +35,10 @@ module stylesheets { setter raises(DOMException); readonly attribute unsigned long length; - [ConvertNullStringTo=Null] DOMString item(in [Optional=CallWithDefaultValue] unsigned long index); - void deleteMedium(in [Optional=CallWithDefaultValue] DOMString oldMedium) + [ConvertNullStringTo=Null] DOMString item(in [Optional=TreatAsUndefined] unsigned long index); + void deleteMedium(in [Optional=TreatAsUndefined] DOMString oldMedium) raises(DOMException); - void appendMedium(in [Optional=CallWithDefaultValue] DOMString newMedium) + void appendMedium(in [Optional=TreatAsUndefined] DOMString newMedium) raises(DOMException); }; diff --git a/Source/WebCore/css/MediaQueryList.idl b/Source/WebCore/css/MediaQueryList.idl index 0d8b1f2..020fb77 100644 --- a/Source/WebCore/css/MediaQueryList.idl +++ b/Source/WebCore/css/MediaQueryList.idl @@ -21,7 +21,7 @@ module view { interface MediaQueryList { readonly attribute DOMString media; readonly attribute boolean matches; - void addListener(in [Optional=CallWithDefaultValue] MediaQueryListListener listener); - void removeListener(in [Optional=CallWithDefaultValue] MediaQueryListListener listener); + void addListener(in [Optional=TreatAsUndefined] MediaQueryListListener listener); + void removeListener(in [Optional=TreatAsUndefined] MediaQueryListListener listener); }; } diff --git a/Source/WebCore/css/MediaQueryListListener.idl b/Source/WebCore/css/MediaQueryListListener.idl index cd499ea..6d2d618 100644 --- a/Source/WebCore/css/MediaQueryListListener.idl +++ b/Source/WebCore/css/MediaQueryListListener.idl @@ -24,6 +24,6 @@ module view { CPPPureInterface, OmitConstructor ] MediaQueryListListener { - void queryChanged(in [Optional=CallWithDefaultValue] MediaQueryList list); + void queryChanged(in [Optional=TreatAsUndefined] MediaQueryList list); }; } diff --git a/Source/WebCore/css/StyleMedia.idl b/Source/WebCore/css/StyleMedia.idl index 6ff4578..977e0ba 100644 --- a/Source/WebCore/css/StyleMedia.idl +++ b/Source/WebCore/css/StyleMedia.idl @@ -29,6 +29,6 @@ module view { JSGenerateIsReachable=ImplFrame ] StyleMedia { readonly attribute DOMString type; - boolean matchMedium(in [Optional=CallWithDefaultValue] DOMString mediaquery); + boolean matchMedium(in [Optional=TreatAsUndefined] DOMString mediaquery); }; } diff --git a/Source/WebCore/css/StyleSheetList.idl b/Source/WebCore/css/StyleSheetList.idl index 67390b2..bfe8f20 100644 --- a/Source/WebCore/css/StyleSheetList.idl +++ b/Source/WebCore/css/StyleSheetList.idl @@ -28,7 +28,7 @@ module stylesheets { V8DependentLifetime ] StyleSheetList { readonly attribute unsigned long length; - StyleSheet item(in [Optional=CallWithDefaultValue] unsigned long index); + StyleSheet item(in [Optional=TreatAsUndefined] unsigned long index); }; } diff --git a/Source/WebCore/css/WebKitCSSKeyframesRule.idl b/Source/WebCore/css/WebKitCSSKeyframesRule.idl index daf2e7e..567bf4d 100644 --- a/Source/WebCore/css/WebKitCSSKeyframesRule.idl +++ b/Source/WebCore/css/WebKitCSSKeyframesRule.idl @@ -36,9 +36,9 @@ module css { attribute [ConvertNullStringTo=Null, TreatNullAs=NullString] DOMString name; readonly attribute CSSRuleList cssRules; - void insertRule(in [Optional=CallWithDefaultValue] DOMString rule); - void deleteRule(in [Optional=CallWithDefaultValue] DOMString key); - WebKitCSSKeyframeRule findRule(in [Optional=CallWithDefaultValue] DOMString key); + void insertRule(in [Optional=TreatAsUndefined] DOMString rule); + void deleteRule(in [Optional=TreatAsUndefined] DOMString key); + WebKitCSSKeyframeRule findRule(in [Optional=TreatAsUndefined] DOMString key); }; } diff --git a/Source/WebCore/css/WebKitCSSMatrix.idl b/Source/WebCore/css/WebKitCSSMatrix.idl index c6adabf..e6127de 100644 --- a/Source/WebCore/css/WebKitCSSMatrix.idl +++ b/Source/WebCore/css/WebKitCSSMatrix.idl @@ -28,7 +28,7 @@ module css { // Introduced in DOM Level ?: interface [ ConstructorParameters=1, - Constructor(in [Optional=CallWithNullValue] DOMString cssValue), + Constructor(in [Optional=TreatAsUndefined, TreatUndefinedAs=NullString] DOMString cssValue), ConstructorRaisesException, ] WebKitCSSMatrix { @@ -57,49 +57,49 @@ module css { attribute double m43; attribute double m44; - void setMatrixValue(in [Optional=CallWithDefaultValue] DOMString string) raises (DOMException); + void setMatrixValue(in [Optional=TreatAsUndefined] DOMString string) raises (DOMException); // Multiply this matrix by secondMatrix, on the right (result = this * secondMatrix) - [Immutable] WebKitCSSMatrix multiply(in [Optional=CallWithDefaultValue] WebKitCSSMatrix secondMatrix); + [Immutable] WebKitCSSMatrix multiply(in [Optional=TreatAsUndefined] WebKitCSSMatrix secondMatrix); // Return the inverse of this matrix. Throw an exception if the matrix is not invertible [Immutable] WebKitCSSMatrix inverse() raises (DOMException); // Return this matrix translated by the passed values. // Passing a NaN will use a value of 0. This allows the 3D form to used for 2D operations - [Immutable] WebKitCSSMatrix translate(in [Optional=CallWithDefaultValue] double x, - in [Optional=CallWithDefaultValue] double y, - in [Optional=CallWithDefaultValue] double z); + [Immutable] WebKitCSSMatrix translate(in [Optional=TreatAsUndefined] double x, + in [Optional=TreatAsUndefined] double y, + in [Optional=TreatAsUndefined] double z); // Returns this matrix scaled by the passed values. // Passing scaleX or scaleZ as NaN uses a value of 1, but passing scaleY of NaN // makes it the same as scaleX. This allows the 3D form to used for 2D operations - [Immutable] WebKitCSSMatrix scale(in [Optional=CallWithDefaultValue] double scaleX, - in [Optional=CallWithDefaultValue] double scaleY, - in [Optional=CallWithDefaultValue] double scaleZ); + [Immutable] WebKitCSSMatrix scale(in [Optional=TreatAsUndefined] double scaleX, + in [Optional=TreatAsUndefined] double scaleY, + in [Optional=TreatAsUndefined] double scaleZ); // Returns this matrix rotated by the passed values. // If rotY and rotZ are NaN, rotate about Z (rotX=0, rotateY=0, rotateZ=rotX). // Otherwise use a rotation value of 0 for any passed NaN. - [Immutable] WebKitCSSMatrix rotate(in [Optional=CallWithDefaultValue] double rotX, - in [Optional=CallWithDefaultValue] double rotY, - in [Optional=CallWithDefaultValue] double rotZ); + [Immutable] WebKitCSSMatrix rotate(in [Optional=TreatAsUndefined] double rotX, + in [Optional=TreatAsUndefined] double rotY, + in [Optional=TreatAsUndefined] double rotZ); // Returns this matrix rotated about the passed axis by the passed angle. // Passing a NaN will use a value of 0. If the axis is (0,0,0) use a value // of (0,0,1). - [Immutable] WebKitCSSMatrix rotateAxisAngle(in [Optional=CallWithDefaultValue] double x, - in [Optional=CallWithDefaultValue] double y, - in [Optional=CallWithDefaultValue] double z, - in [Optional=CallWithDefaultValue] double angle); + [Immutable] WebKitCSSMatrix rotateAxisAngle(in [Optional=TreatAsUndefined] double x, + in [Optional=TreatAsUndefined] double y, + in [Optional=TreatAsUndefined] double z, + in [Optional=TreatAsUndefined] double angle); // Returns this matrix skewed along the X axis by the passed values. // Passing a NaN will use a value of 0. - [Immutable] WebKitCSSMatrix skewX(in [Optional=CallWithDefaultValue] double angle); + [Immutable] WebKitCSSMatrix skewX(in [Optional=TreatAsUndefined] double angle); // Returns this matrix skewed along the Y axis by the passed values. // Passing a NaN will use a value of 0. - [Immutable] WebKitCSSMatrix skewY(in [Optional=CallWithDefaultValue] double angle); + [Immutable] WebKitCSSMatrix skewY(in [Optional=TreatAsUndefined] double angle); [NotEnumerable] DOMString toString(); }; diff --git a/Source/WebCore/dom/CharacterData.idl b/Source/WebCore/dom/CharacterData.idl index dcf796a..ed6e613 100644 --- a/Source/WebCore/dom/CharacterData.idl +++ b/Source/WebCore/dom/CharacterData.idl @@ -26,24 +26,24 @@ module core { readonly attribute unsigned long length; - [ConvertNullStringTo=Null, ObjCLegacyUnnamedParameters] DOMString substringData(in [IsIndex,Optional=CallWithDefaultValue] unsigned long offset, - in [IsIndex,Optional=CallWithDefaultValue] unsigned long length) + [ConvertNullStringTo=Null, ObjCLegacyUnnamedParameters] DOMString substringData(in [IsIndex,Optional=TreatAsUndefined] unsigned long offset, + in [IsIndex,Optional=TreatAsUndefined] unsigned long length) raises(DOMException); - void appendData(in [Optional=CallWithDefaultValue] DOMString data) + void appendData(in [Optional=TreatAsUndefined] DOMString data) raises(DOMException); - [ObjCLegacyUnnamedParameters] void insertData(in [IsIndex,Optional=CallWithDefaultValue] unsigned long offset, - in [Optional=CallWithDefaultValue] DOMString data) + [ObjCLegacyUnnamedParameters] void insertData(in [IsIndex,Optional=TreatAsUndefined] unsigned long offset, + in [Optional=TreatAsUndefined] DOMString data) raises(DOMException); - [ObjCLegacyUnnamedParameters] void deleteData(in [IsIndex,Optional=CallWithDefaultValue] unsigned long offset, - in [IsIndex,Optional=CallWithDefaultValue] unsigned long length) + [ObjCLegacyUnnamedParameters] void deleteData(in [IsIndex,Optional=TreatAsUndefined] unsigned long offset, + in [IsIndex,Optional=TreatAsUndefined] unsigned long length) raises(DOMException); - [ObjCLegacyUnnamedParameters] void replaceData(in [IsIndex,Optional=CallWithDefaultValue] unsigned long offset, - in [IsIndex,Optional=CallWithDefaultValue] unsigned long length, - in [Optional=CallWithDefaultValue] DOMString data) + [ObjCLegacyUnnamedParameters] void replaceData(in [IsIndex,Optional=TreatAsUndefined] unsigned long offset, + in [IsIndex,Optional=TreatAsUndefined] unsigned long length, + in [Optional=TreatAsUndefined] DOMString data) raises(DOMException); }; diff --git a/Source/WebCore/dom/ClientRectList.idl b/Source/WebCore/dom/ClientRectList.idl index 45d6f48..816152d 100644 --- a/Source/WebCore/dom/ClientRectList.idl +++ b/Source/WebCore/dom/ClientRectList.idl @@ -30,7 +30,7 @@ module view { IndexedGetter ] ClientRectList { readonly attribute unsigned long length; - ClientRect item(in [IsIndex,Optional=CallWithDefaultValue] unsigned long index); + ClientRect item(in [IsIndex,Optional=TreatAsUndefined] unsigned long index); // FIXME: Fix list behavior to allow custom exceptions to be thrown. }; diff --git a/Source/WebCore/dom/CompositionEvent.idl b/Source/WebCore/dom/CompositionEvent.idl index a28292c..934e0b5 100644 --- a/Source/WebCore/dom/CompositionEvent.idl +++ b/Source/WebCore/dom/CompositionEvent.idl @@ -30,11 +30,11 @@ module events { readonly attribute DOMString data; - void initCompositionEvent(in [Optional=CallWithDefaultValue] DOMString typeArg, - in [Optional=CallWithDefaultValue] boolean canBubbleArg, - in [Optional=CallWithDefaultValue] boolean cancelableArg, - in [Optional=CallWithDefaultValue] DOMWindow viewArg, - in [Optional=CallWithDefaultValue] DOMString dataArg); + void initCompositionEvent(in [Optional=TreatAsUndefined] DOMString typeArg, + in [Optional=TreatAsUndefined] boolean canBubbleArg, + in [Optional=TreatAsUndefined] boolean cancelableArg, + in [Optional=TreatAsUndefined] DOMWindow viewArg, + in [Optional=TreatAsUndefined] DOMString dataArg); }; diff --git a/Source/WebCore/dom/CustomEvent.idl b/Source/WebCore/dom/CustomEvent.idl index 53a1ffc..0ecd460 100644 --- a/Source/WebCore/dom/CustomEvent.idl +++ b/Source/WebCore/dom/CustomEvent.idl @@ -32,10 +32,10 @@ module events { ] CustomEvent : Event { readonly attribute [InitializedByEventConstructor] DOMObject detail; - void initCustomEvent(in [Optional=CallWithDefaultValue] DOMString typeArg, - in [Optional=CallWithDefaultValue] boolean canBubbleArg, - in [Optional=CallWithDefaultValue] boolean cancelableArg, - in [Optional=CallWithDefaultValue] DOMObject detailArg); + void initCustomEvent(in [Optional=TreatAsUndefined] DOMString typeArg, + in [Optional=TreatAsUndefined] boolean canBubbleArg, + in [Optional=TreatAsUndefined] boolean cancelableArg, + in [Optional=TreatAsUndefined] DOMObject detailArg); }; #endif diff --git a/Source/WebCore/dom/DOMImplementation.idl b/Source/WebCore/dom/DOMImplementation.idl index 0a2368e..7324ce0 100644 --- a/Source/WebCore/dom/DOMImplementation.idl +++ b/Source/WebCore/dom/DOMImplementation.idl @@ -27,29 +27,29 @@ module core { // DOM Level 1 - [ObjCLegacyUnnamedParameters] boolean hasFeature(in [Optional=CallWithDefaultValue] DOMString feature, - in [TreatNullAs=NullString,Optional=CallWithDefaultValue] DOMString version); + [ObjCLegacyUnnamedParameters] boolean hasFeature(in [Optional=TreatAsUndefined] DOMString feature, + in [TreatNullAs=NullString,Optional=TreatAsUndefined] DOMString version); // DOM Level 2 - [ObjCLegacyUnnamedParameters] DocumentType createDocumentType(in [TreatNullAs=NullString, TreatUndefinedAs=NullString,Optional=CallWithDefaultValue] DOMString qualifiedName, - in [TreatNullAs=NullString, TreatUndefinedAs=NullString,Optional=CallWithDefaultValue] DOMString publicId, - in [TreatNullAs=NullString, TreatUndefinedAs=NullString,Optional=CallWithDefaultValue] DOMString systemId) + [ObjCLegacyUnnamedParameters] DocumentType createDocumentType(in [TreatNullAs=NullString, TreatUndefinedAs=NullString,Optional=TreatAsUndefined] DOMString qualifiedName, + in [TreatNullAs=NullString, TreatUndefinedAs=NullString,Optional=TreatAsUndefined] DOMString publicId, + in [TreatNullAs=NullString, TreatUndefinedAs=NullString,Optional=TreatAsUndefined] DOMString systemId) raises(DOMException); - [ObjCLegacyUnnamedParameters] Document createDocument(in [TreatNullAs=NullString,Optional=CallWithDefaultValue] DOMString namespaceURI, - in [TreatNullAs=NullString,Optional=CallWithDefaultValue] DOMString qualifiedName, - in [TreatNullAs=NullString,Optional=CallWithDefaultValue] DocumentType doctype) + [ObjCLegacyUnnamedParameters] Document createDocument(in [TreatNullAs=NullString,Optional=TreatAsUndefined] DOMString namespaceURI, + in [TreatNullAs=NullString,Optional=TreatAsUndefined] DOMString qualifiedName, + in [TreatNullAs=NullString,Optional=TreatAsUndefined] DocumentType doctype) raises(DOMException); // DOMImplementationCSS interface from DOM Level 2 CSS - [ObjCLegacyUnnamedParameters] CSSStyleSheet createCSSStyleSheet(in [Optional=CallWithDefaultValue] DOMString title, - in [Optional=CallWithDefaultValue] DOMString media) + [ObjCLegacyUnnamedParameters] CSSStyleSheet createCSSStyleSheet(in [Optional=TreatAsUndefined] DOMString title, + in [Optional=TreatAsUndefined] DOMString media) raises(DOMException); // HTMLDOMImplementation interface from DOM Level 2 HTML - HTMLDocument createHTMLDocument(in [Optional=CallWithDefaultValue] DOMString title); + HTMLDocument createHTMLDocument(in [Optional=TreatAsUndefined] DOMString title); }; } diff --git a/Source/WebCore/dom/DOMStringList.idl b/Source/WebCore/dom/DOMStringList.idl index 8238575..0640273 100644 --- a/Source/WebCore/dom/DOMStringList.idl +++ b/Source/WebCore/dom/DOMStringList.idl @@ -29,8 +29,8 @@ module core { IndexedGetter ] DOMStringList { readonly attribute unsigned long length; - [ConvertNullStringTo=Null] DOMString item(in [IsIndex,Optional=CallWithDefaultValue] unsigned long index); - boolean contains(in [Optional=CallWithDefaultValue] DOMString string); + [ConvertNullStringTo=Null] DOMString item(in [IsIndex,Optional=TreatAsUndefined] unsigned long index); + boolean contains(in [Optional=TreatAsUndefined] DOMString string); }; } diff --git a/Source/WebCore/dom/DataTransferItem.idl b/Source/WebCore/dom/DataTransferItem.idl index befd7e2..8306d28 100644 --- a/Source/WebCore/dom/DataTransferItem.idl +++ b/Source/WebCore/dom/DataTransferItem.idl @@ -36,7 +36,7 @@ module core { readonly attribute DOMString kind; readonly attribute DOMString type; - void getAsString(in [Callback,Optional=CallWithDefaultValue] StringCallback callback); + void getAsString(in [Callback,Optional=TreatAsUndefined] StringCallback callback); Blob getAsFile(); }; diff --git a/Source/WebCore/dom/DataTransferItemList.idl b/Source/WebCore/dom/DataTransferItemList.idl index 8fcc47d..a5df203 100644 --- a/Source/WebCore/dom/DataTransferItemList.idl +++ b/Source/WebCore/dom/DataTransferItemList.idl @@ -39,12 +39,12 @@ module core { #endif ] DataTransferItemList { readonly attribute long length; - DataTransferItem item(in [Optional=CallWithDefaultValue] unsigned long index); + DataTransferItem item(in [Optional=TreatAsUndefined] unsigned long index); void clear(); void add(in File file); - void add(in [Optional=CallWithDefaultValue] DOMString data, - in [Optional=CallWithDefaultValue] DOMString type) raises(DOMException); + void add(in [Optional=TreatAsUndefined] DOMString data, + in [Optional=TreatAsUndefined] DOMString type) raises(DOMException); }; } diff --git a/Source/WebCore/dom/DeviceMotionEvent.idl b/Source/WebCore/dom/DeviceMotionEvent.idl index fe1b750..3105009 100644 --- a/Source/WebCore/dom/DeviceMotionEvent.idl +++ b/Source/WebCore/dom/DeviceMotionEvent.idl @@ -32,13 +32,13 @@ module core { readonly attribute [Custom] Acceleration accelerationIncludingGravity; readonly attribute [Custom] RotationRate rotationRate; readonly attribute [Custom] double interval; - [Custom] void initDeviceMotionEvent(in [Optional=CallWithDefaultValue] DOMString type, - in [Optional=CallWithDefaultValue] boolean bubbles, - in [Optional=CallWithDefaultValue] boolean cancelable, - in [Optional=CallWithDefaultValue] Acceleration acceleration, - in [Optional=CallWithDefaultValue] Acceleration accelerationIncludingGravity, - in [Optional=CallWithDefaultValue] RotationRate rotationRate, - in [Optional=CallWithDefaultValue] double interval); + [Custom] void initDeviceMotionEvent(in [Optional=TreatAsUndefined] DOMString type, + in [Optional=TreatAsUndefined] boolean bubbles, + in [Optional=TreatAsUndefined] boolean cancelable, + in [Optional=TreatAsUndefined] Acceleration acceleration, + in [Optional=TreatAsUndefined] Acceleration accelerationIncludingGravity, + in [Optional=TreatAsUndefined] RotationRate rotationRate, + in [Optional=TreatAsUndefined] double interval); }; } diff --git a/Source/WebCore/dom/DeviceOrientationEvent.idl b/Source/WebCore/dom/DeviceOrientationEvent.idl index 11833be..c8c28d6 100644 --- a/Source/WebCore/dom/DeviceOrientationEvent.idl +++ b/Source/WebCore/dom/DeviceOrientationEvent.idl @@ -32,13 +32,13 @@ module core { readonly attribute [Custom] double beta; readonly attribute [Custom] double gamma; readonly attribute [Custom] boolean absolute; - [Custom] void initDeviceOrientationEvent(in [Optional=CallWithDefaultValue] DOMString type, - in [Optional=CallWithDefaultValue] boolean bubbles, - in [Optional=CallWithDefaultValue] boolean cancelable, - in [Optional=CallWithDefaultValue] double alpha, - in [Optional=CallWithDefaultValue] double beta, - in [Optional=CallWithDefaultValue] double gamma, - in [Optional=CallWithDefaultValue] boolean absolute); + [Custom] void initDeviceOrientationEvent(in [Optional=TreatAsUndefined] DOMString type, + in [Optional=TreatAsUndefined] boolean bubbles, + in [Optional=TreatAsUndefined] boolean cancelable, + in [Optional=TreatAsUndefined] double alpha, + in [Optional=TreatAsUndefined] double beta, + in [Optional=TreatAsUndefined] double gamma, + in [Optional=TreatAsUndefined] boolean absolute); }; } diff --git a/Source/WebCore/dom/Document.idl b/Source/WebCore/dom/Document.idl index de7b04d..d72dbab 100644 --- a/Source/WebCore/dom/Document.idl +++ b/Source/WebCore/dom/Document.idl @@ -31,36 +31,36 @@ module core { readonly attribute DOMImplementation implementation; readonly attribute Element documentElement; - [ReturnNewObject] Element createElement(in [TreatNullAs=NullString,Optional=CallWithDefaultValue] DOMString tagName) + [ReturnNewObject] Element createElement(in [TreatNullAs=NullString,Optional=TreatAsUndefined] DOMString tagName) raises (DOMException); DocumentFragment createDocumentFragment(); - [ReturnNewObject] Text createTextNode(in [Optional=CallWithDefaultValue] DOMString data); - [ReturnNewObject] Comment createComment(in [Optional=CallWithDefaultValue] DOMString data); - [ReturnNewObject] CDATASection createCDATASection(in [Optional=CallWithDefaultValue] DOMString data) + [ReturnNewObject] Text createTextNode(in [Optional=TreatAsUndefined] DOMString data); + [ReturnNewObject] Comment createComment(in [Optional=TreatAsUndefined] DOMString data); + [ReturnNewObject] CDATASection createCDATASection(in [Optional=TreatAsUndefined] DOMString data) raises(DOMException); - [ObjCLegacyUnnamedParameters, ReturnNewObject] ProcessingInstruction createProcessingInstruction(in [Optional=CallWithDefaultValue] DOMString target, - in [Optional=CallWithDefaultValue] DOMString data) + [ObjCLegacyUnnamedParameters, ReturnNewObject] ProcessingInstruction createProcessingInstruction(in [Optional=TreatAsUndefined] DOMString target, + in [Optional=TreatAsUndefined] DOMString data) raises (DOMException); - [ReturnNewObject] Attr createAttribute(in [Optional=CallWithDefaultValue] DOMString name) + [ReturnNewObject] Attr createAttribute(in [Optional=TreatAsUndefined] DOMString name) raises (DOMException); - [ReturnNewObject] EntityReference createEntityReference(in [Optional=CallWithDefaultValue] DOMString name) + [ReturnNewObject] EntityReference createEntityReference(in [Optional=TreatAsUndefined] DOMString name) raises(DOMException); - NodeList getElementsByTagName(in [Optional=CallWithDefaultValue] DOMString tagname); + NodeList getElementsByTagName(in [Optional=TreatAsUndefined] DOMString tagname); // Introduced in DOM Level 2: - [ObjCLegacyUnnamedParameters, ReturnNewObject] Node importNode(in [Optional=CallWithDefaultValue] Node importedNode, + [ObjCLegacyUnnamedParameters, ReturnNewObject] Node importNode(in [Optional=TreatAsUndefined] Node importedNode, in [Optional] boolean deep) raises (DOMException); - [ObjCLegacyUnnamedParameters, ReturnNewObject] Element createElementNS(in [TreatNullAs=NullString,Optional=CallWithDefaultValue] DOMString namespaceURI, - in [TreatNullAs=NullString,Optional=CallWithDefaultValue] DOMString qualifiedName) + [ObjCLegacyUnnamedParameters, ReturnNewObject] Element createElementNS(in [TreatNullAs=NullString,Optional=TreatAsUndefined] DOMString namespaceURI, + in [TreatNullAs=NullString,Optional=TreatAsUndefined] DOMString qualifiedName) raises (DOMException); - [ObjCLegacyUnnamedParameters, ReturnNewObject] Attr createAttributeNS(in [TreatNullAs=NullString,Optional=CallWithDefaultValue] DOMString namespaceURI, - in [TreatNullAs=NullString,Optional=CallWithDefaultValue] DOMString qualifiedName) + [ObjCLegacyUnnamedParameters, ReturnNewObject] Attr createAttributeNS(in [TreatNullAs=NullString,Optional=TreatAsUndefined] DOMString namespaceURI, + in [TreatNullAs=NullString,Optional=TreatAsUndefined] DOMString qualifiedName) raises (DOMException); - [ObjCLegacyUnnamedParameters] NodeList getElementsByTagNameNS(in [TreatNullAs=NullString,Optional=CallWithDefaultValue] DOMString namespaceURI, - in [Optional=CallWithDefaultValue] DOMString localName); - Element getElementById(in [Optional=CallWithDefaultValue] DOMString elementId); + [ObjCLegacyUnnamedParameters] NodeList getElementsByTagNameNS(in [TreatNullAs=NullString,Optional=TreatAsUndefined] DOMString namespaceURI, + in [Optional=TreatAsUndefined] DOMString localName); + Element getElementById(in [Optional=TreatAsUndefined] DOMString elementId); // DOM Level 3 Core @@ -72,14 +72,14 @@ module core { attribute boolean xmlStandalone setter raises (DOMException); - Node adoptNode(in [Optional=CallWithDefaultValue] Node source) + Node adoptNode(in [Optional=TreatAsUndefined] Node source) raises (DOMException); attribute [ConvertNullStringTo=Null, TreatNullAs=NullString] DOMString documentURI; // DOM Level 2 Events (DocumentEvents interface) - Event createEvent(in [Optional=CallWithDefaultValue] DOMString eventType) + Event createEvent(in [Optional=TreatAsUndefined] DOMString eventType) raises(DOMException); // DOM Level 2 Tranversal and Range (DocumentRange interface) @@ -88,15 +88,15 @@ module core { // DOM Level 2 Tranversal and Range (DocumentTraversal interface) - [ObjCLegacyUnnamedParameters] NodeIterator createNodeIterator(in [Optional=CallWithDefaultValue] Node root, - in [Optional=CallWithDefaultValue] unsigned long whatToShow, - in [Optional=CallWithDefaultValue] NodeFilter filter, - in [Optional=CallWithDefaultValue] boolean expandEntityReferences) + [ObjCLegacyUnnamedParameters] NodeIterator createNodeIterator(in [Optional=TreatAsUndefined] Node root, + in [Optional=TreatAsUndefined] unsigned long whatToShow, + in [Optional=TreatAsUndefined] NodeFilter filter, + in [Optional=TreatAsUndefined] boolean expandEntityReferences) raises(DOMException); - [ObjCLegacyUnnamedParameters] TreeWalker createTreeWalker(in [Optional=CallWithDefaultValue] Node root, - in [Optional=CallWithDefaultValue] unsigned long whatToShow, - in [Optional=CallWithDefaultValue] NodeFilter filter, - in [Optional=CallWithDefaultValue] boolean expandEntityReferences) + [ObjCLegacyUnnamedParameters] TreeWalker createTreeWalker(in [Optional=TreatAsUndefined] Node root, + in [Optional=TreatAsUndefined] unsigned long whatToShow, + in [Optional=TreatAsUndefined] NodeFilter filter, + in [Optional=TreatAsUndefined] boolean expandEntityReferences) raises(DOMException); // DOM Level 2 Abstract Views (DocumentView interface) @@ -109,26 +109,26 @@ module core { // DOM Level 2 Style (DocumentCSS interface) - [ObjCLegacyUnnamedParameters] CSSStyleDeclaration getOverrideStyle(in [Optional=CallWithDefaultValue] Element element, - in [Optional=CallWithDefaultValue] DOMString pseudoElement); + [ObjCLegacyUnnamedParameters] CSSStyleDeclaration getOverrideStyle(in [Optional=TreatAsUndefined] Element element, + in [Optional=TreatAsUndefined] DOMString pseudoElement); // DOM Level 3 XPath (XPathEvaluator interface) - [ObjCLegacyUnnamedParameters] XPathExpression createExpression(in [Optional=CallWithDefaultValue] DOMString expression, - in [Optional=CallWithDefaultValue] XPathNSResolver resolver) + [ObjCLegacyUnnamedParameters] XPathExpression createExpression(in [Optional=TreatAsUndefined] DOMString expression, + in [Optional=TreatAsUndefined] XPathNSResolver resolver) raises(DOMException); XPathNSResolver createNSResolver(in Node nodeResolver); - [ObjCLegacyUnnamedParameters, V8Custom] XPathResult evaluate(in [Optional=CallWithDefaultValue] DOMString expression, - in [Optional=CallWithDefaultValue] Node contextNode, - in [Optional=CallWithDefaultValue] XPathNSResolver resolver, - in [Optional=CallWithDefaultValue] unsigned short type, - in [Optional=CallWithDefaultValue] XPathResult inResult) + [ObjCLegacyUnnamedParameters, V8Custom] XPathResult evaluate(in [Optional=TreatAsUndefined] DOMString expression, + in [Optional=TreatAsUndefined] Node contextNode, + in [Optional=TreatAsUndefined] XPathNSResolver resolver, + in [Optional=TreatAsUndefined] unsigned short type, + in [Optional=TreatAsUndefined] XPathResult inResult) raises(DOMException); // Common extensions - boolean execCommand(in [Optional=CallWithDefaultValue] DOMString command, - in [Optional=CallWithDefaultValue] boolean userInterface, - in [TreatNullAs=NullString, TreatUndefinedAs=NullString,Optional=CallWithDefaultValue] DOMString value); + boolean execCommand(in [Optional=TreatAsUndefined] DOMString command, + in [Optional=TreatAsUndefined] boolean userInterface, + in [TreatNullAs=NullString, TreatUndefinedAs=NullString,Optional=TreatAsUndefined] DOMString value); #if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C // FIXME: remove the these two versions once [Optional] is implemented for Objective-C. @@ -137,11 +137,11 @@ module core { boolean execCommand(in DOMString command); #endif - boolean queryCommandEnabled(in [Optional=CallWithDefaultValue] DOMString command); - boolean queryCommandIndeterm(in [Optional=CallWithDefaultValue] DOMString command); - boolean queryCommandState(in [Optional=CallWithDefaultValue] DOMString command); - boolean queryCommandSupported(in [Optional=CallWithDefaultValue] DOMString command); - [ConvertNullStringTo=False] DOMString queryCommandValue(in [Optional=CallWithDefaultValue] DOMString command); + boolean queryCommandEnabled(in [Optional=TreatAsUndefined] DOMString command); + boolean queryCommandIndeterm(in [Optional=TreatAsUndefined] DOMString command); + boolean queryCommandState(in [Optional=TreatAsUndefined] DOMString command); + boolean queryCommandSupported(in [Optional=TreatAsUndefined] DOMString command); + [ConvertNullStringTo=False] DOMString queryCommandValue(in [Optional=TreatAsUndefined] DOMString command); // Moved down from HTMLDocument @@ -172,10 +172,10 @@ module core { readonly attribute HTMLCollection anchors; readonly attribute DOMString lastModified; - NodeList getElementsByName(in [Optional=CallWithDefaultValue] DOMString elementName); + NodeList getElementsByName(in [Optional=TreatAsUndefined] DOMString elementName); #if defined(ENABLE_MICRODATA) && ENABLE_MICRODATA - NodeList getItems(in [TreatNullAs=NullString, TreatUndefinedAs=NullString, Optional=CallWithDefaultValue] DOMString typeNames); + NodeList getItems(in [TreatNullAs=NullString, TreatUndefinedAs=NullString, Optional=TreatAsUndefined] DOMString typeNames); #endif #if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT @@ -188,10 +188,10 @@ module core { readonly attribute [ConvertNullStringTo=Undefined] DOMString defaultCharset; readonly attribute [ConvertNullStringTo=Undefined] DOMString readyState; - Element elementFromPoint(in [Optional=CallWithDefaultValue] long x, - in [Optional=CallWithDefaultValue] long y); - Range caretRangeFromPoint(in [Optional=CallWithDefaultValue] long x, - in [Optional=CallWithDefaultValue] long y); + Element elementFromPoint(in [Optional=TreatAsUndefined] long x, + in [Optional=TreatAsUndefined] long y); + Range caretRangeFromPoint(in [Optional=TreatAsUndefined] long x, + in [Optional=TreatAsUndefined] long y); // Mozilla extensions #if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT @@ -230,7 +230,7 @@ module core { #endif // HTML 5 - NodeList getElementsByClassName(in [Optional=CallWithDefaultValue] DOMString tagname); + NodeList getElementsByClassName(in [Optional=TreatAsUndefined] DOMString tagname); readonly attribute DOMString compatMode; @@ -325,17 +325,17 @@ module core { #endif #if defined(ENABLE_TOUCH_EVENTS) && ENABLE_TOUCH_EVENTS - [ReturnNewObject, V8EnabledAtRuntime] Touch createTouch(in [Optional=CallWithDefaultValue] DOMWindow window, - in [Optional=CallWithDefaultValue] EventTarget target, - in [Optional=CallWithDefaultValue] long identifier, - in [Optional=CallWithDefaultValue] long pageX, - in [Optional=CallWithDefaultValue] long pageY, - in [Optional=CallWithDefaultValue] long screenX, - in [Optional=CallWithDefaultValue] long screenY, - in [Optional=CallWithDefaultValue] long webkitRadiusX, - in [Optional=CallWithDefaultValue] long webkitRadiusY, - in [Optional=CallWithDefaultValue] float webkitRotationAngle, - in [Optional=CallWithDefaultValue] float webkitForce) + [ReturnNewObject, V8EnabledAtRuntime] Touch createTouch(in [Optional=TreatAsUndefined] DOMWindow window, + in [Optional=TreatAsUndefined] EventTarget target, + in [Optional=TreatAsUndefined] long identifier, + in [Optional=TreatAsUndefined] long pageX, + in [Optional=TreatAsUndefined] long pageY, + in [Optional=TreatAsUndefined] long screenX, + in [Optional=TreatAsUndefined] long screenY, + in [Optional=TreatAsUndefined] long webkitRadiusX, + in [Optional=TreatAsUndefined] long webkitRadiusY, + in [Optional=TreatAsUndefined] float webkitRotationAngle, + in [Optional=TreatAsUndefined] float webkitForce) raises (DOMException); [ReturnNewObject, V8EnabledAtRuntime, Custom] TouchList createTouchList() raises (DOMException); diff --git a/Source/WebCore/dom/Element.idl b/Source/WebCore/dom/Element.idl index 20d4c8e..ae9fe0b 100644 --- a/Source/WebCore/dom/Element.idl +++ b/Source/WebCore/dom/Element.idl @@ -29,37 +29,37 @@ module core { readonly attribute [ConvertNullStringTo=Null] DOMString tagName; - [ConvertNullStringTo=Null] DOMString getAttribute(in [Optional=CallWithDefaultValue] DOMString name); - [ObjCLegacyUnnamedParameters] void setAttribute(in [Optional=CallWithDefaultValue] DOMString name, - in [Optional=CallWithDefaultValue] DOMString value) + [ConvertNullStringTo=Null] DOMString getAttribute(in [Optional=TreatAsUndefined] DOMString name); + [ObjCLegacyUnnamedParameters] void setAttribute(in [Optional=TreatAsUndefined] DOMString name, + in [Optional=TreatAsUndefined] DOMString value) raises(DOMException); - void removeAttribute(in [Optional=CallWithDefaultValue] DOMString name); - Attr getAttributeNode(in [Optional=CallWithDefaultValue] DOMString name); - Attr setAttributeNode(in [Optional=CallWithDefaultValue] Attr newAttr) + void removeAttribute(in [Optional=TreatAsUndefined] DOMString name); + Attr getAttributeNode(in [Optional=TreatAsUndefined] DOMString name); + Attr setAttributeNode(in [Optional=TreatAsUndefined] Attr newAttr) raises(DOMException); - Attr removeAttributeNode(in [Optional=CallWithDefaultValue] Attr oldAttr) + Attr removeAttributeNode(in [Optional=TreatAsUndefined] Attr oldAttr) raises(DOMException); - NodeList getElementsByTagName(in [Optional=CallWithDefaultValue] DOMString name); + NodeList getElementsByTagName(in [Optional=TreatAsUndefined] DOMString name); // DOM Level 2 Core - [ObjCLegacyUnnamedParameters] DOMString getAttributeNS(in [TreatNullAs=NullString,Optional=CallWithDefaultValue] DOMString namespaceURI, - in [Optional=CallWithDefaultValue] DOMString localName); - [ObjCLegacyUnnamedParameters] void setAttributeNS(in [TreatNullAs=NullString,Optional=CallWithDefaultValue] DOMString namespaceURI, - in [Optional=CallWithDefaultValue] DOMString qualifiedName, - in [Optional=CallWithDefaultValue] DOMString value) + [ObjCLegacyUnnamedParameters] DOMString getAttributeNS(in [TreatNullAs=NullString,Optional=TreatAsUndefined] DOMString namespaceURI, + in [Optional=TreatAsUndefined] DOMString localName); + [ObjCLegacyUnnamedParameters] void setAttributeNS(in [TreatNullAs=NullString,Optional=TreatAsUndefined] DOMString namespaceURI, + in [Optional=TreatAsUndefined] DOMString qualifiedName, + in [Optional=TreatAsUndefined] DOMString value) raises(DOMException); [ObjCLegacyUnnamedParameters] void removeAttributeNS(in [TreatNullAs=NullString] DOMString namespaceURI, in DOMString localName); - [ObjCLegacyUnnamedParameters] NodeList getElementsByTagNameNS(in [TreatNullAs=NullString,Optional=CallWithDefaultValue] DOMString namespaceURI, - in [Optional=CallWithDefaultValue] DOMString localName); - [ObjCLegacyUnnamedParameters] Attr getAttributeNodeNS(in [TreatNullAs=NullString,Optional=CallWithDefaultValue] DOMString namespaceURI, - in [Optional=CallWithDefaultValue] DOMString localName); - Attr setAttributeNodeNS(in [Optional=CallWithDefaultValue] Attr newAttr) + [ObjCLegacyUnnamedParameters] NodeList getElementsByTagNameNS(in [TreatNullAs=NullString,Optional=TreatAsUndefined] DOMString namespaceURI, + in [Optional=TreatAsUndefined] DOMString localName); + [ObjCLegacyUnnamedParameters] Attr getAttributeNodeNS(in [TreatNullAs=NullString,Optional=TreatAsUndefined] DOMString namespaceURI, + in [Optional=TreatAsUndefined] DOMString localName); + Attr setAttributeNodeNS(in [Optional=TreatAsUndefined] Attr newAttr) raises(DOMException); boolean hasAttribute(in DOMString name); - [ObjCLegacyUnnamedParameters] boolean hasAttributeNS(in [TreatNullAs=NullString,Optional=CallWithDefaultValue] DOMString namespaceURI, - in [Optional=CallWithDefaultValue] DOMString localName); + [ObjCLegacyUnnamedParameters] boolean hasAttributeNS(in [TreatNullAs=NullString,Optional=TreatAsUndefined] DOMString namespaceURI, + in [Optional=TreatAsUndefined] DOMString localName); readonly attribute CSSStyleDeclaration style; @@ -86,15 +86,15 @@ module core { // WebKit extensions void scrollIntoViewIfNeeded(in [Optional] boolean centerIfNeeded); - void scrollByLines(in [Optional=CallWithDefaultValue] long lines); - void scrollByPages(in [Optional=CallWithDefaultValue] long pages); + void scrollByLines(in [Optional=TreatAsUndefined] long lines); + void scrollByPages(in [Optional=TreatAsUndefined] long pages); #if defined(ENABLE_ANIMATION_API) && ENABLE_ANIMATION_API WebKitAnimationList webkitGetAnimations(); #endif // HTML 5 - NodeList getElementsByClassName(in [Optional=CallWithDefaultValue] DOMString name); + NodeList getElementsByClassName(in [Optional=TreatAsUndefined] DOMString name); #if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT readonly attribute DOMStringMap dataset; @@ -107,7 +107,7 @@ module core { raises(DOMException); // WebKit extension, pending specification. - boolean webkitMatchesSelector(in [Optional=CallWithDefaultValue] DOMString selectors) + boolean webkitMatchesSelector(in [Optional=TreatAsUndefined] DOMString selectors) raises(DOMException); // ElementTraversal API @@ -130,7 +130,7 @@ module core { #if defined(ENABLE_FULLSCREEN_API) && ENABLE_FULLSCREEN_API const unsigned short ALLOW_KEYBOARD_INPUT = 1; - [V8EnabledAtRuntime] void webkitRequestFullScreen(in [Optional=CallWithDefaultValue] unsigned short flags); + [V8EnabledAtRuntime] void webkitRequestFullScreen(in [Optional=TreatAsUndefined] unsigned short flags); #endif #if !defined(LANGUAGE_OBJECTIVE_C) || !LANGUAGE_OBJECTIVE_C diff --git a/Source/WebCore/dom/Event.idl b/Source/WebCore/dom/Event.idl index 94d4542..f135cbd 100644 --- a/Source/WebCore/dom/Event.idl +++ b/Source/WebCore/dom/Event.idl @@ -63,9 +63,9 @@ module events { void stopPropagation(); void preventDefault(); - [ObjCLegacyUnnamedParameters] void initEvent(in [Optional=CallWithDefaultValue] DOMString eventTypeArg, - in [Optional=CallWithDefaultValue] boolean canBubbleArg, - in [Optional=CallWithDefaultValue] boolean cancelableArg); + [ObjCLegacyUnnamedParameters] void initEvent(in [Optional=TreatAsUndefined] DOMString eventTypeArg, + in [Optional=TreatAsUndefined] boolean canBubbleArg, + in [Optional=TreatAsUndefined] boolean cancelableArg); // DOM Level 3 Additions. readonly attribute boolean defaultPrevented; diff --git a/Source/WebCore/dom/HashChangeEvent.idl b/Source/WebCore/dom/HashChangeEvent.idl index b2b4887..a5776f3 100644 --- a/Source/WebCore/dom/HashChangeEvent.idl +++ b/Source/WebCore/dom/HashChangeEvent.idl @@ -23,11 +23,11 @@ module events { interface [ ConstructorTemplate=Event ] HashChangeEvent : Event { - void initHashChangeEvent(in [Optional=CallWithDefaultValue] DOMString type, - in [Optional=CallWithDefaultValue] boolean canBubble, - in [Optional=CallWithDefaultValue] boolean cancelable, - in [Optional=CallWithDefaultValue] DOMString oldURL, - in [Optional=CallWithDefaultValue] DOMString newURL); + void initHashChangeEvent(in [Optional=TreatAsUndefined] DOMString type, + in [Optional=TreatAsUndefined] boolean canBubble, + in [Optional=TreatAsUndefined] boolean cancelable, + in [Optional=TreatAsUndefined] DOMString oldURL, + in [Optional=TreatAsUndefined] DOMString newURL); readonly attribute [InitializedByEventConstructor] DOMString oldURL; readonly attribute [InitializedByEventConstructor] DOMString newURL; }; diff --git a/Source/WebCore/dom/KeyboardEvent.idl b/Source/WebCore/dom/KeyboardEvent.idl index e71361f..62d57f7 100644 --- a/Source/WebCore/dom/KeyboardEvent.idl +++ b/Source/WebCore/dom/KeyboardEvent.idl @@ -40,37 +40,37 @@ module events { readonly attribute boolean altGraphKey; #if !defined(LANGUAGE_JAVASCRIPT) || !LANGUAGE_JAVASCRIPT - boolean getModifierState(in [Optional=CallWithDefaultValue] DOMString keyIdentifierArg); + boolean getModifierState(in [Optional=TreatAsUndefined] DOMString keyIdentifierArg); #endif // FIXME: this does not match the version in the DOM spec. - void initKeyboardEvent(in [Optional=CallWithDefaultValue] DOMString type, - in [Optional=CallWithDefaultValue] boolean canBubble, - in [Optional=CallWithDefaultValue] boolean cancelable, - in [Optional=CallWithDefaultValue] DOMWindow view, - in [Optional=CallWithDefaultValue] DOMString keyIdentifier, - in [Optional=CallWithDefaultValue] unsigned long keyLocation, - in [Optional=CallWithDefaultValue] boolean ctrlKey, - in [Optional=CallWithDefaultValue] boolean altKey, - in [Optional=CallWithDefaultValue] boolean shiftKey, - in [Optional=CallWithDefaultValue] boolean metaKey, - in [Optional=CallWithDefaultValue] boolean altGraphKey); + void initKeyboardEvent(in [Optional=TreatAsUndefined] DOMString type, + in [Optional=TreatAsUndefined] boolean canBubble, + in [Optional=TreatAsUndefined] boolean cancelable, + in [Optional=TreatAsUndefined] DOMWindow view, + in [Optional=TreatAsUndefined] DOMString keyIdentifier, + in [Optional=TreatAsUndefined] unsigned long keyLocation, + in [Optional=TreatAsUndefined] boolean ctrlKey, + in [Optional=TreatAsUndefined] boolean altKey, + in [Optional=TreatAsUndefined] boolean shiftKey, + in [Optional=TreatAsUndefined] boolean metaKey, + in [Optional=TreatAsUndefined] boolean altGraphKey); // WebKit Extensions #if !defined(LANGUAGE_JAVASCRIPT) || !LANGUAGE_JAVASCRIPT readonly attribute long keyCode; readonly attribute long charCode; - void initKeyboardEvent(in [Optional=CallWithDefaultValue] DOMString type, - in [Optional=CallWithDefaultValue] boolean canBubble, - in [Optional=CallWithDefaultValue] boolean cancelable, - in [Optional=CallWithDefaultValue] DOMWindow view, - in [Optional=CallWithDefaultValue] DOMString keyIdentifier, - in [Optional=CallWithDefaultValue] unsigned long keyLocation, - in [Optional=CallWithDefaultValue] boolean ctrlKey, - in [Optional=CallWithDefaultValue] boolean altKey, - in [Optional=CallWithDefaultValue] boolean shiftKey, - in [Optional=CallWithDefaultValue] boolean metaKey); + void initKeyboardEvent(in [Optional=TreatAsUndefined] DOMString type, + in [Optional=TreatAsUndefined] boolean canBubble, + in [Optional=TreatAsUndefined] boolean cancelable, + in [Optional=TreatAsUndefined] DOMWindow view, + in [Optional=TreatAsUndefined] DOMString keyIdentifier, + in [Optional=TreatAsUndefined] unsigned long keyLocation, + in [Optional=TreatAsUndefined] boolean ctrlKey, + in [Optional=TreatAsUndefined] boolean altKey, + in [Optional=TreatAsUndefined] boolean shiftKey, + in [Optional=TreatAsUndefined] boolean metaKey); #endif }; diff --git a/Source/WebCore/dom/MessageEvent.idl b/Source/WebCore/dom/MessageEvent.idl index 1232359..bf9379e 100644 --- a/Source/WebCore/dom/MessageEvent.idl +++ b/Source/WebCore/dom/MessageEvent.idl @@ -38,23 +38,23 @@ module events { readonly attribute [InitializedByEventConstructor, CachedAttribute, CustomGetter] DOMObject data; readonly attribute [InitializedByEventConstructor, CustomGetter] Array ports; - [Custom] void initMessageEvent(in [Optional=CallWithDefaultValue] DOMString typeArg, - in [Optional=CallWithDefaultValue] boolean canBubbleArg, - in [Optional=CallWithDefaultValue] boolean cancelableArg, - in [Optional=CallWithDefaultValue] DOMObject dataArg, - in [Optional=CallWithDefaultValue] DOMString originArg, - in [Optional=CallWithDefaultValue] DOMString lastEventIdArg, - in [Optional=CallWithDefaultValue] DOMWindow sourceArg, - in [Optional=CallWithDefaultValue] Array messagePorts); + [Custom] void initMessageEvent(in [Optional=TreatAsUndefined] DOMString typeArg, + in [Optional=TreatAsUndefined] boolean canBubbleArg, + in [Optional=TreatAsUndefined] boolean cancelableArg, + in [Optional=TreatAsUndefined] DOMObject dataArg, + in [Optional=TreatAsUndefined] DOMString originArg, + in [Optional=TreatAsUndefined] DOMString lastEventIdArg, + in [Optional=TreatAsUndefined] DOMWindow sourceArg, + in [Optional=TreatAsUndefined] Array messagePorts); - [Custom] void webkitInitMessageEvent(in [Optional=CallWithDefaultValue] DOMString typeArg, - in [Optional=CallWithDefaultValue] boolean canBubbleArg, - in [Optional=CallWithDefaultValue] boolean cancelableArg, - in [Optional=CallWithDefaultValue] DOMObject dataArg, - in [Optional=CallWithDefaultValue] DOMString originArg, - in [Optional=CallWithDefaultValue] DOMString lastEventIdArg, - in [Optional=CallWithDefaultValue] DOMWindow sourceArg, - in [Optional=CallWithDefaultValue] Array transferables); + [Custom] void webkitInitMessageEvent(in [Optional=TreatAsUndefined] DOMString typeArg, + in [Optional=TreatAsUndefined] boolean canBubbleArg, + in [Optional=TreatAsUndefined] boolean cancelableArg, + in [Optional=TreatAsUndefined] DOMObject dataArg, + in [Optional=TreatAsUndefined] DOMString originArg, + in [Optional=TreatAsUndefined] DOMString lastEventIdArg, + in [Optional=TreatAsUndefined] DOMWindow sourceArg, + in [Optional=TreatAsUndefined] Array transferables); #else // Code generator for ObjC bindings does not support custom bindings, thus there is no good way to // return a variant value. As workaround, expose the data attribute as SerializedScriptValue. @@ -63,14 +63,14 @@ module events { // There's no good way to expose an array via the ObjC bindings, so for now just expose a single port. readonly attribute MessagePort messagePort; - void initMessageEvent(in [Optional=CallWithDefaultValue] DOMString typeArg, - in [Optional=CallWithDefaultValue] boolean canBubbleArg, - in [Optional=CallWithDefaultValue] boolean cancelableArg, - in [Optional=CallWithDefaultValue] SerializedScriptValue dataArg, - in [Optional=CallWithDefaultValue] DOMString originArg, - in [Optional=CallWithDefaultValue] DOMString lastEventIdArg, - in [Optional=CallWithDefaultValue] DOMWindow sourceArg, - in [Optional=CallWithDefaultValue] MessagePort messagePort); + void initMessageEvent(in [Optional=TreatAsUndefined] DOMString typeArg, + in [Optional=TreatAsUndefined] boolean canBubbleArg, + in [Optional=TreatAsUndefined] boolean cancelableArg, + in [Optional=TreatAsUndefined] SerializedScriptValue dataArg, + in [Optional=TreatAsUndefined] DOMString originArg, + in [Optional=TreatAsUndefined] DOMString lastEventIdArg, + in [Optional=TreatAsUndefined] DOMWindow sourceArg, + in [Optional=TreatAsUndefined] MessagePort messagePort); #endif }; diff --git a/Source/WebCore/dom/MouseEvent.idl b/Source/WebCore/dom/MouseEvent.idl index 3ece01c..4d62b6c 100644 --- a/Source/WebCore/dom/MouseEvent.idl +++ b/Source/WebCore/dom/MouseEvent.idl @@ -34,21 +34,21 @@ module events { readonly attribute unsigned short button; readonly attribute EventTarget relatedTarget; - [ObjCLegacyUnnamedParameters] void initMouseEvent(in [Optional=CallWithDefaultValue] DOMString type, - in [Optional=CallWithDefaultValue] boolean canBubble, - in [Optional=CallWithDefaultValue] boolean cancelable, - in [Optional=CallWithDefaultValue] DOMWindow view, - in [Optional=CallWithDefaultValue] long detail, - in [Optional=CallWithDefaultValue] long screenX, - in [Optional=CallWithDefaultValue] long screenY, - in [Optional=CallWithDefaultValue] long clientX, - in [Optional=CallWithDefaultValue] long clientY, - in [Optional=CallWithDefaultValue] boolean ctrlKey, - in [Optional=CallWithDefaultValue] boolean altKey, - in [Optional=CallWithDefaultValue] boolean shiftKey, - in [Optional=CallWithDefaultValue] boolean metaKey, - in [Optional=CallWithDefaultValue] unsigned short button, - in [Optional=CallWithDefaultValue] EventTarget relatedTarget); + [ObjCLegacyUnnamedParameters] void initMouseEvent(in [Optional=TreatAsUndefined] DOMString type, + in [Optional=TreatAsUndefined] boolean canBubble, + in [Optional=TreatAsUndefined] boolean cancelable, + in [Optional=TreatAsUndefined] DOMWindow view, + in [Optional=TreatAsUndefined] long detail, + in [Optional=TreatAsUndefined] long screenX, + in [Optional=TreatAsUndefined] long screenY, + in [Optional=TreatAsUndefined] long clientX, + in [Optional=TreatAsUndefined] long clientY, + in [Optional=TreatAsUndefined] boolean ctrlKey, + in [Optional=TreatAsUndefined] boolean altKey, + in [Optional=TreatAsUndefined] boolean shiftKey, + in [Optional=TreatAsUndefined] boolean metaKey, + in [Optional=TreatAsUndefined] unsigned short button, + in [Optional=TreatAsUndefined] EventTarget relatedTarget); // extensions readonly attribute long offsetX; diff --git a/Source/WebCore/dom/MutationEvent.idl b/Source/WebCore/dom/MutationEvent.idl index 5aee2e5..6c4cb83 100644 --- a/Source/WebCore/dom/MutationEvent.idl +++ b/Source/WebCore/dom/MutationEvent.idl @@ -33,14 +33,14 @@ module events { readonly attribute DOMString attrName; readonly attribute unsigned short attrChange; - [ObjCLegacyUnnamedParameters] void initMutationEvent(in [Optional=CallWithDefaultValue] DOMString type, - in [Optional=CallWithDefaultValue] boolean canBubble, - in [Optional=CallWithDefaultValue] boolean cancelable, - in [Optional=CallWithDefaultValue] Node relatedNode, - in [Optional=CallWithDefaultValue] DOMString prevValue, - in [Optional=CallWithDefaultValue] DOMString newValue, - in [Optional=CallWithDefaultValue] DOMString attrName, - in [Optional=CallWithDefaultValue] unsigned short attrChange); + [ObjCLegacyUnnamedParameters] void initMutationEvent(in [Optional=TreatAsUndefined] DOMString type, + in [Optional=TreatAsUndefined] boolean canBubble, + in [Optional=TreatAsUndefined] boolean cancelable, + in [Optional=TreatAsUndefined] Node relatedNode, + in [Optional=TreatAsUndefined] DOMString prevValue, + in [Optional=TreatAsUndefined] DOMString newValue, + in [Optional=TreatAsUndefined] DOMString attrName, + in [Optional=TreatAsUndefined] unsigned short attrChange); }; diff --git a/Source/WebCore/dom/NamedNodeMap.idl b/Source/WebCore/dom/NamedNodeMap.idl index 3c07a11..4f927d3 100644 --- a/Source/WebCore/dom/NamedNodeMap.idl +++ b/Source/WebCore/dom/NamedNodeMap.idl @@ -27,31 +27,31 @@ module core { NamedGetter ] NamedNodeMap { - Node getNamedItem(in [Optional=CallWithDefaultValue] DOMString name); + Node getNamedItem(in [Optional=TreatAsUndefined] DOMString name); - Node setNamedItem(in [Optional=CallWithDefaultValue] Node node) + Node setNamedItem(in [Optional=TreatAsUndefined] Node node) raises(DOMException); - Node removeNamedItem(in [Optional=CallWithDefaultValue] DOMString name) + Node removeNamedItem(in [Optional=TreatAsUndefined] DOMString name) raises(DOMException); - Node item(in [Optional=CallWithDefaultValue] unsigned long index); + Node item(in [Optional=TreatAsUndefined] unsigned long index); readonly attribute unsigned long length; // Introduced in DOM Level 2: - [ObjCLegacyUnnamedParameters] Node getNamedItemNS(in [TreatNullAs=NullString,Optional=CallWithDefaultValue] DOMString namespaceURI, - in [Optional=CallWithDefaultValue] DOMString localName) + [ObjCLegacyUnnamedParameters] Node getNamedItemNS(in [TreatNullAs=NullString,Optional=TreatAsUndefined] DOMString namespaceURI, + in [Optional=TreatAsUndefined] DOMString localName) // FIXME: the implementation does take an exceptioncode parameter. /*raises(DOMException)*/; - Node setNamedItemNS(in [Optional=CallWithDefaultValue] Node node) + Node setNamedItemNS(in [Optional=TreatAsUndefined] Node node) raises(DOMException); - [ObjCLegacyUnnamedParameters] Node removeNamedItemNS(in [TreatNullAs=NullString,Optional=CallWithDefaultValue] DOMString namespaceURI, - in [Optional=CallWithDefaultValue] DOMString localName) + [ObjCLegacyUnnamedParameters] Node removeNamedItemNS(in [TreatNullAs=NullString,Optional=TreatAsUndefined] DOMString namespaceURI, + in [Optional=TreatAsUndefined] DOMString localName) raises(DOMException); }; diff --git a/Source/WebCore/dom/Node.idl b/Source/WebCore/dom/Node.idl index b67be68..99faf35 100644 --- a/Source/WebCore/dom/Node.idl +++ b/Source/WebCore/dom/Node.idl @@ -79,13 +79,13 @@ module core { raises(DOMException); boolean hasChildNodes(); - Node cloneNode(in [Optional=CallWithDefaultValue] boolean deep); + Node cloneNode(in [Optional=TreatAsUndefined] boolean deep); void normalize(); // Introduced in DOM Level 2: - [ObjCLegacyUnnamedParameters] boolean isSupported(in [Optional=CallWithDefaultValue] DOMString feature, - in [TreatNullAs=NullString,Optional=CallWithDefaultValue] DOMString version); + [ObjCLegacyUnnamedParameters] boolean isSupported(in [Optional=TreatAsUndefined] DOMString feature, + in [TreatNullAs=NullString,Optional=TreatAsUndefined] DOMString version); readonly attribute [ConvertNullStringTo=Null] DOMString namespaceURI; attribute [ConvertNullStringTo=Null, TreatNullAs=NullString] DOMString prefix @@ -102,11 +102,11 @@ module core { attribute [ConvertNullStringTo=Null, TreatNullAs=NullString] DOMString textContent setter raises(DOMException); - boolean isSameNode(in [Optional=CallWithDefaultValue] Node other); - boolean isEqualNode(in [Optional=CallWithDefaultValue] Node other); - [ConvertNullStringTo=Null] DOMString lookupPrefix(in [TreatNullAs=NullString,Optional=CallWithDefaultValue] DOMString namespaceURI); - boolean isDefaultNamespace(in [TreatNullAs=NullString,Optional=CallWithDefaultValue] DOMString namespaceURI); - [ConvertNullStringTo=Null] DOMString lookupNamespaceURI(in [TreatNullAs=NullString,Optional=CallWithDefaultValue] DOMString prefix); + boolean isSameNode(in [Optional=TreatAsUndefined] Node other); + boolean isEqualNode(in [Optional=TreatAsUndefined] Node other); + [ConvertNullStringTo=Null] DOMString lookupPrefix(in [TreatNullAs=NullString,Optional=TreatAsUndefined] DOMString namespaceURI); + boolean isDefaultNamespace(in [TreatNullAs=NullString,Optional=TreatAsUndefined] DOMString namespaceURI); + [ConvertNullStringTo=Null] DOMString lookupNamespaceURI(in [TreatNullAs=NullString,Optional=TreatAsUndefined] DOMString prefix); // DocumentPosition const unsigned short DOCUMENT_POSITION_DISCONNECTED = 0x01; @@ -116,10 +116,10 @@ module core { const unsigned short DOCUMENT_POSITION_CONTAINED_BY = 0x10; const unsigned short DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 0x20; - unsigned short compareDocumentPosition(in [Optional=CallWithDefaultValue] Node other); + unsigned short compareDocumentPosition(in [Optional=TreatAsUndefined] Node other); // Introduced in DOM4 - boolean contains(in [Optional=CallWithDefaultValue] Node other); + boolean contains(in [Optional=TreatAsUndefined] Node other); #if 0 DOMObject getFeature(in DOMString feature, diff --git a/Source/WebCore/dom/NodeFilter.idl b/Source/WebCore/dom/NodeFilter.idl index 8edef0e..c7112cb 100644 --- a/Source/WebCore/dom/NodeFilter.idl +++ b/Source/WebCore/dom/NodeFilter.idl @@ -47,7 +47,7 @@ module traversal { const unsigned long SHOW_DOCUMENT_FRAGMENT = 0x00000400; const unsigned long SHOW_NOTATION = 0x00000800; - [CallWith=ScriptState] short acceptNode(in [Optional=CallWithDefaultValue] Node n); + [CallWith=ScriptState] short acceptNode(in [Optional=TreatAsUndefined] Node n); }; diff --git a/Source/WebCore/dom/NodeList.idl b/Source/WebCore/dom/NodeList.idl index ebe813f..e258a99 100644 --- a/Source/WebCore/dom/NodeList.idl +++ b/Source/WebCore/dom/NodeList.idl @@ -26,7 +26,7 @@ module core { NamedGetter ] NodeList { - Node item(in [IsIndex,Optional=CallWithDefaultValue] unsigned long index); + Node item(in [IsIndex,Optional=TreatAsUndefined] unsigned long index); readonly attribute unsigned long length; diff --git a/Source/WebCore/dom/OverflowEvent.idl b/Source/WebCore/dom/OverflowEvent.idl index a1ecc41..65737bc 100644 --- a/Source/WebCore/dom/OverflowEvent.idl +++ b/Source/WebCore/dom/OverflowEvent.idl @@ -37,9 +37,9 @@ module events { readonly attribute [InitializedByEventConstructor] boolean verticalOverflow; #if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C - void initOverflowEvent(in [Optional=CallWithDefaultValue] unsigned short orient, - in [Optional=CallWithDefaultValue] boolean horizontalOverflow, - in [Optional=CallWithDefaultValue] boolean verticalOverflow); + void initOverflowEvent(in [Optional=TreatAsUndefined] unsigned short orient, + in [Optional=TreatAsUndefined] boolean horizontalOverflow, + in [Optional=TreatAsUndefined] boolean verticalOverflow); #endif }; diff --git a/Source/WebCore/dom/Range.idl b/Source/WebCore/dom/Range.idl index eb7168f..12330ae 100644 --- a/Source/WebCore/dom/Range.idl +++ b/Source/WebCore/dom/Range.idl @@ -36,25 +36,25 @@ module ranges { readonly attribute Node commonAncestorContainer getter raises(DOMException); - [ObjCLegacyUnnamedParameters] void setStart(in [Optional=CallWithDefaultValue] Node refNode, - in [Optional=CallWithDefaultValue] long offset) + [ObjCLegacyUnnamedParameters] void setStart(in [Optional=TreatAsUndefined] Node refNode, + in [Optional=TreatAsUndefined] long offset) raises(RangeException, DOMException); - [ObjCLegacyUnnamedParameters] void setEnd(in [Optional=CallWithDefaultValue] Node refNode, - in [Optional=CallWithDefaultValue] long offset) + [ObjCLegacyUnnamedParameters] void setEnd(in [Optional=TreatAsUndefined] Node refNode, + in [Optional=TreatAsUndefined] long offset) raises(RangeException, DOMException); - void setStartBefore(in [Optional=CallWithDefaultValue] Node refNode) + void setStartBefore(in [Optional=TreatAsUndefined] Node refNode) raises(RangeException, DOMException); - void setStartAfter(in [Optional=CallWithDefaultValue] Node refNode) + void setStartAfter(in [Optional=TreatAsUndefined] Node refNode) raises(RangeException, DOMException); - void setEndBefore(in [Optional=CallWithDefaultValue] Node refNode) + void setEndBefore(in [Optional=TreatAsUndefined] Node refNode) raises(RangeException, DOMException); - void setEndAfter(in [Optional=CallWithDefaultValue] Node refNode) + void setEndAfter(in [Optional=TreatAsUndefined] Node refNode) raises(RangeException, DOMException); - void collapse(in [Optional=CallWithDefaultValue] boolean toStart) + void collapse(in [Optional=TreatAsUndefined] boolean toStart) raises(DOMException); - void selectNode(in [Optional=CallWithDefaultValue] Node refNode) + void selectNode(in [Optional=TreatAsUndefined] Node refNode) raises(RangeException, DOMException); - void selectNodeContents(in [Optional=CallWithDefaultValue] Node refNode) + void selectNodeContents(in [Optional=TreatAsUndefined] Node refNode) raises(RangeException, DOMException); // CompareHow @@ -63,8 +63,8 @@ module ranges { const unsigned short END_TO_END = 2; const unsigned short END_TO_START = 3; - [ObjCLegacyUnnamedParameters] short compareBoundaryPoints(in [Optional=CallWithDefaultValue] CompareHow how, - in [Optional=CallWithDefaultValue] Range sourceRange) + [ObjCLegacyUnnamedParameters] short compareBoundaryPoints(in [Optional=TreatAsUndefined] CompareHow how, + in [Optional=TreatAsUndefined] Range sourceRange) raises(DOMException); void deleteContents() @@ -73,9 +73,9 @@ module ranges { raises(DOMException); DocumentFragment cloneContents() raises(DOMException); - void insertNode(in [Optional=CallWithDefaultValue] Node newNode) + void insertNode(in [Optional=TreatAsUndefined] Node newNode) raises(DOMException, RangeException); - void surroundContents(in [Optional=CallWithDefaultValue] Node newParent) + void surroundContents(in [Optional=TreatAsUndefined] Node newParent) raises(DOMException, RangeException); Range cloneRange() raises(DOMException); @@ -94,15 +94,15 @@ module ranges { // extensions - DocumentFragment createContextualFragment(in [Optional=CallWithDefaultValue] DOMString html) + DocumentFragment createContextualFragment(in [Optional=TreatAsUndefined] DOMString html) raises(DOMException); // WebKit extensions - boolean intersectsNode(in [Optional=CallWithDefaultValue] Node refNode) + boolean intersectsNode(in [Optional=TreatAsUndefined] Node refNode) raises(RangeException, DOMException); - short compareNode(in [Optional=CallWithDefaultValue] Node refNode) + short compareNode(in [Optional=TreatAsUndefined] Node refNode) raises(RangeException, DOMException); // CompareResults @@ -111,15 +111,15 @@ module ranges { const unsigned short NODE_BEFORE_AND_AFTER = 2; const unsigned short NODE_INSIDE = 3; - short comparePoint(in [Optional=CallWithDefaultValue] Node refNode, - in [Optional=CallWithDefaultValue] long offset) + short comparePoint(in [Optional=TreatAsUndefined] Node refNode, + in [Optional=TreatAsUndefined] long offset) raises(RangeException, DOMException); - boolean isPointInRange(in [Optional=CallWithDefaultValue] Node refNode, - in [Optional=CallWithDefaultValue] long offset) + boolean isPointInRange(in [Optional=TreatAsUndefined] Node refNode, + in [Optional=TreatAsUndefined] long offset) raises(RangeException, DOMException); - void expand(in [Optional=CallWithDefaultValue] DOMString unit) + void expand(in [Optional=TreatAsUndefined] DOMString unit) raises(RangeException, DOMException); #if !defined(LANGUAGE_JAVASCRIPT) || !LANGUAGE_JAVASCRIPT diff --git a/Source/WebCore/dom/ShadowRoot.idl b/Source/WebCore/dom/ShadowRoot.idl index 011d679..5bfa106 100644 --- a/Source/WebCore/dom/ShadowRoot.idl +++ b/Source/WebCore/dom/ShadowRoot.idl @@ -33,11 +33,11 @@ module core { ConstructorRaisesException ] ShadowRoot : DocumentFragment { readonly attribute Element host; - Element getElementById(in [Optional=CallWithDefaultValue] DOMString elementId); - NodeList getElementsByClassName(in [Optional=CallWithDefaultValue] DOMString className); - NodeList getElementsByTagName(in [Optional=CallWithDefaultValue] DOMString tagName); - NodeList getElementsByTagNameNS(in [TreatNullAs=NullString,Optional=CallWithDefaultValue] DOMString namespaceURI, - in [Optional=CallWithDefaultValue] DOMString localName); + Element getElementById(in [Optional=TreatAsUndefined] DOMString elementId); + NodeList getElementsByClassName(in [Optional=TreatAsUndefined] DOMString className); + NodeList getElementsByTagName(in [Optional=TreatAsUndefined] DOMString tagName); + NodeList getElementsByTagNameNS(in [TreatNullAs=NullString,Optional=TreatAsUndefined] DOMString namespaceURI, + in [Optional=TreatAsUndefined] DOMString localName); }; } diff --git a/Source/WebCore/dom/Text.idl b/Source/WebCore/dom/Text.idl index d781677..f5d492e 100644 --- a/Source/WebCore/dom/Text.idl +++ b/Source/WebCore/dom/Text.idl @@ -23,12 +23,12 @@ module core { // DOM Level 1 - Text splitText(in [IsIndex,Optional=CallWithDefaultValue] unsigned long offset) + Text splitText(in [IsIndex,Optional=TreatAsUndefined] unsigned long offset) raises (DOMException); // Introduced in DOM Level 3: readonly attribute DOMString wholeText; - Text replaceWholeText(in [Optional=CallWithDefaultValue] DOMString content) + Text replaceWholeText(in [Optional=TreatAsUndefined] DOMString content) raises(DOMException); }; diff --git a/Source/WebCore/dom/TextEvent.idl b/Source/WebCore/dom/TextEvent.idl index 2421b65..d18cb94 100644 --- a/Source/WebCore/dom/TextEvent.idl +++ b/Source/WebCore/dom/TextEvent.idl @@ -30,11 +30,11 @@ module events { readonly attribute DOMString data; - void initTextEvent(in [Optional=CallWithDefaultValue] DOMString typeArg, - in [Optional=CallWithDefaultValue] boolean canBubbleArg, - in [Optional=CallWithDefaultValue] boolean cancelableArg, - in [Optional=CallWithDefaultValue] DOMWindow viewArg, - in [Optional=CallWithDefaultValue] DOMString dataArg); + void initTextEvent(in [Optional=TreatAsUndefined] DOMString typeArg, + in [Optional=TreatAsUndefined] boolean canBubbleArg, + in [Optional=TreatAsUndefined] boolean cancelableArg, + in [Optional=TreatAsUndefined] DOMWindow viewArg, + in [Optional=TreatAsUndefined] DOMString dataArg); }; diff --git a/Source/WebCore/dom/TouchEvent.idl b/Source/WebCore/dom/TouchEvent.idl index 39edfc8..1466d23 100644 --- a/Source/WebCore/dom/TouchEvent.idl +++ b/Source/WebCore/dom/TouchEvent.idl @@ -36,18 +36,18 @@ module events { readonly attribute boolean altKey; readonly attribute boolean metaKey; - void initTouchEvent(in [Optional=CallWithDefaultValue] TouchList touches, - in [Optional=CallWithDefaultValue] TouchList targetTouches, - in [Optional=CallWithDefaultValue] TouchList changedTouches, - in [Optional=CallWithDefaultValue] DOMString type, - in [Optional=CallWithDefaultValue] DOMWindow view, - in [Optional=CallWithDefaultValue] long screenX, - in [Optional=CallWithDefaultValue] long screenY, - in [Optional=CallWithDefaultValue] long clientX, - in [Optional=CallWithDefaultValue] long clientY, - in [Optional=CallWithDefaultValue] boolean ctrlKey, - in [Optional=CallWithDefaultValue] boolean altKey, - in [Optional=CallWithDefaultValue] boolean shiftKey, - in [Optional=CallWithDefaultValue] boolean metaKey); + void initTouchEvent(in [Optional=TreatAsUndefined] TouchList touches, + in [Optional=TreatAsUndefined] TouchList targetTouches, + in [Optional=TreatAsUndefined] TouchList changedTouches, + in [Optional=TreatAsUndefined] DOMString type, + in [Optional=TreatAsUndefined] DOMWindow view, + in [Optional=TreatAsUndefined] long screenX, + in [Optional=TreatAsUndefined] long screenY, + in [Optional=TreatAsUndefined] long clientX, + in [Optional=TreatAsUndefined] long clientY, + in [Optional=TreatAsUndefined] boolean ctrlKey, + in [Optional=TreatAsUndefined] boolean altKey, + in [Optional=TreatAsUndefined] boolean shiftKey, + in [Optional=TreatAsUndefined] boolean metaKey); }; } diff --git a/Source/WebCore/dom/UIEvent.idl b/Source/WebCore/dom/UIEvent.idl index 83dcdc9..0d7ec76 100644 --- a/Source/WebCore/dom/UIEvent.idl +++ b/Source/WebCore/dom/UIEvent.idl @@ -24,11 +24,11 @@ module events { readonly attribute DOMWindow view; readonly attribute long detail; - [ObjCLegacyUnnamedParameters] void initUIEvent(in [Optional=CallWithDefaultValue] DOMString type, - in [Optional=CallWithDefaultValue] boolean canBubble, - in [Optional=CallWithDefaultValue] boolean cancelable, - in [Optional=CallWithDefaultValue] DOMWindow view, - in [Optional=CallWithDefaultValue] long detail); + [ObjCLegacyUnnamedParameters] void initUIEvent(in [Optional=TreatAsUndefined] DOMString type, + in [Optional=TreatAsUndefined] boolean canBubble, + in [Optional=TreatAsUndefined] boolean cancelable, + in [Optional=TreatAsUndefined] DOMWindow view, + in [Optional=TreatAsUndefined] long detail); // extensions readonly attribute long keyCode; diff --git a/Source/WebCore/dom/WheelEvent.idl b/Source/WebCore/dom/WheelEvent.idl index e0fd563..a1df96a 100644 --- a/Source/WebCore/dom/WheelEvent.idl +++ b/Source/WebCore/dom/WheelEvent.idl @@ -46,31 +46,31 @@ module events { #endif /* defined(LANGUAGE_OBJECTIVE_C) */ #if !defined(LANGUAGE_JAVASCRIPT) || !LANGUAGE_JAVASCRIPT - void initWheelEvent(in [Optional=CallWithDefaultValue] long wheelDeltaX, - in [Optional=CallWithDefaultValue] long wheelDeltaY, - in [Optional=CallWithDefaultValue] DOMWindow view, - in [Optional=CallWithDefaultValue] long screenX, - in [Optional=CallWithDefaultValue] long screenY, - in [Optional=CallWithDefaultValue] long clientX, - in [Optional=CallWithDefaultValue] long clientY, - in [Optional=CallWithDefaultValue] boolean ctrlKey, - in [Optional=CallWithDefaultValue] boolean altKey, - in [Optional=CallWithDefaultValue] boolean shiftKey, - in [Optional=CallWithDefaultValue] boolean metaKey); + void initWheelEvent(in [Optional=TreatAsUndefined] long wheelDeltaX, + in [Optional=TreatAsUndefined] long wheelDeltaY, + in [Optional=TreatAsUndefined] DOMWindow view, + in [Optional=TreatAsUndefined] long screenX, + in [Optional=TreatAsUndefined] long screenY, + in [Optional=TreatAsUndefined] long clientX, + in [Optional=TreatAsUndefined] long clientY, + in [Optional=TreatAsUndefined] boolean ctrlKey, + in [Optional=TreatAsUndefined] boolean altKey, + in [Optional=TreatAsUndefined] boolean shiftKey, + in [Optional=TreatAsUndefined] boolean metaKey); #endif /* !defined(LANGUAGE_JAVASCRIPT) */ #if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT - void initWebKitWheelEvent(in [Optional=CallWithDefaultValue] long wheelDeltaX, - in [Optional=CallWithDefaultValue] long wheelDeltaY, - in [Optional=CallWithDefaultValue] DOMWindow view, - in [Optional=CallWithDefaultValue] long screenX, - in [Optional=CallWithDefaultValue] long screenY, - in [Optional=CallWithDefaultValue] long clientX, - in [Optional=CallWithDefaultValue] long clientY, - in [Optional=CallWithDefaultValue] boolean ctrlKey, - in [Optional=CallWithDefaultValue] boolean altKey, - in [Optional=CallWithDefaultValue] boolean shiftKey, - in [Optional=CallWithDefaultValue] boolean metaKey); + void initWebKitWheelEvent(in [Optional=TreatAsUndefined] long wheelDeltaX, + in [Optional=TreatAsUndefined] long wheelDeltaY, + in [Optional=TreatAsUndefined] DOMWindow view, + in [Optional=TreatAsUndefined] long screenX, + in [Optional=TreatAsUndefined] long screenY, + in [Optional=TreatAsUndefined] long clientX, + in [Optional=TreatAsUndefined] long clientY, + in [Optional=TreatAsUndefined] boolean ctrlKey, + in [Optional=TreatAsUndefined] boolean altKey, + in [Optional=TreatAsUndefined] boolean shiftKey, + in [Optional=TreatAsUndefined] boolean metaKey); #endif /* defined(LANGUAGE_JAVASCRIPT) */ }; } diff --git a/Source/WebCore/html/DOMFormData.idl b/Source/WebCore/html/DOMFormData.idl index 73ac211..4c9a8eb 100644 --- a/Source/WebCore/html/DOMFormData.idl +++ b/Source/WebCore/html/DOMFormData.idl @@ -37,9 +37,9 @@ module html { ] DOMFormData { // void append(DOMString name, DOMString value); // void append(DOMString name, Blob value, optional DOMString filename); - [Custom] void append(in [Optional=CallWithDefaultValue] DOMString name, - in [Optional=CallWithDefaultValue] DOMString value, - in [Optional=CallWithDefaultValue] DOMString filename); + [Custom] void append(in [Optional=TreatAsUndefined] DOMString name, + in [Optional=TreatAsUndefined] DOMString value, + in [Optional=TreatAsUndefined] DOMString filename); }; } diff --git a/Source/WebCore/html/HTMLAllCollection.idl b/Source/WebCore/html/HTMLAllCollection.idl index 3068e40..a39b5ea 100644 --- a/Source/WebCore/html/HTMLAllCollection.idl +++ b/Source/WebCore/html/HTMLAllCollection.idl @@ -33,7 +33,7 @@ module html { JSGenerateIsReachable ] HTMLAllCollection { readonly attribute unsigned long length; - [Custom] Node item(in [Optional=CallWithDefaultValue] unsigned long index); + [Custom] Node item(in [Optional=TreatAsUndefined] unsigned long index); [Custom] Node namedItem(in DOMString name); // FIXME: This should return an HTMLAllCollection. diff --git a/Source/WebCore/html/HTMLAudioElement.idl b/Source/WebCore/html/HTMLAudioElement.idl index 1091646..b626e13 100644 --- a/Source/WebCore/html/HTMLAudioElement.idl +++ b/Source/WebCore/html/HTMLAudioElement.idl @@ -27,7 +27,7 @@ module html { interface [ ActiveDOMObject, Conditional=VIDEO, - NamedConstructor=Audio(in [Optional=CallWithNullValue] DOMString src) + NamedConstructor=Audio(in [Optional=TreatAsUndefined, TreatUndefinedAs=NullString] DOMString src) ] HTMLAudioElement : HTMLMediaElement { }; } diff --git a/Source/WebCore/html/HTMLCanvasElement.idl b/Source/WebCore/html/HTMLCanvasElement.idl index 35a806c..4ae7085 100644 --- a/Source/WebCore/html/HTMLCanvasElement.idl +++ b/Source/WebCore/html/HTMLCanvasElement.idl @@ -33,13 +33,13 @@ module html { attribute long width; attribute long height; - [Custom] DOMString toDataURL(in [TreatNullAs=NullString, TreatUndefinedAs=NullString,Optional=CallWithDefaultValue] DOMString type) + [Custom] DOMString toDataURL(in [TreatNullAs=NullString, TreatUndefinedAs=NullString,Optional=TreatAsUndefined] DOMString type) raises(DOMException); #if !defined(LANGUAGE_CPP) || !LANGUAGE_CPP #if !defined(LANGUAGE_OBJECTIVE_C) || !LANGUAGE_OBJECTIVE_C // The custom binding is needed to handle context creation attributes. - [Custom] DOMObject getContext(in [Optional=CallWithDefaultValue] DOMString contextId); + [Custom] DOMObject getContext(in [Optional=TreatAsUndefined] DOMString contextId); #endif #endif diff --git a/Source/WebCore/html/HTMLCollection.idl b/Source/WebCore/html/HTMLCollection.idl index a4d172d..484a2aa 100644 --- a/Source/WebCore/html/HTMLCollection.idl +++ b/Source/WebCore/html/HTMLCollection.idl @@ -28,11 +28,11 @@ module html { ObjCPolymorphic ] HTMLCollection { readonly attribute unsigned long length; - Node item(in [Optional=CallWithDefaultValue] unsigned long index); - [Custom] Node namedItem(in [Optional=CallWithDefaultValue] DOMString name); + Node item(in [Optional=TreatAsUndefined] unsigned long index); + [Custom] Node namedItem(in [Optional=TreatAsUndefined] DOMString name); #if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C - NodeList tags(in [Optional=CallWithDefaultValue] DOMString name); + NodeList tags(in [Optional=TreatAsUndefined] DOMString name); #endif }; diff --git a/Source/WebCore/html/HTMLDocument.idl b/Source/WebCore/html/HTMLDocument.idl index dd020e2..ab03929 100644 --- a/Source/WebCore/html/HTMLDocument.idl +++ b/Source/WebCore/html/HTMLDocument.idl @@ -25,8 +25,8 @@ module html { ] HTMLDocument : Document { [JSCustom, V8Custom] void open(); void close(); - [Custom] void write(in [Optional=CallWithDefaultValue] DOMString text); - [Custom] void writeln(in [Optional=CallWithDefaultValue] DOMString text); + [Custom] void write(in [Optional=TreatAsUndefined] DOMString text); + [Custom] void writeln(in [Optional=TreatAsUndefined] DOMString text); readonly attribute HTMLCollection embeds; readonly attribute HTMLCollection plugins; diff --git a/Source/WebCore/html/HTMLElement.idl b/Source/WebCore/html/HTMLElement.idl index 308010f..33020cd 100644 --- a/Source/WebCore/html/HTMLElement.idl +++ b/Source/WebCore/html/HTMLElement.idl @@ -49,14 +49,14 @@ module html { attribute [TreatNullAs=NullString] DOMString outerText setter raises(DOMException); - Element insertAdjacentElement(in [Optional=CallWithDefaultValue] DOMString where, - in [Optional=CallWithDefaultValue] Element element) + Element insertAdjacentElement(in [Optional=TreatAsUndefined] DOMString where, + in [Optional=TreatAsUndefined] Element element) raises(DOMException); - void insertAdjacentHTML(in [Optional=CallWithDefaultValue] DOMString where, - in [Optional=CallWithDefaultValue] DOMString html) + void insertAdjacentHTML(in [Optional=TreatAsUndefined] DOMString where, + in [Optional=TreatAsUndefined] DOMString html) raises(DOMException); - void insertAdjacentText(in [Optional=CallWithDefaultValue] DOMString where, - in [Optional=CallWithDefaultValue] DOMString text) + void insertAdjacentText(in [Optional=TreatAsUndefined] DOMString where, + in [Optional=TreatAsUndefined] DOMString text) raises(DOMException); readonly attribute HTMLCollection children; diff --git a/Source/WebCore/html/HTMLInputElement.idl b/Source/WebCore/html/HTMLInputElement.idl index 4e218b9..133d0b6 100644 --- a/Source/WebCore/html/HTMLInputElement.idl +++ b/Source/WebCore/html/HTMLInputElement.idl @@ -90,8 +90,8 @@ module html { #if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C [Custom] void setSelectionRange(in long start, in long end); #else - [Custom] void setSelectionRange(in [Optional=CallWithDefaultValue] long start, - in [Optional=CallWithDefaultValue] long end, + [Custom] void setSelectionRange(in [Optional=TreatAsUndefined] long start, + in [Optional=TreatAsUndefined] long end, in [Optional] DOMString direction); #endif diff --git a/Source/WebCore/html/HTMLMediaElement.idl b/Source/WebCore/html/HTMLMediaElement.idl index 4260c20..4129d47 100644 --- a/Source/WebCore/html/HTMLMediaElement.idl +++ b/Source/WebCore/html/HTMLMediaElement.idl @@ -46,7 +46,7 @@ module html { readonly attribute TimeRanges buffered; void load() raises (DOMException); - DOMString canPlayType(in [Optional=CallWithDefaultValue] DOMString type); + DOMString canPlayType(in [Optional=TreatAsUndefined] DOMString type); // ready state const unsigned short HAVE_NOTHING = 0; diff --git a/Source/WebCore/html/HTMLOptionElement.idl b/Source/WebCore/html/HTMLOptionElement.idl index 73e9c3b..92d7b49 100644 --- a/Source/WebCore/html/HTMLOptionElement.idl +++ b/Source/WebCore/html/HTMLOptionElement.idl @@ -22,7 +22,7 @@ module html { interface [ JSGenerateToNativeObject, - NamedConstructor=Option(in [Optional=CallWithNullValue] DOMString data, in [Optional=CallWithNullValue] DOMString value, in [Optional=CallWithDefaultValue] boolean defaultSelected, in [Optional=CallWithDefaultValue] boolean selected), + NamedConstructor=Option(in [Optional=TreatAsUndefined, TreatUndefinedAs=NullString] DOMString data, in [Optional=TreatAsUndefined, TreatUndefinedAs=NullString] DOMString value, in [Optional=TreatAsUndefined] boolean defaultSelected, in [Optional=TreatAsUndefined] boolean selected), ConstructorRaisesException ] HTMLOptionElement : HTMLElement { readonly attribute HTMLFormElement form; diff --git a/Source/WebCore/html/HTMLOptionsCollection.idl b/Source/WebCore/html/HTMLOptionsCollection.idl index b286439..a6cd1c3 100644 --- a/Source/WebCore/html/HTMLOptionsCollection.idl +++ b/Source/WebCore/html/HTMLOptionsCollection.idl @@ -28,10 +28,10 @@ module html { attribute [Custom] unsigned long length setter raises (DOMException); - [Custom] void add(in [Optional=CallWithDefaultValue] HTMLOptionElement option, + [Custom] void add(in [Optional=TreatAsUndefined] HTMLOptionElement option, in [Optional] unsigned long index) raises (DOMException); - [Custom] void remove(in [Optional=CallWithDefaultValue] unsigned long index); + [Custom] void remove(in [Optional=TreatAsUndefined] unsigned long index); #if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C Node item(in unsigned long index); diff --git a/Source/WebCore/html/HTMLSelectElement.idl b/Source/WebCore/html/HTMLSelectElement.idl index 5d60ef4..00d2939 100644 --- a/Source/WebCore/html/HTMLSelectElement.idl +++ b/Source/WebCore/html/HTMLSelectElement.idl @@ -52,8 +52,8 @@ module html { attribute [Reflect] boolean required; attribute long size; - [ObjCLegacyUnnamedParameters] void add(in [Optional=CallWithDefaultValue] HTMLElement element, - in [Optional=CallWithDefaultValue] HTMLElement before) raises(DOMException); + [ObjCLegacyUnnamedParameters] void add(in [Optional=TreatAsUndefined] HTMLElement element, + in [Optional=TreatAsUndefined] HTMLElement before) raises(DOMException); #if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT // In JavaScript, we support both option index and option object parameters. @@ -65,8 +65,8 @@ module html { // These methods are not in DOM Level 2 IDL, but are mentioned in the standard: // "The contained options can be directly accessed through the select element as a collection." - Node item(in [IsIndex,Optional=CallWithDefaultValue] unsigned long index); - Node namedItem(in [Optional=CallWithDefaultValue] DOMString name); + Node item(in [IsIndex,Optional=TreatAsUndefined] unsigned long index); + Node namedItem(in [Optional=TreatAsUndefined] DOMString name); readonly attribute NodeList labels; }; diff --git a/Source/WebCore/html/HTMLTableElement.idl b/Source/WebCore/html/HTMLTableElement.idl index 7c046eb..84923d6 100644 --- a/Source/WebCore/html/HTMLTableElement.idl +++ b/Source/WebCore/html/HTMLTableElement.idl @@ -46,8 +46,8 @@ module html { HTMLElement createCaption(); void deleteCaption(); - HTMLElement insertRow(in [Optional=CallWithDefaultValue] long index) raises(DOMException); - void deleteRow(in [Optional=CallWithDefaultValue] long index) raises(DOMException); + HTMLElement insertRow(in [Optional=TreatAsUndefined] long index) raises(DOMException); + void deleteRow(in [Optional=TreatAsUndefined] long index) raises(DOMException); }; } diff --git a/Source/WebCore/html/HTMLTableRowElement.idl b/Source/WebCore/html/HTMLTableRowElement.idl index 482c61f..649c247 100644 --- a/Source/WebCore/html/HTMLTableRowElement.idl +++ b/Source/WebCore/html/HTMLTableRowElement.idl @@ -29,8 +29,8 @@ module html { attribute [Reflect=char] DOMString ch; attribute [Reflect=charoff] DOMString chOff; attribute [Reflect] DOMString vAlign; - HTMLElement insertCell(in [Optional=CallWithDefaultValue] long index) raises(DOMException); - void deleteCell(in [Optional=CallWithDefaultValue] long index) raises(DOMException); + HTMLElement insertCell(in [Optional=TreatAsUndefined] long index) raises(DOMException); + void deleteCell(in [Optional=TreatAsUndefined] long index) raises(DOMException); }; } diff --git a/Source/WebCore/html/HTMLTableSectionElement.idl b/Source/WebCore/html/HTMLTableSectionElement.idl index 1553b5e..676517b 100644 --- a/Source/WebCore/html/HTMLTableSectionElement.idl +++ b/Source/WebCore/html/HTMLTableSectionElement.idl @@ -28,8 +28,8 @@ module html { attribute [Reflect=charoff] DOMString chOff; attribute [Reflect] DOMString vAlign; readonly attribute HTMLCollection rows; - HTMLElement insertRow(in [Optional=CallWithDefaultValue] long index) raises(DOMException); - void deleteRow(in [Optional=CallWithDefaultValue] long index) raises(DOMException); + HTMLElement insertRow(in [Optional=TreatAsUndefined] long index) raises(DOMException); + void deleteRow(in [Optional=TreatAsUndefined] long index) raises(DOMException); }; } diff --git a/Source/WebCore/html/HTMLTextAreaElement.idl b/Source/WebCore/html/HTMLTextAreaElement.idl index 3b76115..099727b 100644 --- a/Source/WebCore/html/HTMLTextAreaElement.idl +++ b/Source/WebCore/html/HTMLTextAreaElement.idl @@ -54,8 +54,8 @@ module html { #if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C void setSelectionRange(in long start, in long end); #else - void setSelectionRange(in [Optional=CallWithDefaultValue] long start, - in [Optional=CallWithDefaultValue] long end, + void setSelectionRange(in [Optional=TreatAsUndefined] long start, + in [Optional=TreatAsUndefined] long end, in [Optional] DOMString direction); #endif readonly attribute NodeList labels; diff --git a/Source/WebCore/html/TextTrackCue.idl b/Source/WebCore/html/TextTrackCue.idl index 4f7a40b..85535db 100644 --- a/Source/WebCore/html/TextTrackCue.idl +++ b/Source/WebCore/html/TextTrackCue.idl @@ -29,7 +29,7 @@ module html { Conditional=VIDEO_TRACK, V8EnabledAtRuntime=webkitVideoTrack, JSGenerateToNativeObject, - Constructor(in DOMString id, in double startTime, in double endTime, in DOMString text, in [Optional=CallWithDefaultValue] DOMString settings, in [Optional=CallWithDefaultValue] boolean pauseOnExit), + Constructor(in DOMString id, in double startTime, in double endTime, in DOMString text, in [Optional=TreatAsUndefined] DOMString settings, in [Optional=TreatAsUndefined] boolean pauseOnExit), CallWith=ScriptExecutionContext, EventTarget, JSCustomMarkFunction, diff --git a/Source/WebCore/html/canvas/CanvasGradient.idl b/Source/WebCore/html/canvas/CanvasGradient.idl index 75b1927..08229f5 100644 --- a/Source/WebCore/html/canvas/CanvasGradient.idl +++ b/Source/WebCore/html/canvas/CanvasGradient.idl @@ -27,8 +27,8 @@ module html { interface CanvasGradient { - void addColorStop(in [Optional=CallWithDefaultValue] float offset, - in [Optional=CallWithDefaultValue] DOMString color) + void addColorStop(in [Optional=TreatAsUndefined] float offset, + in [Optional=TreatAsUndefined] DOMString color) raises (DOMException); }; diff --git a/Source/WebCore/html/canvas/CanvasRenderingContext2D.idl b/Source/WebCore/html/canvas/CanvasRenderingContext2D.idl index d4560f7..74bf672 100644 --- a/Source/WebCore/html/canvas/CanvasRenderingContext2D.idl +++ b/Source/WebCore/html/canvas/CanvasRenderingContext2D.idl @@ -30,38 +30,38 @@ module html { void save(); void restore(); - void scale(in [Optional=CallWithDefaultValue] float sx, - in [Optional=CallWithDefaultValue] float sy); - void rotate(in [Optional=CallWithDefaultValue] float angle); - void translate(in [Optional=CallWithDefaultValue] float tx, - in [Optional=CallWithDefaultValue] float ty); - void transform(in [Optional=CallWithDefaultValue] float m11, - in [Optional=CallWithDefaultValue] float m12, - in [Optional=CallWithDefaultValue] float m21, - in [Optional=CallWithDefaultValue] float m22, - in [Optional=CallWithDefaultValue] float dx, - in [Optional=CallWithDefaultValue] float dy); - void setTransform(in [Optional=CallWithDefaultValue] float m11, - in [Optional=CallWithDefaultValue] float m12, - in [Optional=CallWithDefaultValue] float m21, - in [Optional=CallWithDefaultValue] float m22, - in [Optional=CallWithDefaultValue] float dx, - in [Optional=CallWithDefaultValue] float dy); + void scale(in [Optional=TreatAsUndefined] float sx, + in [Optional=TreatAsUndefined] float sy); + void rotate(in [Optional=TreatAsUndefined] float angle); + void translate(in [Optional=TreatAsUndefined] float tx, + in [Optional=TreatAsUndefined] float ty); + void transform(in [Optional=TreatAsUndefined] float m11, + in [Optional=TreatAsUndefined] float m12, + in [Optional=TreatAsUndefined] float m21, + in [Optional=TreatAsUndefined] float m22, + in [Optional=TreatAsUndefined] float dx, + in [Optional=TreatAsUndefined] float dy); + void setTransform(in [Optional=TreatAsUndefined] float m11, + in [Optional=TreatAsUndefined] float m12, + in [Optional=TreatAsUndefined] float m21, + in [Optional=TreatAsUndefined] float m22, + in [Optional=TreatAsUndefined] float dx, + in [Optional=TreatAsUndefined] float dy); attribute float globalAlpha; attribute [TreatNullAs=NullString] DOMString globalCompositeOperation; - CanvasGradient createLinearGradient(in [Optional=CallWithDefaultValue] float x0, - in [Optional=CallWithDefaultValue] float y0, - in [Optional=CallWithDefaultValue] float x1, - in [Optional=CallWithDefaultValue] float y1) + CanvasGradient createLinearGradient(in [Optional=TreatAsUndefined] float x0, + in [Optional=TreatAsUndefined] float y0, + in [Optional=TreatAsUndefined] float x1, + in [Optional=TreatAsUndefined] float y1) raises (DOMException); - CanvasGradient createRadialGradient(in [Optional=CallWithDefaultValue] float x0, - in [Optional=CallWithDefaultValue] float y0, - in [Optional=CallWithDefaultValue] float r0, - in [Optional=CallWithDefaultValue] float x1, - in [Optional=CallWithDefaultValue] float y1, - in [Optional=CallWithDefaultValue] float r1) + CanvasGradient createRadialGradient(in [Optional=TreatAsUndefined] float x0, + in [Optional=TreatAsUndefined] float y0, + in [Optional=TreatAsUndefined] float r0, + in [Optional=TreatAsUndefined] float x1, + in [Optional=TreatAsUndefined] float y1, + in [Optional=TreatAsUndefined] float r1) raises (DOMException); attribute float lineWidth; @@ -80,71 +80,71 @@ module html { attribute float webkitLineDashOffset; #endif - void clearRect(in [Optional=CallWithDefaultValue] float x, - in [Optional=CallWithDefaultValue] float y, - in [Optional=CallWithDefaultValue] float width, - in [Optional=CallWithDefaultValue] float height); - void fillRect(in [Optional=CallWithDefaultValue] float x, - in [Optional=CallWithDefaultValue] float y, - in [Optional=CallWithDefaultValue] float width, - in [Optional=CallWithDefaultValue] float height); + void clearRect(in [Optional=TreatAsUndefined] float x, + in [Optional=TreatAsUndefined] float y, + in [Optional=TreatAsUndefined] float width, + in [Optional=TreatAsUndefined] float height); + void fillRect(in [Optional=TreatAsUndefined] float x, + in [Optional=TreatAsUndefined] float y, + in [Optional=TreatAsUndefined] float width, + in [Optional=TreatAsUndefined] float height); void beginPath(); void closePath(); - void moveTo(in [Optional=CallWithDefaultValue] float x, - in [Optional=CallWithDefaultValue] float y); - void lineTo(in [Optional=CallWithDefaultValue] float x, - in [Optional=CallWithDefaultValue] float y); - void quadraticCurveTo(in [Optional=CallWithDefaultValue] float cpx, - in [Optional=CallWithDefaultValue] float cpy, - in [Optional=CallWithDefaultValue] float x, - in [Optional=CallWithDefaultValue] float y); - void bezierCurveTo(in [Optional=CallWithDefaultValue] float cp1x, - in [Optional=CallWithDefaultValue] float cp1y, - in [Optional=CallWithDefaultValue] float cp2x, - in [Optional=CallWithDefaultValue] float cp2y, - in [Optional=CallWithDefaultValue] float x, - in [Optional=CallWithDefaultValue] float y); - void arcTo(in [Optional=CallWithDefaultValue] float x1, - in [Optional=CallWithDefaultValue] float y1, - in [Optional=CallWithDefaultValue] float x2, - in [Optional=CallWithDefaultValue] float y2, - in [Optional=CallWithDefaultValue] float radius) - raises (DOMException); - void rect(in [Optional=CallWithDefaultValue] float x, - in [Optional=CallWithDefaultValue] float y, - in [Optional=CallWithDefaultValue] float width, - in [Optional=CallWithDefaultValue] float height); - void arc(in [Optional=CallWithDefaultValue] float x, - in [Optional=CallWithDefaultValue] float y, - in [Optional=CallWithDefaultValue] float radius, - in [Optional=CallWithDefaultValue] float startAngle, - in [Optional=CallWithDefaultValue] float endAngle, - in [Optional=CallWithDefaultValue] boolean anticlockwise) + void moveTo(in [Optional=TreatAsUndefined] float x, + in [Optional=TreatAsUndefined] float y); + void lineTo(in [Optional=TreatAsUndefined] float x, + in [Optional=TreatAsUndefined] float y); + void quadraticCurveTo(in [Optional=TreatAsUndefined] float cpx, + in [Optional=TreatAsUndefined] float cpy, + in [Optional=TreatAsUndefined] float x, + in [Optional=TreatAsUndefined] float y); + void bezierCurveTo(in [Optional=TreatAsUndefined] float cp1x, + in [Optional=TreatAsUndefined] float cp1y, + in [Optional=TreatAsUndefined] float cp2x, + in [Optional=TreatAsUndefined] float cp2y, + in [Optional=TreatAsUndefined] float x, + in [Optional=TreatAsUndefined] float y); + void arcTo(in [Optional=TreatAsUndefined] float x1, + in [Optional=TreatAsUndefined] float y1, + in [Optional=TreatAsUndefined] float x2, + in [Optional=TreatAsUndefined] float y2, + in [Optional=TreatAsUndefined] float radius) + raises (DOMException); + void rect(in [Optional=TreatAsUndefined] float x, + in [Optional=TreatAsUndefined] float y, + in [Optional=TreatAsUndefined] float width, + in [Optional=TreatAsUndefined] float height); + void arc(in [Optional=TreatAsUndefined] float x, + in [Optional=TreatAsUndefined] float y, + in [Optional=TreatAsUndefined] float radius, + in [Optional=TreatAsUndefined] float startAngle, + in [Optional=TreatAsUndefined] float endAngle, + in [Optional=TreatAsUndefined] boolean anticlockwise) raises (DOMException); void fill(); void stroke(); void clip(); - boolean isPointInPath(in [Optional=CallWithDefaultValue] float x, - in [Optional=CallWithDefaultValue] float y); + boolean isPointInPath(in [Optional=TreatAsUndefined] float x, + in [Optional=TreatAsUndefined] float y); // text attribute DOMString font; attribute DOMString textAlign; attribute DOMString textBaseline; - TextMetrics measureText(in [Optional=CallWithDefaultValue] DOMString text); + TextMetrics measureText(in [Optional=TreatAsUndefined] DOMString text); // other - void setAlpha(in [Optional=CallWithDefaultValue] float alpha); - void setCompositeOperation(in [Optional=CallWithDefaultValue] DOMString compositeOperation); + void setAlpha(in [Optional=TreatAsUndefined] float alpha); + void setCompositeOperation(in [Optional=TreatAsUndefined] DOMString compositeOperation); #if !defined(LANGUAGE_CPP) || !LANGUAGE_CPP - void setLineWidth(in [Optional=CallWithDefaultValue] float width); - void setLineCap(in [Optional=CallWithDefaultValue] DOMString cap); - void setLineJoin(in [Optional=CallWithDefaultValue] DOMString join); - void setMiterLimit(in [Optional=CallWithDefaultValue] float limit); + void setLineWidth(in [Optional=TreatAsUndefined] float width); + void setLineCap(in [Optional=TreatAsUndefined] DOMString cap); + void setLineJoin(in [Optional=TreatAsUndefined] DOMString join); + void setMiterLimit(in [Optional=TreatAsUndefined] float limit); #endif void clearShadow(); @@ -162,10 +162,10 @@ module html { void setFillColor(in float r, in float g, in float b, in float a); void setFillColor(in float c, in float m, in float y, in float k, in float a); - void strokeRect(in [Optional=CallWithDefaultValue] float x, - in [Optional=CallWithDefaultValue] float y, - in [Optional=CallWithDefaultValue] float width, - in [Optional=CallWithDefaultValue] float height, + void strokeRect(in [Optional=TreatAsUndefined] float x, + in [Optional=TreatAsUndefined] float y, + in [Optional=TreatAsUndefined] float width, + in [Optional=TreatAsUndefined] float height, in [Optional] float lineWidth); void drawImage(in HTMLImageElement image, in float x, in float y) @@ -217,8 +217,8 @@ module html { attribute [Custom] custom fillStyle; // pixel manipulation - ImageData getImageData(in [Optional=CallWithDefaultValue] float sx, in [Optional=CallWithDefaultValue] float sy, - in [Optional=CallWithDefaultValue] float sw, in [Optional=CallWithDefaultValue] float sh) + ImageData getImageData(in [Optional=TreatAsUndefined] float sx, in [Optional=TreatAsUndefined] float sy, + in [Optional=TreatAsUndefined] float sw, in [Optional=TreatAsUndefined] float sh) raises(DOMException); }; diff --git a/Source/WebCore/html/canvas/Float32Array.idl b/Source/WebCore/html/canvas/Float32Array.idl index 785ed81..b64c4b8 100644 --- a/Source/WebCore/html/canvas/Float32Array.idl +++ b/Source/WebCore/html/canvas/Float32Array.idl @@ -37,7 +37,7 @@ module html { const unsigned int BYTES_PER_ELEMENT = 4; readonly attribute unsigned long length; - Float32Array subarray(in [Optional=CallWithDefaultValue] long start, + Float32Array subarray(in [Optional=TreatAsUndefined] long start, in [Optional] long end); // void set(in Float32Array array, [Optional] in unsigned long offset); diff --git a/Source/WebCore/html/canvas/Float64Array.idl b/Source/WebCore/html/canvas/Float64Array.idl index 7180811..9bfe746 100644 --- a/Source/WebCore/html/canvas/Float64Array.idl +++ b/Source/WebCore/html/canvas/Float64Array.idl @@ -37,7 +37,7 @@ module html { const unsigned int BYTES_PER_ELEMENT = 8; readonly attribute unsigned long length; - Float64Array subarray(in [Optional=CallWithDefaultValue] long start, + Float64Array subarray(in [Optional=TreatAsUndefined] long start, in [Optional] long end); // void set(in Float64Array array, [Optional] in unsigned long offset); diff --git a/Source/WebCore/html/canvas/Int16Array.idl b/Source/WebCore/html/canvas/Int16Array.idl index 40e18d5..3174c99 100644 --- a/Source/WebCore/html/canvas/Int16Array.idl +++ b/Source/WebCore/html/canvas/Int16Array.idl @@ -36,7 +36,7 @@ module html { const unsigned int BYTES_PER_ELEMENT = 2; readonly attribute unsigned long length; - Int16Array subarray(in [Optional=CallWithDefaultValue] long start, + Int16Array subarray(in [Optional=TreatAsUndefined] long start, in [Optional] long end); // void set(in Int16Array array, [Optional] in unsigned long offset); diff --git a/Source/WebCore/html/canvas/Int32Array.idl b/Source/WebCore/html/canvas/Int32Array.idl index 0f5320a..eb1c8ae 100644 --- a/Source/WebCore/html/canvas/Int32Array.idl +++ b/Source/WebCore/html/canvas/Int32Array.idl @@ -37,7 +37,7 @@ module html { const unsigned int BYTES_PER_ELEMENT = 4; readonly attribute unsigned long length; - Int32Array subarray(in [Optional=CallWithDefaultValue] long start, + Int32Array subarray(in [Optional=TreatAsUndefined] long start, in [Optional] long end); // void set(in Int32Array array, [Optional] in unsigned long offset); diff --git a/Source/WebCore/html/canvas/Int8Array.idl b/Source/WebCore/html/canvas/Int8Array.idl index 9984ada..7541582 100644 --- a/Source/WebCore/html/canvas/Int8Array.idl +++ b/Source/WebCore/html/canvas/Int8Array.idl @@ -37,7 +37,7 @@ module html { const unsigned int BYTES_PER_ELEMENT = 1; readonly attribute unsigned long length; - Int8Array subarray(in [Optional=CallWithDefaultValue] long start, + Int8Array subarray(in [Optional=TreatAsUndefined] long start, in [Optional] long end); // void set(in Int8Array array, [Optional] in unsigned long offset); diff --git a/Source/WebCore/html/canvas/OESVertexArrayObject.idl b/Source/WebCore/html/canvas/OESVertexArrayObject.idl index c4adf99..0f5269e 100644 --- a/Source/WebCore/html/canvas/OESVertexArrayObject.idl +++ b/Source/WebCore/html/canvas/OESVertexArrayObject.idl @@ -33,8 +33,8 @@ module html { const unsigned int VERTEX_ARRAY_BINDING_OES = 0x85B5; [StrictTypeChecking] WebGLVertexArrayObjectOES createVertexArrayOES(); - [StrictTypeChecking] void deleteVertexArrayOES(in [Optional=CallWithDefaultValue] WebGLVertexArrayObjectOES arrayObject); - [StrictTypeChecking] boolean isVertexArrayOES(in [Optional=CallWithDefaultValue] WebGLVertexArrayObjectOES arrayObject); - [StrictTypeChecking] void bindVertexArrayOES(in [Optional=CallWithDefaultValue] WebGLVertexArrayObjectOES arrayObject) raises(DOMException); + [StrictTypeChecking] void deleteVertexArrayOES(in [Optional=TreatAsUndefined] WebGLVertexArrayObjectOES arrayObject); + [StrictTypeChecking] boolean isVertexArrayOES(in [Optional=TreatAsUndefined] WebGLVertexArrayObjectOES arrayObject); + [StrictTypeChecking] void bindVertexArrayOES(in [Optional=TreatAsUndefined] WebGLVertexArrayObjectOES arrayObject) raises(DOMException); }; } diff --git a/Source/WebCore/html/canvas/Uint16Array.idl b/Source/WebCore/html/canvas/Uint16Array.idl index 83877b5..d6a3bb7 100644 --- a/Source/WebCore/html/canvas/Uint16Array.idl +++ b/Source/WebCore/html/canvas/Uint16Array.idl @@ -37,7 +37,7 @@ module html { const unsigned int BYTES_PER_ELEMENT = 2; readonly attribute unsigned long length; - Uint16Array subarray(in [Optional=CallWithDefaultValue] long start, in [Optional] long end); + Uint16Array subarray(in [Optional=TreatAsUndefined] long start, in [Optional] long end); // void set(in Uint16Array array, [Optional] in unsigned long offset); // void set(in sequence array, [Optional] in unsigned long offset); diff --git a/Source/WebCore/html/canvas/Uint32Array.idl b/Source/WebCore/html/canvas/Uint32Array.idl index 2726473..8f2823b 100644 --- a/Source/WebCore/html/canvas/Uint32Array.idl +++ b/Source/WebCore/html/canvas/Uint32Array.idl @@ -37,7 +37,7 @@ module html { const unsigned int BYTES_PER_ELEMENT = 4; readonly attribute unsigned long length; - Uint32Array subarray(in [Optional=CallWithDefaultValue] long start, in [Optional] long end); + Uint32Array subarray(in [Optional=TreatAsUndefined] long start, in [Optional] long end); // void set(in Uint32Array array, [Optional] in unsigned long offset); // void set(in sequence array, [Optional] in unsigned long offset); diff --git a/Source/WebCore/html/canvas/Uint8Array.idl b/Source/WebCore/html/canvas/Uint8Array.idl index 4892da8..c8cf2f4 100644 --- a/Source/WebCore/html/canvas/Uint8Array.idl +++ b/Source/WebCore/html/canvas/Uint8Array.idl @@ -37,7 +37,7 @@ module html { const unsigned int BYTES_PER_ELEMENT = 1; readonly attribute unsigned long length; - Uint8Array subarray(in [Optional=CallWithDefaultValue] long start, in [Optional] long end); + Uint8Array subarray(in [Optional=TreatAsUndefined] long start, in [Optional] long end); // void set(in Uint8Array array, [Optional] in unsigned long offset); // void set(in sequence array, [Optional] in unsigned long offset); diff --git a/Source/WebCore/html/canvas/Uint8ClampedArray.idl b/Source/WebCore/html/canvas/Uint8ClampedArray.idl index a9a49f3..3ad12fa 100644 --- a/Source/WebCore/html/canvas/Uint8ClampedArray.idl +++ b/Source/WebCore/html/canvas/Uint8ClampedArray.idl @@ -37,7 +37,7 @@ module html { const unsigned int BYTES_PER_ELEMENT = 1; readonly attribute unsigned long length; - Uint8ClampedArray subarray(in [Optional=CallWithDefaultValue] long start, in [Optional] long end); + Uint8ClampedArray subarray(in [Optional=TreatAsUndefined] long start, in [Optional] long end); // FIXME: Missing other setters! // void set(in Uint8ClampedArray array, [Optional] in unsigned long offset); diff --git a/Source/WebCore/page/Console.idl b/Source/WebCore/page/Console.idl index 42cd187..144b9f0 100644 --- a/Source/WebCore/page/Console.idl +++ b/Source/WebCore/page/Console.idl @@ -51,7 +51,7 @@ module window { [Custom] void profileEnd(in DOMString title); #endif - void time(in [TreatNullAs=NullString, TreatUndefinedAs=NullString,Optional=CallWithDefaultValue] DOMString title); + void time(in [TreatNullAs=NullString, TreatUndefinedAs=NullString,Optional=TreatAsUndefined] DOMString title); [CustomArgumentHandling] void timeEnd(in [TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString title); [CustomArgumentHandling] void timeStamp(); [CustomArgumentHandling] void group(); diff --git a/Source/WebCore/page/DOMSelection.idl b/Source/WebCore/page/DOMSelection.idl index ccd30e3..70245bd 100644 --- a/Source/WebCore/page/DOMSelection.idl +++ b/Source/WebCore/page/DOMSelection.idl @@ -43,8 +43,8 @@ module window { readonly attribute boolean isCollapsed; readonly attribute long rangeCount; - void collapse(in [Optional=CallWithDefaultValue] Node node, - in [Optional=CallWithDefaultValue] long index) + void collapse(in [Optional=TreatAsUndefined] Node node, + in [Optional=TreatAsUndefined] long index) raises(DOMException); void collapseToEnd() raises(DOMException); @@ -52,19 +52,19 @@ module window { raises(DOMException); void deleteFromDocument(); - boolean containsNode(in [Optional=CallWithDefaultValue] Node node, - in [Optional=CallWithDefaultValue] boolean allowPartial); - void selectAllChildren(in [Optional=CallWithDefaultValue] Node node) + boolean containsNode(in [Optional=TreatAsUndefined] Node node, + in [Optional=TreatAsUndefined] boolean allowPartial); + void selectAllChildren(in [Optional=TreatAsUndefined] Node node) raises(DOMException); - void extend(in [Optional=CallWithDefaultValue] Node node, - in [Optional=CallWithDefaultValue] long offset) + void extend(in [Optional=TreatAsUndefined] Node node, + in [Optional=TreatAsUndefined] long offset) raises(DOMException); - Range getRangeAt(in [Optional=CallWithDefaultValue] long index) + Range getRangeAt(in [Optional=TreatAsUndefined] long index) raises(DOMException); void removeAllRanges(); - void addRange(in [Optional=CallWithDefaultValue] Range range); + void addRange(in [Optional=TreatAsUndefined] Range range); #if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT [NotEnumerable] DOMString toString(); @@ -80,16 +80,16 @@ module window { // IE's type accessor returns "none", "text" and "control" readonly attribute DOMString type; - void modify(in [Optional=CallWithDefaultValue] DOMString alter, - in [Optional=CallWithDefaultValue] DOMString direction, - in [Optional=CallWithDefaultValue] DOMString granularity); - void setBaseAndExtent(in [Optional=CallWithDefaultValue] Node baseNode, - in [Optional=CallWithDefaultValue] long baseOffset, - in [Optional=CallWithDefaultValue] Node extentNode, - in [Optional=CallWithDefaultValue] long extentOffset) + void modify(in [Optional=TreatAsUndefined] DOMString alter, + in [Optional=TreatAsUndefined] DOMString direction, + in [Optional=TreatAsUndefined] DOMString granularity); + void setBaseAndExtent(in [Optional=TreatAsUndefined] Node baseNode, + in [Optional=TreatAsUndefined] long baseOffset, + in [Optional=TreatAsUndefined] Node extentNode, + in [Optional=TreatAsUndefined] long extentOffset) raises(DOMException); - void setPosition(in [Optional=CallWithDefaultValue] Node node, - in [Optional=CallWithDefaultValue] long offset) + void setPosition(in [Optional=TreatAsUndefined] Node node, + in [Optional=TreatAsUndefined] long offset) raises(DOMException); // IE extentions diff --git a/Source/WebCore/page/DOMWindow.idl b/Source/WebCore/page/DOMWindow.idl index 41ace04..3260d67 100644 --- a/Source/WebCore/page/DOMWindow.idl +++ b/Source/WebCore/page/DOMWindow.idl @@ -77,18 +77,18 @@ module window { in [Optional] DOMObject dialogArgs, in [Optional] DOMString featureArgs); - void alert(in [Optional=CallWithDefaultValue] DOMString message); - boolean confirm(in [Optional=CallWithDefaultValue] DOMString message); - [ConvertNullStringTo=Null] DOMString prompt(in [Optional=CallWithDefaultValue] DOMString message, - in [TreatNullAs=NullString, TreatUndefinedAs=NullString,Optional=CallWithDefaultValue] DOMString defaultValue); - - boolean find(in [Optional=CallWithDefaultValue] DOMString string, - in [Optional=CallWithDefaultValue] boolean caseSensitive, - in [Optional=CallWithDefaultValue] boolean backwards, - in [Optional=CallWithDefaultValue] boolean wrap, - in [Optional=CallWithDefaultValue] boolean wholeWord, - in [Optional=CallWithDefaultValue] boolean searchInFrames, - in [Optional=CallWithDefaultValue] boolean showDialog); + void alert(in [Optional=TreatAsUndefined] DOMString message); + boolean confirm(in [Optional=TreatAsUndefined] DOMString message); + [ConvertNullStringTo=Null] DOMString prompt(in [Optional=TreatAsUndefined] DOMString message, + in [TreatNullAs=NullString, TreatUndefinedAs=NullString,Optional=TreatAsUndefined] DOMString defaultValue); + + boolean find(in [Optional=TreatAsUndefined] DOMString string, + in [Optional=TreatAsUndefined] boolean caseSensitive, + in [Optional=TreatAsUndefined] boolean backwards, + in [Optional=TreatAsUndefined] boolean wrap, + in [Optional=TreatAsUndefined] boolean wholeWord, + in [Optional=TreatAsUndefined] boolean searchInFrames, + in [Optional=TreatAsUndefined] boolean showDialog); attribute [Replaceable] boolean offscreenBuffering; @@ -105,13 +105,13 @@ module window { readonly attribute long pageXOffset; readonly attribute long pageYOffset; - void scrollBy(in [Optional=CallWithDefaultValue] long x, in [Optional=CallWithDefaultValue] long y); - void scrollTo(in [Optional=CallWithDefaultValue] long x, in [Optional=CallWithDefaultValue] long y); - void scroll(in [Optional=CallWithDefaultValue] long x, in [Optional=CallWithDefaultValue] long y); - void moveBy(in [Optional=CallWithDefaultValue] float x, in [Optional=CallWithDefaultValue] float y); // FIXME: this should take longs not floats. - void moveTo(in [Optional=CallWithDefaultValue] float x, in [Optional=CallWithDefaultValue] float y); // FIXME: this should take longs not floats. - void resizeBy(in [Optional=CallWithDefaultValue] float x, in [Optional=CallWithDefaultValue] float y); // FIXME: this should take longs not floats. - void resizeTo(in [Optional=CallWithDefaultValue] float width, in [Optional=CallWithDefaultValue] float height); // FIXME: this should take longs not floats. + void scrollBy(in [Optional=TreatAsUndefined] long x, in [Optional=TreatAsUndefined] long y); + void scrollTo(in [Optional=TreatAsUndefined] long x, in [Optional=TreatAsUndefined] long y); + void scroll(in [Optional=TreatAsUndefined] long x, in [Optional=TreatAsUndefined] long y); + void moveBy(in [Optional=TreatAsUndefined] float x, in [Optional=TreatAsUndefined] float y); // FIXME: this should take longs not floats. + void moveTo(in [Optional=TreatAsUndefined] float x, in [Optional=TreatAsUndefined] float y); // FIXME: this should take longs not floats. + void resizeBy(in [Optional=TreatAsUndefined] float x, in [Optional=TreatAsUndefined] float y); // FIXME: this should take longs not floats. + void resizeTo(in [Optional=TreatAsUndefined] float width, in [Optional=TreatAsUndefined] float height); // FIXME: this should take longs not floats. readonly attribute [DoNotCheckDomainSecurity] boolean closed; @@ -145,21 +145,21 @@ module window { readonly attribute StyleMedia styleMedia; // DOM Level 2 Style Interface - CSSStyleDeclaration getComputedStyle(in [Optional=CallWithDefaultValue] Element element, - in [TreatNullAs=NullString, TreatUndefinedAs=NullString,Optional=CallWithDefaultValue] DOMString pseudoElement); + CSSStyleDeclaration getComputedStyle(in [Optional=TreatAsUndefined] Element element, + in [TreatNullAs=NullString, TreatUndefinedAs=NullString,Optional=TreatAsUndefined] DOMString pseudoElement); // WebKit extensions #if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT - CSSRuleList getMatchedCSSRules(in [Optional=CallWithDefaultValue] Element element, - in [Optional=CallWithDefaultValue] DOMString pseudoElement); + CSSRuleList getMatchedCSSRules(in [Optional=TreatAsUndefined] Element element, + in [Optional=TreatAsUndefined] DOMString pseudoElement); #endif attribute [Replaceable] double devicePixelRatio; - WebKitPoint webkitConvertPointFromPageToNode(in [Optional=CallWithDefaultValue] Node node, - in [Optional=CallWithDefaultValue] WebKitPoint p); - WebKitPoint webkitConvertPointFromNodeToPage(in [Optional=CallWithDefaultValue] Node node, - in [Optional=CallWithDefaultValue] WebKitPoint p); + WebKitPoint webkitConvertPointFromPageToNode(in [Optional=TreatAsUndefined] Node node, + in [Optional=TreatAsUndefined] WebKitPoint p); + WebKitPoint webkitConvertPointFromNodeToPage(in [Optional=TreatAsUndefined] Node node, + in [Optional=TreatAsUndefined] WebKitPoint p); readonly attribute [V8EnabledAtRuntime] DOMApplicationCache applicationCache; @@ -209,27 +209,27 @@ module window { #endif // Timers - [Custom] long setTimeout(in [Optional=CallWithDefaultValue] TimeoutHandler handler, - in [Optional=CallWithDefaultValue] long timeout); + [Custom] long setTimeout(in [Optional=TreatAsUndefined] TimeoutHandler handler, + in [Optional=TreatAsUndefined] long timeout); // [Custom] long setTimeout(in TimeoutHandler handler, in long timeout, arguments...); // [Custom] long setTimeout(in DOMString code, in long timeout); - void clearTimeout(in [Optional=CallWithDefaultValue] long handle); + void clearTimeout(in [Optional=TreatAsUndefined] long handle); [Custom] long setInterval(in TimeoutHandler handler, in long timeout); // [Custom] long setInterval(in TimeoutHandler handler, in long timeout, arguments...); // [Custom] long setInterval(in DOMString code, in long timeout); - void clearInterval(in [Optional=CallWithDefaultValue] long handle); + void clearInterval(in [Optional=TreatAsUndefined] long handle); #if defined(ENABLE_REQUEST_ANIMATION_FRAME) // WebKit animation extensions, being standardized in the WebPerf WG - long webkitRequestAnimationFrame(in [Callback] RequestAnimationFrameCallback callback, in [Optional=CallWithDefaultValue] Element element); + long webkitRequestAnimationFrame(in [Callback] RequestAnimationFrameCallback callback, in [Optional=TreatAsUndefined] Element element); void webkitCancelAnimationFrame(in long id); void webkitCancelRequestAnimationFrame(in long id); // This is a deprecated alias for webkitCancelAnimationFrame(). Remove this when removing vendor prefix. #endif // Base64 - DOMString atob(in [TreatNullAs=NullString,Optional=CallWithDefaultValue] DOMString string) + DOMString atob(in [TreatNullAs=NullString,Optional=TreatAsUndefined] DOMString string) raises(DOMException); - DOMString btoa(in [TreatNullAs=NullString,Optional=CallWithDefaultValue] DOMString string) + DOMString btoa(in [TreatNullAs=NullString,Optional=TreatAsUndefined] DOMString string) raises(DOMException); // Events diff --git a/Source/WebCore/page/History.idl b/Source/WebCore/page/History.idl index f703640..7902c07 100644 --- a/Source/WebCore/page/History.idl +++ b/Source/WebCore/page/History.idl @@ -41,7 +41,7 @@ module window { [DoNotCheckDomainSecurity, CallWith=ScriptExecutionContext] void back(); [DoNotCheckDomainSecurity, CallWith=ScriptExecutionContext] void forward(); - [DoNotCheckDomainSecurity, CallWith=ScriptExecutionContext] void go(in [Optional=CallWithDefaultValue] long distance); + [DoNotCheckDomainSecurity, CallWith=ScriptExecutionContext] void go(in [Optional=TreatAsUndefined] long distance); [Custom, V8EnabledAtRuntime] void pushState(in any data, in DOMString title, in [Optional] DOMString url) raises(DOMException); diff --git a/Source/WebCore/page/Location.idl b/Source/WebCore/page/Location.idl index d5d27e2..3b9a20f 100644 --- a/Source/WebCore/page/Location.idl +++ b/Source/WebCore/page/Location.idl @@ -46,8 +46,8 @@ module window { attribute [DoNotCheckDomainSecurityOnSetter, CustomSetter, V8Unforgeable] DOMString href; #endif - [Custom, V8OnInstance] void assign(in [Optional=CallWithDefaultValue] DOMString url); - [Custom, V8OnInstance] void replace(in [Optional=CallWithDefaultValue] DOMString url); + [Custom, V8OnInstance] void assign(in [Optional=TreatAsUndefined] DOMString url); + [Custom, V8OnInstance] void replace(in [Optional=TreatAsUndefined] DOMString url); [Custom, V8OnInstance] void reload(); // URI decomposition attributes diff --git a/Source/WebCore/plugins/DOMMimeTypeArray.idl b/Source/WebCore/plugins/DOMMimeTypeArray.idl index 3e2eff2..476d531 100644 --- a/Source/WebCore/plugins/DOMMimeTypeArray.idl +++ b/Source/WebCore/plugins/DOMMimeTypeArray.idl @@ -26,8 +26,8 @@ module window { IndexedGetter ] DOMMimeTypeArray { readonly attribute unsigned long length; - DOMMimeType item(in [Optional=CallWithDefaultValue] unsigned long index); - DOMMimeType namedItem(in [Optional=CallWithDefaultValue] DOMString name); + DOMMimeType item(in [Optional=TreatAsUndefined] unsigned long index); + DOMMimeType namedItem(in [Optional=TreatAsUndefined] DOMString name); }; } diff --git a/Source/WebCore/plugins/DOMPlugin.idl b/Source/WebCore/plugins/DOMPlugin.idl index bf3542d..5c3c9dd 100644 --- a/Source/WebCore/plugins/DOMPlugin.idl +++ b/Source/WebCore/plugins/DOMPlugin.idl @@ -28,8 +28,8 @@ module window { readonly attribute DOMString filename; readonly attribute DOMString description; readonly attribute unsigned long length; - DOMMimeType item(in [Optional=CallWithDefaultValue] unsigned long index); - DOMMimeType namedItem(in [Optional=CallWithDefaultValue] DOMString name); + DOMMimeType item(in [Optional=TreatAsUndefined] unsigned long index); + DOMMimeType namedItem(in [Optional=TreatAsUndefined] DOMString name); }; } diff --git a/Source/WebCore/plugins/DOMPluginArray.idl b/Source/WebCore/plugins/DOMPluginArray.idl index 32aa342..c5e7ce4 100644 --- a/Source/WebCore/plugins/DOMPluginArray.idl +++ b/Source/WebCore/plugins/DOMPluginArray.idl @@ -26,9 +26,9 @@ module window { IndexedGetter ] DOMPluginArray { readonly attribute unsigned long length; - DOMPlugin item(in [Optional=CallWithDefaultValue] unsigned long index); - DOMPlugin namedItem(in [Optional=CallWithDefaultValue] DOMString name); - void refresh(in [Optional=CallWithDefaultValue] boolean reload); + DOMPlugin item(in [Optional=TreatAsUndefined] unsigned long index); + DOMPlugin namedItem(in [Optional=TreatAsUndefined] DOMString name); + void refresh(in [Optional=TreatAsUndefined] boolean reload); }; } diff --git a/Source/WebCore/storage/IDBDatabase.idl b/Source/WebCore/storage/IDBDatabase.idl index f0b1d0c..991974f 100644 --- a/Source/WebCore/storage/IDBDatabase.idl +++ b/Source/WebCore/storage/IDBDatabase.idl @@ -45,11 +45,11 @@ module storage { raises (IDBDatabaseException); [CallWith=ScriptExecutionContext] IDBVersionChangeRequest setVersion(in DOMString version) raises (IDBDatabaseException); - [CallWith=ScriptExecutionContext] IDBTransaction transaction(in DOMStringList storeNames, in [Optional=CallWithDefaultValue] unsigned short mode) + [CallWith=ScriptExecutionContext] IDBTransaction transaction(in DOMStringList storeNames, in [Optional=TreatAsUndefined] unsigned short mode) raises (IDBDatabaseException); - [CallWith=ScriptExecutionContext] IDBTransaction transaction(in DOMString[] storeNames, in [Optional=CallWithDefaultValue] unsigned short mode) + [CallWith=ScriptExecutionContext] IDBTransaction transaction(in DOMString[] storeNames, in [Optional=TreatAsUndefined] unsigned short mode) raises (IDBDatabaseException); - [CallWith=ScriptExecutionContext] IDBTransaction transaction(in DOMString storeName, in [Optional=CallWithDefaultValue] unsigned short mode) + [CallWith=ScriptExecutionContext] IDBTransaction transaction(in DOMString storeName, in [Optional=TreatAsUndefined] unsigned short mode) raises (IDBDatabaseException); void close(); diff --git a/Source/WebCore/storage/StorageEvent.idl b/Source/WebCore/storage/StorageEvent.idl index 6414fcf..3e0c778 100644 --- a/Source/WebCore/storage/StorageEvent.idl +++ b/Source/WebCore/storage/StorageEvent.idl @@ -34,14 +34,14 @@ module storage { readonly attribute [InitializedByEventConstructor] DOMString url; readonly attribute [InitializedByEventConstructor] Storage storageArea; - void initStorageEvent(in [Optional=CallWithDefaultValue] DOMString typeArg, - in [Optional=CallWithDefaultValue] boolean canBubbleArg, - in [Optional=CallWithDefaultValue] boolean cancelableArg, - in [Optional=CallWithDefaultValue] DOMString keyArg, - in [Optional=CallWithDefaultValue,TreatNullAs=NullString] DOMString oldValueArg, - in [Optional=CallWithDefaultValue,TreatNullAs=NullString] DOMString newValueArg, - in [Optional=CallWithDefaultValue] DOMString urlArg, - in [Optional=CallWithDefaultValue] Storage storageAreaArg); + void initStorageEvent(in [Optional=TreatAsUndefined] DOMString typeArg, + in [Optional=TreatAsUndefined] boolean canBubbleArg, + in [Optional=TreatAsUndefined] boolean cancelableArg, + in [Optional=TreatAsUndefined] DOMString keyArg, + in [Optional=TreatAsUndefined,TreatNullAs=NullString] DOMString oldValueArg, + in [Optional=TreatAsUndefined,TreatNullAs=NullString] DOMString newValueArg, + in [Optional=TreatAsUndefined] DOMString urlArg, + in [Optional=TreatAsUndefined] Storage storageAreaArg); // Needed once we support initEventNS // void initStorageEventNS(in DOMString namespaceURI, in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in DOMString keyArg, in DOMString oldValueArg, in DOMString newValueArg, in DOMString urlArg, in Storage storageAreaArg); diff --git a/Source/WebCore/svg/ElementTimeControl.idl b/Source/WebCore/svg/ElementTimeControl.idl index 70164ab..1716d0a 100644 --- a/Source/WebCore/svg/ElementTimeControl.idl +++ b/Source/WebCore/svg/ElementTimeControl.idl @@ -32,9 +32,9 @@ module svg { OmitConstructor ] ElementTimeControl { void beginElement(); - void beginElementAt(in [Optional=CallWithDefaultValue] float offset); + void beginElementAt(in [Optional=TreatAsUndefined] float offset); void endElement(); - void endElementAt(in [Optional=CallWithDefaultValue] float offset); + void endElementAt(in [Optional=TreatAsUndefined] float offset); }; } diff --git a/Source/WebCore/svg/SVGDocument.idl b/Source/WebCore/svg/SVGDocument.idl index c5059f8..731c7e2 100644 --- a/Source/WebCore/svg/SVGDocument.idl +++ b/Source/WebCore/svg/SVGDocument.idl @@ -27,7 +27,7 @@ module svg { readonly attribute SVGSVGElement rootElement; // Overwrite the one in events::DocumentEvent - Event createEvent(in [Optional=CallWithDefaultValue] DOMString eventType) + Event createEvent(in [Optional=TreatAsUndefined] DOMString eventType) raises(DOMException); }; diff --git a/Source/WebCore/svg/SVGElementInstanceList.idl b/Source/WebCore/svg/SVGElementInstanceList.idl index e710839..39c84ff 100644 --- a/Source/WebCore/svg/SVGElementInstanceList.idl +++ b/Source/WebCore/svg/SVGElementInstanceList.idl @@ -29,6 +29,6 @@ module svg { ] SVGElementInstanceList { readonly attribute unsigned long length; - SVGElementInstance item(in [Optional=CallWithDefaultValue] unsigned long index); + SVGElementInstance item(in [Optional=TreatAsUndefined] unsigned long index); }; } diff --git a/Source/WebCore/svg/SVGFEDropShadowElement.idl b/Source/WebCore/svg/SVGFEDropShadowElement.idl index 91f654d..330ed26 100644 --- a/Source/WebCore/svg/SVGFEDropShadowElement.idl +++ b/Source/WebCore/svg/SVGFEDropShadowElement.idl @@ -29,8 +29,8 @@ module svg { readonly attribute SVGAnimatedNumber stdDeviationX; readonly attribute SVGAnimatedNumber stdDeviationY; - void setStdDeviation(in [Optional=CallWithDefaultValue] float stdDeviationX, - in [Optional=CallWithDefaultValue] float stdDeviationY); + void setStdDeviation(in [Optional=TreatAsUndefined] float stdDeviationX, + in [Optional=TreatAsUndefined] float stdDeviationY); }; } diff --git a/Source/WebCore/svg/SVGFEGaussianBlurElement.idl b/Source/WebCore/svg/SVGFEGaussianBlurElement.idl index 5a01add..61152ef 100644 --- a/Source/WebCore/svg/SVGFEGaussianBlurElement.idl +++ b/Source/WebCore/svg/SVGFEGaussianBlurElement.idl @@ -33,8 +33,8 @@ module svg { readonly attribute SVGAnimatedNumber stdDeviationX; readonly attribute SVGAnimatedNumber stdDeviationY; - void setStdDeviation(in [Optional=CallWithDefaultValue] float stdDeviationX, - in [Optional=CallWithDefaultValue] float stdDeviationY); + void setStdDeviation(in [Optional=TreatAsUndefined] float stdDeviationX, + in [Optional=TreatAsUndefined] float stdDeviationY); }; } diff --git a/Source/WebCore/svg/SVGFEMorphologyElement.idl b/Source/WebCore/svg/SVGFEMorphologyElement.idl index b31d74f..bbc7107 100644 --- a/Source/WebCore/svg/SVGFEMorphologyElement.idl +++ b/Source/WebCore/svg/SVGFEMorphologyElement.idl @@ -40,8 +40,8 @@ module svg { readonly attribute SVGAnimatedNumber radiusX; readonly attribute SVGAnimatedNumber radiusY; - void setRadius(in [Optional=CallWithDefaultValue] float radiusX, - in [Optional=CallWithDefaultValue] float radiusY); + void setRadius(in [Optional=TreatAsUndefined] float radiusX, + in [Optional=TreatAsUndefined] float radiusY); }; } diff --git a/Source/WebCore/svg/SVGFilterElement.idl b/Source/WebCore/svg/SVGFilterElement.idl index 4f984f4..13024cb 100644 --- a/Source/WebCore/svg/SVGFilterElement.idl +++ b/Source/WebCore/svg/SVGFilterElement.idl @@ -43,8 +43,8 @@ module svg { readonly attribute SVGAnimatedInteger filterResX; readonly attribute SVGAnimatedInteger filterResY; - void setFilterRes(in [Optional=CallWithDefaultValue] unsigned long filterResX, - in [Optional=CallWithDefaultValue] unsigned long filterResY); + void setFilterRes(in [Optional=TreatAsUndefined] unsigned long filterResX, + in [Optional=TreatAsUndefined] unsigned long filterResY); }; } diff --git a/Source/WebCore/svg/SVGLocatable.idl b/Source/WebCore/svg/SVGLocatable.idl index a83bca0..c675238 100644 --- a/Source/WebCore/svg/SVGLocatable.idl +++ b/Source/WebCore/svg/SVGLocatable.idl @@ -37,7 +37,7 @@ module svg { SVGRect getBBox(); SVGMatrix getCTM(); SVGMatrix getScreenCTM(); - SVGMatrix getTransformToElement(in [Optional=CallWithDefaultValue] SVGElement element) + SVGMatrix getTransformToElement(in [Optional=TreatAsUndefined] SVGElement element) raises(SVGException); }; diff --git a/Source/WebCore/svg/SVGMarkerElement.idl b/Source/WebCore/svg/SVGMarkerElement.idl index 1b13685..9c30484 100644 --- a/Source/WebCore/svg/SVGMarkerElement.idl +++ b/Source/WebCore/svg/SVGMarkerElement.idl @@ -51,7 +51,7 @@ module svg { readonly attribute SVGAnimatedAngle orientAngle; void setOrientToAuto(); - void setOrientToAngle(in [Optional=CallWithDefaultValue] SVGAngle angle); + void setOrientToAngle(in [Optional=TreatAsUndefined] SVGAngle angle); }; } diff --git a/Source/WebCore/svg/SVGPathElement.idl b/Source/WebCore/svg/SVGPathElement.idl index 89f637e..526bbf5 100644 --- a/Source/WebCore/svg/SVGPathElement.idl +++ b/Source/WebCore/svg/SVGPathElement.idl @@ -37,77 +37,77 @@ module svg { readonly attribute SVGAnimatedNumber pathLength; float getTotalLength(); - SVGPoint getPointAtLength(in [Optional=CallWithDefaultValue] float distance); - unsigned long getPathSegAtLength(in [Optional=CallWithDefaultValue] float distance); + SVGPoint getPointAtLength(in [Optional=TreatAsUndefined] float distance); + unsigned long getPathSegAtLength(in [Optional=TreatAsUndefined] float distance); SVGPathSegClosePath createSVGPathSegClosePath(); - SVGPathSegMovetoAbs createSVGPathSegMovetoAbs(in [Optional=CallWithDefaultValue] float x, - in [Optional=CallWithDefaultValue] float y); - SVGPathSegMovetoRel createSVGPathSegMovetoRel(in [Optional=CallWithDefaultValue] float x, - in [Optional=CallWithDefaultValue] float y); + SVGPathSegMovetoAbs createSVGPathSegMovetoAbs(in [Optional=TreatAsUndefined] float x, + in [Optional=TreatAsUndefined] float y); + SVGPathSegMovetoRel createSVGPathSegMovetoRel(in [Optional=TreatAsUndefined] float x, + in [Optional=TreatAsUndefined] float y); - SVGPathSegLinetoAbs createSVGPathSegLinetoAbs(in [Optional=CallWithDefaultValue] float x, - in [Optional=CallWithDefaultValue] float y); - SVGPathSegLinetoRel createSVGPathSegLinetoRel(in [Optional=CallWithDefaultValue] float x, - in [Optional=CallWithDefaultValue] float y); + SVGPathSegLinetoAbs createSVGPathSegLinetoAbs(in [Optional=TreatAsUndefined] float x, + in [Optional=TreatAsUndefined] float y); + SVGPathSegLinetoRel createSVGPathSegLinetoRel(in [Optional=TreatAsUndefined] float x, + in [Optional=TreatAsUndefined] float y); - SVGPathSegCurvetoCubicAbs createSVGPathSegCurvetoCubicAbs(in [Optional=CallWithDefaultValue] float x, - in [Optional=CallWithDefaultValue] float y, - in [Optional=CallWithDefaultValue] float x1, - in [Optional=CallWithDefaultValue] float y1, - in [Optional=CallWithDefaultValue] float x2, - in [Optional=CallWithDefaultValue] float y2); - SVGPathSegCurvetoCubicRel createSVGPathSegCurvetoCubicRel(in [Optional=CallWithDefaultValue] float x, - in [Optional=CallWithDefaultValue] float y, - in [Optional=CallWithDefaultValue] float x1, - in [Optional=CallWithDefaultValue] float y1, - in [Optional=CallWithDefaultValue] float x2, - in [Optional=CallWithDefaultValue] float y2); + SVGPathSegCurvetoCubicAbs createSVGPathSegCurvetoCubicAbs(in [Optional=TreatAsUndefined] float x, + in [Optional=TreatAsUndefined] float y, + in [Optional=TreatAsUndefined] float x1, + in [Optional=TreatAsUndefined] float y1, + in [Optional=TreatAsUndefined] float x2, + in [Optional=TreatAsUndefined] float y2); + SVGPathSegCurvetoCubicRel createSVGPathSegCurvetoCubicRel(in [Optional=TreatAsUndefined] float x, + in [Optional=TreatAsUndefined] float y, + in [Optional=TreatAsUndefined] float x1, + in [Optional=TreatAsUndefined] float y1, + in [Optional=TreatAsUndefined] float x2, + in [Optional=TreatAsUndefined] float y2); - SVGPathSegCurvetoQuadraticAbs createSVGPathSegCurvetoQuadraticAbs(in [Optional=CallWithDefaultValue] float x, - in [Optional=CallWithDefaultValue] float y, - in [Optional=CallWithDefaultValue] float x1, - in [Optional=CallWithDefaultValue] float y1); - SVGPathSegCurvetoQuadraticRel createSVGPathSegCurvetoQuadraticRel(in [Optional=CallWithDefaultValue] float x, - in [Optional=CallWithDefaultValue] float y, - in [Optional=CallWithDefaultValue] float x1, - in [Optional=CallWithDefaultValue] float y1); + SVGPathSegCurvetoQuadraticAbs createSVGPathSegCurvetoQuadraticAbs(in [Optional=TreatAsUndefined] float x, + in [Optional=TreatAsUndefined] float y, + in [Optional=TreatAsUndefined] float x1, + in [Optional=TreatAsUndefined] float y1); + SVGPathSegCurvetoQuadraticRel createSVGPathSegCurvetoQuadraticRel(in [Optional=TreatAsUndefined] float x, + in [Optional=TreatAsUndefined] float y, + in [Optional=TreatAsUndefined] float x1, + in [Optional=TreatAsUndefined] float y1); - SVGPathSegArcAbs createSVGPathSegArcAbs(in [Optional=CallWithDefaultValue] float x, - in [Optional=CallWithDefaultValue] float y, - in [Optional=CallWithDefaultValue] float r1, - in [Optional=CallWithDefaultValue] float r2, - in [Optional=CallWithDefaultValue] float angle, - in [Optional=CallWithDefaultValue] boolean largeArcFlag, - in [Optional=CallWithDefaultValue] boolean sweepFlag); - SVGPathSegArcRel createSVGPathSegArcRel(in [Optional=CallWithDefaultValue] float x, - in [Optional=CallWithDefaultValue] float y, - in [Optional=CallWithDefaultValue] float r1, - in [Optional=CallWithDefaultValue] float r2, - in [Optional=CallWithDefaultValue] float angle, - in [Optional=CallWithDefaultValue] boolean largeArcFlag, - in [Optional=CallWithDefaultValue] boolean sweepFlag); + SVGPathSegArcAbs createSVGPathSegArcAbs(in [Optional=TreatAsUndefined] float x, + in [Optional=TreatAsUndefined] float y, + in [Optional=TreatAsUndefined] float r1, + in [Optional=TreatAsUndefined] float r2, + in [Optional=TreatAsUndefined] float angle, + in [Optional=TreatAsUndefined] boolean largeArcFlag, + in [Optional=TreatAsUndefined] boolean sweepFlag); + SVGPathSegArcRel createSVGPathSegArcRel(in [Optional=TreatAsUndefined] float x, + in [Optional=TreatAsUndefined] float y, + in [Optional=TreatAsUndefined] float r1, + in [Optional=TreatAsUndefined] float r2, + in [Optional=TreatAsUndefined] float angle, + in [Optional=TreatAsUndefined] boolean largeArcFlag, + in [Optional=TreatAsUndefined] boolean sweepFlag); - SVGPathSegLinetoHorizontalAbs createSVGPathSegLinetoHorizontalAbs(in [Optional=CallWithDefaultValue] float x); - SVGPathSegLinetoHorizontalRel createSVGPathSegLinetoHorizontalRel(in [Optional=CallWithDefaultValue] float x); + SVGPathSegLinetoHorizontalAbs createSVGPathSegLinetoHorizontalAbs(in [Optional=TreatAsUndefined] float x); + SVGPathSegLinetoHorizontalRel createSVGPathSegLinetoHorizontalRel(in [Optional=TreatAsUndefined] float x); - SVGPathSegLinetoVerticalAbs createSVGPathSegLinetoVerticalAbs(in [Optional=CallWithDefaultValue] float y); - SVGPathSegLinetoVerticalRel createSVGPathSegLinetoVerticalRel(in [Optional=CallWithDefaultValue] float y); + SVGPathSegLinetoVerticalAbs createSVGPathSegLinetoVerticalAbs(in [Optional=TreatAsUndefined] float y); + SVGPathSegLinetoVerticalRel createSVGPathSegLinetoVerticalRel(in [Optional=TreatAsUndefined] float y); - SVGPathSegCurvetoCubicSmoothAbs createSVGPathSegCurvetoCubicSmoothAbs(in [Optional=CallWithDefaultValue] float x, - in [Optional=CallWithDefaultValue] float y, - in [Optional=CallWithDefaultValue] float x2, - in [Optional=CallWithDefaultValue] float y2); - SVGPathSegCurvetoCubicSmoothRel createSVGPathSegCurvetoCubicSmoothRel(in [Optional=CallWithDefaultValue] float x, - in [Optional=CallWithDefaultValue] float y, - in [Optional=CallWithDefaultValue] float x2, - in [Optional=CallWithDefaultValue] float y2); + SVGPathSegCurvetoCubicSmoothAbs createSVGPathSegCurvetoCubicSmoothAbs(in [Optional=TreatAsUndefined] float x, + in [Optional=TreatAsUndefined] float y, + in [Optional=TreatAsUndefined] float x2, + in [Optional=TreatAsUndefined] float y2); + SVGPathSegCurvetoCubicSmoothRel createSVGPathSegCurvetoCubicSmoothRel(in [Optional=TreatAsUndefined] float x, + in [Optional=TreatAsUndefined] float y, + in [Optional=TreatAsUndefined] float x2, + in [Optional=TreatAsUndefined] float y2); - SVGPathSegCurvetoQuadraticSmoothAbs createSVGPathSegCurvetoQuadraticSmoothAbs(in [Optional=CallWithDefaultValue] float x, - in [Optional=CallWithDefaultValue] float y); - SVGPathSegCurvetoQuadraticSmoothRel createSVGPathSegCurvetoQuadraticSmoothRel(in [Optional=CallWithDefaultValue] float x, - in [Optional=CallWithDefaultValue] float y); + SVGPathSegCurvetoQuadraticSmoothAbs createSVGPathSegCurvetoQuadraticSmoothAbs(in [Optional=TreatAsUndefined] float x, + in [Optional=TreatAsUndefined] float y); + SVGPathSegCurvetoQuadraticSmoothRel createSVGPathSegCurvetoQuadraticSmoothRel(in [Optional=TreatAsUndefined] float x, + in [Optional=TreatAsUndefined] float y); readonly attribute SVGPathSegList pathSegList; readonly attribute SVGPathSegList normalizedPathSegList; diff --git a/Source/WebCore/svg/SVGSVGElement.idl b/Source/WebCore/svg/SVGSVGElement.idl index ff0309a..42010ad 100644 --- a/Source/WebCore/svg/SVGSVGElement.idl +++ b/Source/WebCore/svg/SVGSVGElement.idl @@ -55,23 +55,23 @@ module svg { /*setter raises(DOMException)*/; readonly attribute SVGPoint currentTranslate; - unsigned long suspendRedraw(in [Optional=CallWithDefaultValue] unsigned long maxWaitMilliseconds); - void unsuspendRedraw(in [Optional=CallWithDefaultValue] unsigned long suspendHandleId); + unsigned long suspendRedraw(in [Optional=TreatAsUndefined] unsigned long maxWaitMilliseconds); + void unsuspendRedraw(in [Optional=TreatAsUndefined] unsigned long suspendHandleId); void unsuspendRedrawAll(); void forceRedraw(); void pauseAnimations(); void unpauseAnimations(); boolean animationsPaused(); float getCurrentTime(); - void setCurrentTime(in [Optional=CallWithDefaultValue] float seconds); - NodeList getIntersectionList(in [Optional=CallWithDefaultValue] SVGRect rect, - in [Optional=CallWithDefaultValue] SVGElement referenceElement); - NodeList getEnclosureList(in [Optional=CallWithDefaultValue] SVGRect rect, - in [Optional=CallWithDefaultValue] SVGElement referenceElement); - boolean checkIntersection(in [Optional=CallWithDefaultValue] SVGElement element, - in [Optional=CallWithDefaultValue] SVGRect rect); - boolean checkEnclosure(in [Optional=CallWithDefaultValue] SVGElement element, - in [Optional=CallWithDefaultValue] SVGRect rect); + void setCurrentTime(in [Optional=TreatAsUndefined] float seconds); + NodeList getIntersectionList(in [Optional=TreatAsUndefined] SVGRect rect, + in [Optional=TreatAsUndefined] SVGElement referenceElement); + NodeList getEnclosureList(in [Optional=TreatAsUndefined] SVGRect rect, + in [Optional=TreatAsUndefined] SVGElement referenceElement); + boolean checkIntersection(in [Optional=TreatAsUndefined] SVGElement element, + in [Optional=TreatAsUndefined] SVGRect rect); + boolean checkEnclosure(in [Optional=TreatAsUndefined] SVGElement element, + in [Optional=TreatAsUndefined] SVGRect rect); void deselectAll(); SVGNumber createSVGNumber(); @@ -81,8 +81,8 @@ module svg { SVGMatrix createSVGMatrix(); SVGRect createSVGRect(); SVGTransform createSVGTransform(); - SVGTransform createSVGTransformFromMatrix(in [Optional=CallWithDefaultValue] SVGMatrix matrix); - Element getElementById(in [Optional=CallWithDefaultValue] DOMString elementId); + SVGTransform createSVGTransformFromMatrix(in [Optional=TreatAsUndefined] SVGMatrix matrix); + Element getElementById(in [Optional=TreatAsUndefined] DOMString elementId); }; } diff --git a/Source/WebCore/svg/SVGStylable.idl b/Source/WebCore/svg/SVGStylable.idl index 481eec3..cdb55c6 100644 --- a/Source/WebCore/svg/SVGStylable.idl +++ b/Source/WebCore/svg/SVGStylable.idl @@ -35,7 +35,7 @@ module svg { readonly attribute SVGAnimatedString className; readonly attribute CSSStyleDeclaration style; - CSSValue getPresentationAttribute(in [Optional=CallWithDefaultValue] DOMString name); + CSSValue getPresentationAttribute(in [Optional=TreatAsUndefined] DOMString name); }; } diff --git a/Source/WebCore/svg/SVGTests.idl b/Source/WebCore/svg/SVGTests.idl index c914a7b..3beebaf 100644 --- a/Source/WebCore/svg/SVGTests.idl +++ b/Source/WebCore/svg/SVGTests.idl @@ -35,7 +35,7 @@ module svg { readonly attribute SVGStringList requiredExtensions; readonly attribute SVGStringList systemLanguage; - boolean hasExtension(in [Optional=CallWithDefaultValue] DOMString extension); + boolean hasExtension(in [Optional=TreatAsUndefined] DOMString extension); }; } diff --git a/Source/WebCore/svg/SVGTextContentElement.idl b/Source/WebCore/svg/SVGTextContentElement.idl index cdd32e9..833b954 100644 --- a/Source/WebCore/svg/SVGTextContentElement.idl +++ b/Source/WebCore/svg/SVGTextContentElement.idl @@ -42,20 +42,20 @@ module svg { long getNumberOfChars(); float getComputedTextLength(); - float getSubStringLength(in [Optional=CallWithDefaultValue,IsIndex] unsigned long offset, - in [Optional=CallWithDefaultValue,IsIndex] unsigned long length) + float getSubStringLength(in [Optional=TreatAsUndefined,IsIndex] unsigned long offset, + in [Optional=TreatAsUndefined,IsIndex] unsigned long length) raises(DOMException); - SVGPoint getStartPositionOfChar(in [Optional=CallWithDefaultValue,IsIndex] unsigned long offset) + SVGPoint getStartPositionOfChar(in [Optional=TreatAsUndefined,IsIndex] unsigned long offset) raises(DOMException); - SVGPoint getEndPositionOfChar(in [Optional=CallWithDefaultValue,IsIndex] unsigned long offset) + SVGPoint getEndPositionOfChar(in [Optional=TreatAsUndefined,IsIndex] unsigned long offset) raises(DOMException); - SVGRect getExtentOfChar(in [Optional=CallWithDefaultValue,IsIndex] unsigned long offset) + SVGRect getExtentOfChar(in [Optional=TreatAsUndefined,IsIndex] unsigned long offset) raises(DOMException); - float getRotationOfChar(in [Optional=CallWithDefaultValue,IsIndex] unsigned long offset) + float getRotationOfChar(in [Optional=TreatAsUndefined,IsIndex] unsigned long offset) raises(DOMException); - long getCharNumAtPosition(in [Optional=CallWithDefaultValue] SVGPoint point); - void selectSubString(in [Optional=CallWithDefaultValue,IsIndex] unsigned long offset, - in [Optional=CallWithDefaultValue,IsIndex] unsigned long length) + long getCharNumAtPosition(in [Optional=TreatAsUndefined] SVGPoint point); + void selectSubString(in [Optional=TreatAsUndefined,IsIndex] unsigned long offset, + in [Optional=TreatAsUndefined,IsIndex] unsigned long length) raises(DOMException); }; diff --git a/Source/WebCore/webaudio/AudioNode.idl b/Source/WebCore/webaudio/AudioNode.idl index 06f873e..9ca0752 100644 --- a/Source/WebCore/webaudio/AudioNode.idl +++ b/Source/WebCore/webaudio/AudioNode.idl @@ -30,10 +30,10 @@ module audio { readonly attribute unsigned long numberOfInputs; readonly attribute unsigned long numberOfOutputs; - void connect(in AudioNode destination, in [Optional=CallWithDefaultValue] unsigned long output, in [Optional=CallWithDefaultValue] unsigned long input) + void connect(in AudioNode destination, in [Optional=TreatAsUndefined] unsigned long output, in [Optional=TreatAsUndefined] unsigned long input) raises(DOMException); - void disconnect(in [Optional=CallWithDefaultValue] unsigned long output) + void disconnect(in [Optional=TreatAsUndefined] unsigned long output) raises(DOMException); }; } diff --git a/Source/WebCore/workers/SharedWorker.idl b/Source/WebCore/workers/SharedWorker.idl index 5c7e477..54dc312 100644 --- a/Source/WebCore/workers/SharedWorker.idl +++ b/Source/WebCore/workers/SharedWorker.idl @@ -36,7 +36,7 @@ module threads { ActiveDOMObject, JSCustomConstructor, ConstructorParameters=2, - Constructor(in DOMString scriptURL, in [Optional=CallWithNullValue] DOMString name), + Constructor(in DOMString scriptURL, in [Optional=TreatAsUndefined, TreatUndefinedAs=NullString] DOMString name), CallWith=ScriptExecutionContext, ConstructorRaisesException, JSCustomMarkFunction, diff --git a/Source/WebCore/workers/WorkerContext.idl b/Source/WebCore/workers/WorkerContext.idl index a2cd239..7f33cc5 100644 --- a/Source/WebCore/workers/WorkerContext.idl +++ b/Source/WebCore/workers/WorkerContext.idl @@ -59,10 +59,10 @@ module threads { // Timers [Custom] long setTimeout(in TimeoutHandler handler, in long timeout); // [Custom] long setTimeout(in DOMString code, in long timeout); - void clearTimeout(in [Optional=CallWithDefaultValue] long handle); + void clearTimeout(in [Optional=TreatAsUndefined] long handle); [Custom] long setInterval(in TimeoutHandler handler, in long timeout); // [Custom] long setInterval(in DOMString code, in long timeout); - void clearInterval(in [Optional=CallWithDefaultValue] long handle); + void clearInterval(in [Optional=TreatAsUndefined] long handle); // EventTarget interface diff --git a/Source/WebCore/xml/DOMParser.idl b/Source/WebCore/xml/DOMParser.idl index 7164008..f2365ef 100644 --- a/Source/WebCore/xml/DOMParser.idl +++ b/Source/WebCore/xml/DOMParser.idl @@ -21,7 +21,7 @@ module xpath { interface [ Constructor ] DOMParser { - Document parseFromString(in [Optional=CallWithDefaultValue] DOMString str, - in [Optional=CallWithDefaultValue] DOMString contentType); + Document parseFromString(in [Optional=TreatAsUndefined] DOMString str, + in [Optional=TreatAsUndefined] DOMString contentType); }; } diff --git a/Source/WebCore/xml/XMLSerializer.idl b/Source/WebCore/xml/XMLSerializer.idl index 5dabfdf..15ffd6e 100644 --- a/Source/WebCore/xml/XMLSerializer.idl +++ b/Source/WebCore/xml/XMLSerializer.idl @@ -23,7 +23,7 @@ module xpath { interface [ Constructor ] XMLSerializer { - DOMString serializeToString(in [Optional=CallWithDefaultValue] Node node) + DOMString serializeToString(in [Optional=TreatAsUndefined] Node node) raises(DOMException); }; diff --git a/Source/WebCore/xml/XPathEvaluator.idl b/Source/WebCore/xml/XPathEvaluator.idl index 4d47ecf..b97fc70 100644 --- a/Source/WebCore/xml/XPathEvaluator.idl +++ b/Source/WebCore/xml/XPathEvaluator.idl @@ -21,17 +21,17 @@ module xpath { interface [ Constructor ] XPathEvaluator { - XPathExpression createExpression(in [Optional=CallWithDefaultValue] DOMString expression, - in [Optional=CallWithDefaultValue] XPathNSResolver resolver) + XPathExpression createExpression(in [Optional=TreatAsUndefined] DOMString expression, + in [Optional=TreatAsUndefined] XPathNSResolver resolver) raises(DOMException); - XPathNSResolver createNSResolver(in [Optional=CallWithDefaultValue] Node nodeResolver); + XPathNSResolver createNSResolver(in [Optional=TreatAsUndefined] Node nodeResolver); - XPathResult evaluate(in [Optional=CallWithDefaultValue] DOMString expression, - in [Optional=CallWithDefaultValue] Node contextNode, - in [Optional=CallWithDefaultValue] XPathNSResolver resolver, - in [Optional=CallWithDefaultValue] unsigned short type, - in [Optional=CallWithDefaultValue] XPathResult inResult) + XPathResult evaluate(in [Optional=TreatAsUndefined] DOMString expression, + in [Optional=TreatAsUndefined] Node contextNode, + in [Optional=TreatAsUndefined] XPathNSResolver resolver, + in [Optional=TreatAsUndefined] unsigned short type, + in [Optional=TreatAsUndefined] XPathResult inResult) raises(DOMException); }; } diff --git a/Source/WebCore/xml/XPathExpression.idl b/Source/WebCore/xml/XPathExpression.idl index add53cf..9504011 100644 --- a/Source/WebCore/xml/XPathExpression.idl +++ b/Source/WebCore/xml/XPathExpression.idl @@ -21,9 +21,9 @@ module xpath { interface XPathExpression { - [ObjCLegacyUnnamedParameters] XPathResult evaluate(in [Optional=CallWithDefaultValue] Node contextNode, - in [Optional=CallWithDefaultValue] unsigned short type, - in [Optional=CallWithDefaultValue] XPathResult inResult) + [ObjCLegacyUnnamedParameters] XPathResult evaluate(in [Optional=TreatAsUndefined] Node contextNode, + in [Optional=TreatAsUndefined] unsigned short type, + in [Optional=TreatAsUndefined] XPathResult inResult) raises(DOMException); }; diff --git a/Source/WebCore/xml/XPathNSResolver.idl b/Source/WebCore/xml/XPathNSResolver.idl index e1d4e0e..58b343b 100644 --- a/Source/WebCore/xml/XPathNSResolver.idl +++ b/Source/WebCore/xml/XPathNSResolver.idl @@ -24,7 +24,7 @@ module xpath { ObjCProtocol, OmitConstructor ] XPathNSResolver { - [ConvertNullStringTo=Null] DOMString lookupNamespaceURI(in [Optional=CallWithDefaultValue] DOMString prefix); + [ConvertNullStringTo=Null] DOMString lookupNamespaceURI(in [Optional=TreatAsUndefined] DOMString prefix); }; } diff --git a/Source/WebCore/xml/XPathResult.idl b/Source/WebCore/xml/XPathResult.idl index cb5c922..cbf10e4 100644 --- a/Source/WebCore/xml/XPathResult.idl +++ b/Source/WebCore/xml/XPathResult.idl @@ -52,7 +52,7 @@ module xpath { Node iterateNext() raises (DOMException); - Node snapshotItem(in [Optional=CallWithDefaultValue] unsigned long index) + Node snapshotItem(in [Optional=TreatAsUndefined] unsigned long index) raises (DOMException); }; -- 2.7.4