Rename [Optional=CallWithDefalutValue] and [Optional=CallWithNullValue]
authorharaken@chromium.org <haraken@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Feb 2012 06:58:35 +0000 (06:58 +0000)
committerharaken@chromium.org <haraken@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Feb 2012 06:58:35 +0000 (06:58 +0000)
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<v8::Value>()).
- 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

141 files changed:
Source/WebCore/ChangeLog
Source/WebCore/Modules/gamepad/GamepadList.idl
Source/WebCore/Modules/intents/Intent.idl
Source/WebCore/bindings/js/JSDOMBinding.h
Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
Source/WebCore/bindings/scripts/CodeGeneratorV8.pm
Source/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.cpp
Source/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.h
Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp
Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h
Source/WebCore/bindings/scripts/test/JS/JSFloat64Array.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestObj.h
Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp
Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h
Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm
Source/WebCore/bindings/scripts/test/TestInterface.idl
Source/WebCore/bindings/scripts/test/TestNamedConstructor.idl
Source/WebCore/bindings/scripts/test/TestObj.idl
Source/WebCore/bindings/scripts/test/V8/V8Float64Array.cpp
Source/WebCore/bindings/scripts/test/V8/V8TestActiveDOMObject.cpp
Source/WebCore/bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp
Source/WebCore/bindings/scripts/test/V8/V8TestEventTarget.cpp
Source/WebCore/bindings/scripts/test/V8/V8TestInterface.cpp
Source/WebCore/bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp
Source/WebCore/bindings/scripts/test/V8/V8TestNamedConstructor.cpp
Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp
Source/WebCore/bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp
Source/WebCore/bindings/v8/V8Binding.h
Source/WebCore/bindings/v8/custom/V8BindingMacros.h
Source/WebCore/css/CSSMediaRule.idl
Source/WebCore/css/CSSPrimitiveValue.idl
Source/WebCore/css/CSSRuleList.idl
Source/WebCore/css/CSSStyleDeclaration.idl
Source/WebCore/css/CSSStyleSheet.idl
Source/WebCore/css/CSSValueList.idl
Source/WebCore/css/MediaList.idl
Source/WebCore/css/MediaQueryList.idl
Source/WebCore/css/MediaQueryListListener.idl
Source/WebCore/css/StyleMedia.idl
Source/WebCore/css/StyleSheetList.idl
Source/WebCore/css/WebKitCSSKeyframesRule.idl
Source/WebCore/css/WebKitCSSMatrix.idl
Source/WebCore/dom/CharacterData.idl
Source/WebCore/dom/ClientRectList.idl
Source/WebCore/dom/CompositionEvent.idl
Source/WebCore/dom/CustomEvent.idl
Source/WebCore/dom/DOMImplementation.idl
Source/WebCore/dom/DOMStringList.idl
Source/WebCore/dom/DataTransferItem.idl
Source/WebCore/dom/DataTransferItemList.idl
Source/WebCore/dom/DeviceMotionEvent.idl
Source/WebCore/dom/DeviceOrientationEvent.idl
Source/WebCore/dom/Document.idl
Source/WebCore/dom/Element.idl
Source/WebCore/dom/Event.idl
Source/WebCore/dom/HashChangeEvent.idl
Source/WebCore/dom/KeyboardEvent.idl
Source/WebCore/dom/MessageEvent.idl
Source/WebCore/dom/MouseEvent.idl
Source/WebCore/dom/MutationEvent.idl
Source/WebCore/dom/NamedNodeMap.idl
Source/WebCore/dom/Node.idl
Source/WebCore/dom/NodeFilter.idl
Source/WebCore/dom/NodeList.idl
Source/WebCore/dom/OverflowEvent.idl
Source/WebCore/dom/Range.idl
Source/WebCore/dom/ShadowRoot.idl
Source/WebCore/dom/Text.idl
Source/WebCore/dom/TextEvent.idl
Source/WebCore/dom/TouchEvent.idl
Source/WebCore/dom/UIEvent.idl
Source/WebCore/dom/WheelEvent.idl
Source/WebCore/html/DOMFormData.idl
Source/WebCore/html/HTMLAllCollection.idl
Source/WebCore/html/HTMLAudioElement.idl
Source/WebCore/html/HTMLCanvasElement.idl
Source/WebCore/html/HTMLCollection.idl
Source/WebCore/html/HTMLDocument.idl
Source/WebCore/html/HTMLElement.idl
Source/WebCore/html/HTMLInputElement.idl
Source/WebCore/html/HTMLMediaElement.idl
Source/WebCore/html/HTMLOptionElement.idl
Source/WebCore/html/HTMLOptionsCollection.idl
Source/WebCore/html/HTMLSelectElement.idl
Source/WebCore/html/HTMLTableElement.idl
Source/WebCore/html/HTMLTableRowElement.idl
Source/WebCore/html/HTMLTableSectionElement.idl
Source/WebCore/html/HTMLTextAreaElement.idl
Source/WebCore/html/TextTrackCue.idl
Source/WebCore/html/canvas/CanvasGradient.idl
Source/WebCore/html/canvas/CanvasRenderingContext2D.idl
Source/WebCore/html/canvas/Float32Array.idl
Source/WebCore/html/canvas/Float64Array.idl
Source/WebCore/html/canvas/Int16Array.idl
Source/WebCore/html/canvas/Int32Array.idl
Source/WebCore/html/canvas/Int8Array.idl
Source/WebCore/html/canvas/OESVertexArrayObject.idl
Source/WebCore/html/canvas/Uint16Array.idl
Source/WebCore/html/canvas/Uint32Array.idl
Source/WebCore/html/canvas/Uint8Array.idl
Source/WebCore/html/canvas/Uint8ClampedArray.idl
Source/WebCore/page/Console.idl
Source/WebCore/page/DOMSelection.idl
Source/WebCore/page/DOMWindow.idl
Source/WebCore/page/History.idl
Source/WebCore/page/Location.idl
Source/WebCore/plugins/DOMMimeTypeArray.idl
Source/WebCore/plugins/DOMPlugin.idl
Source/WebCore/plugins/DOMPluginArray.idl
Source/WebCore/storage/IDBDatabase.idl
Source/WebCore/storage/StorageEvent.idl
Source/WebCore/svg/ElementTimeControl.idl
Source/WebCore/svg/SVGDocument.idl
Source/WebCore/svg/SVGElementInstanceList.idl
Source/WebCore/svg/SVGFEDropShadowElement.idl
Source/WebCore/svg/SVGFEGaussianBlurElement.idl
Source/WebCore/svg/SVGFEMorphologyElement.idl
Source/WebCore/svg/SVGFilterElement.idl
Source/WebCore/svg/SVGLocatable.idl
Source/WebCore/svg/SVGMarkerElement.idl
Source/WebCore/svg/SVGPathElement.idl
Source/WebCore/svg/SVGSVGElement.idl
Source/WebCore/svg/SVGStylable.idl
Source/WebCore/svg/SVGTests.idl
Source/WebCore/svg/SVGTextContentElement.idl
Source/WebCore/webaudio/AudioNode.idl
Source/WebCore/workers/SharedWorker.idl
Source/WebCore/workers/WorkerContext.idl
Source/WebCore/xml/DOMParser.idl
Source/WebCore/xml/XMLSerializer.idl
Source/WebCore/xml/XPathEvaluator.idl
Source/WebCore/xml/XPathExpression.idl
Source/WebCore/xml/XPathNSResolver.idl
Source/WebCore/xml/XPathResult.idl

index 3b9dc1c..86d9a10 100644 (file)
@@ -1,5 +1,279 @@
 2012-02-08  Kentaro Hara  <haraken@chromium.org>
 
+        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<v8::Value>()).
+        - 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  <haraken@chromium.org>
+
         Rename [HasNumericIndexGetter] to [NumericIndexedGetter]
         https://bugs.webkit.org/show_bug.cgi?id=78096
 
index 6189ddc..e49fe15 100644 (file)
@@ -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);
     };
 
 }
index 33657f4..12c77f1 100644 (file)
@@ -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;
index 7e1af20..8d1599a 100644 (file)
 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;
index 2e91426..3312fc2 100644 (file)
@@ -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);
 
index 10015ad..7ea32a7 100644 (file)
@@ -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;
         }
     }
index d81871f..b98184d 100644 (file)
@@ -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()
index 6f9101d..a5b81dd 100644 (file)
@@ -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();
index 5f9f95f..8f2815b 100644 (file)
@@ -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)
 {
index f118dd8..7fe932c 100644 (file)
@@ -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
  *
index e2aabcd..6aae275 100644 (file)
@@ -235,7 +235,7 @@ EncodedJSValue JSC_HOST_CALL jsFloat64ArrayPrototypeFunctionFoo(ExecState* exec)
     Float64Array* impl = static_cast<Float64Array*>(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());
 
index f886cdd..1e3ea63 100644 (file)
@@ -186,7 +186,7 @@ EncodedJSValue JSC_HOST_CALL jsTestActiveDOMObjectPrototypeFunctionExcitingFunct
     TestActiveDOMObject* impl = static_cast<TestActiveDOMObject*>(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<TestActiveDOMObject*>(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);
index fdf0fa1..accb624 100644 (file)
@@ -176,7 +176,7 @@ EncodedJSValue JSC_HOST_CALL jsTestCustomNamedGetterPrototypeFunctionAnotherFunc
     TestCustomNamedGetter* impl = static_cast<TestCustomNamedGetter*>(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);
index 9a522f3..7409293 100644 (file)
@@ -231,7 +231,7 @@ EncodedJSValue JSC_HOST_CALL jsTestEventTargetPrototypeFunctionItem(ExecState* e
     TestEventTarget* impl = static_cast<TestEventTarget*>(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());
 
index 476d725..bac2f21 100644 (file)
@@ -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<JSDOMGlobalObject*>(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());
 
index 1a7821f..761ec56 100644 (file)
@@ -166,7 +166,7 @@ EncodedJSValue JSC_HOST_CALL jsTestMediaQueryListListenerPrototypeFunctionMethod
     TestMediaQueryListListener* impl = static_cast<TestMediaQueryListListener*>(castedThis->impl());
     if (exec->argumentCount() < 1)
         return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
-    RefPtr<MediaQueryListListener> listener(MediaQueryListListener::create(ScriptValue(exec->globalData(), MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined))));
+    RefPtr<MediaQueryListListener> listener(MediaQueryListListener::create(ScriptValue(exec->globalData(), MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefinedValue))));
     if (exec->hadException())
         return JSValue::encode(jsUndefined());
     impl->method(listener);
index 147f2c1..e75a8e2 100644 (file)
@@ -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<TestNamedConstructor> object = TestNamedConstructor::createForJSConstructor(jsConstructor->document(), str1, str2, str3, ec);
index 98e79b3..3b81f26 100644 (file)
@@ -269,6 +269,9 @@ static const HashTableValue JSTestObjPrototypeTableValues[] =
     { "methodWithOptionalArg", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalArg), (intptr_t)1, NoIntrinsic },
     { "methodWithNonOptionalArgAndOptionalArg", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg), (intptr_t)2, NoIntrinsic },
     { "methodWithNonOptionalArgAndTwoOptionalArgs", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs), (intptr_t)3, NoIntrinsic },
+    { "methodWithOptionalString", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalString), (intptr_t)1, NoIntrinsic },
+    { "methodWithOptionalIsTreatAsUndefinedString", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalIsTreatAsUndefinedString), (intptr_t)1, NoIntrinsic },
+    { "methodWithOptionalIsNullStringString", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalIsNullStringString), (intptr_t)1, NoIntrinsic },
     { "methodWithCallbackArg", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithCallbackArg), (intptr_t)1, NoIntrinsic },
     { "methodWithNonCallbackArgAndCallbackArg", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg), (intptr_t)2, NoIntrinsic },
     { "methodWithCallbackAndOptionalArg", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(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<TestObj*>(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<TestObj*>(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<TestObj*>(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<TestObj*>(castedThis->impl());
     if (exec->argumentCount() < 1)
         return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
-    RefPtr<SerializedScriptValue> serializedArg(SerializedScriptValue::create(exec, MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined)));
+    RefPtr<SerializedScriptValue> 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<TestObj*>(castedThis->impl());
     if (exec->argumentCount() < 1)
         return throwVMError(exec, createTypeError(exec, "Not enough arguments"));
-    RefPtr<IDBKey> key(createIDBKeyFromValue(exec, MAYBE_MISSING_PARAMETER(exec, 0, MissingIsUndefined)));
+    RefPtr<IDBKey> 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<TestObj*>(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> scriptArguments(createScriptArguments(exec, 1));
     RefPtr<ScriptCallStack> 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<TestObj*>(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<TestObj*>(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<JSTestObj*>(asObject(thisValue));
+    ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
+    TestObj* impl = static_cast<TestObj*>(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<JSTestObj*>(asObject(thisValue));
+    ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
+    TestObj* impl = static_cast<TestObj*>(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<JSTestObj*>(asObject(thisValue));
+    ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
+    TestObj* impl = static_cast<TestObj*>(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<TestObj*>(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<TestObj*>(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<TestObj*>(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<TestObj*>(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<TestObj*>(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<TestObj*>(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<TestObj*>(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<TestObj*>(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<TestObj*>(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<TestObj*>(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<TestObj*>(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<TestObj*>(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());
 
index 89cc932..5478b5b 100644 (file)
@@ -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*);
index 02deeda..1fdb862 100644 (file)
@@ -90,10 +90,10 @@ EncodedJSValue JSC_HOST_CALL JSTestSerializedScriptValueInterfaceConstructor::co
     JSTestSerializedScriptValueInterfaceConstructor* jsConstructor = static_cast<JSTestSerializedScriptValueInterfaceConstructor*>(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<SerializedScriptValue> value(SerializedScriptValue::create(exec, MAYBE_MISSING_PARAMETER(exec, 1, MissingIsUndefined)));
+    RefPtr<SerializedScriptValue> value(SerializedScriptValue::create(exec, MAYBE_MISSING_PARAMETER(exec, 1, MissingIsUndefinedValue)));
     if (exec->hadException())
         return JSValue::encode(jsUndefined());
     RefPtr<TestSerializedScriptValueInterface> object = TestSerializedScriptValueInterface::create(hello, value);
index 5474556..badca42 100644 (file)
@@ -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;
index b4ff638..a67beeb 100644 (file)
     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
index b043061..4b2d444 100644 (file)
@@ -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 {
     };
index fa8d3b3..2839f92 100644 (file)
@@ -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 {
     };
index 94e89e1..2b919a2 100644 (file)
@@ -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
index 26070b3..56367e0 100644 (file)
@@ -54,7 +54,7 @@ static v8::Handle<v8::Value> 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<v8::Object>::Cast(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined))) : 0);
+    EXCEPTION_BLOCK(Float32Array*, array, V8Float32Array::HasInstance(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue)) ? V8Float32Array::toNative(v8::Handle<v8::Object>::Cast(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue))) : 0);
     return toV8(imp->foo(array));
 }
 
index 6658287..cef804a 100644 (file)
@@ -55,7 +55,7 @@ static v8::Handle<v8::Value> excitingFunctionCallback(const v8::Arguments& args)
     TestActiveDOMObject* imp = V8TestActiveDOMObject::toNative(args.Holder());
     if (!V8BindingSecurity::canAccessFrame(V8BindingState::Only(), imp->frame(), true))
         return v8::Handle<v8::Value>();
-    EXCEPTION_BLOCK(Node*, nextChild, V8Node::HasInstance(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined)) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined))) : 0);
+    EXCEPTION_BLOCK(Node*, nextChild, V8Node::HasInstance(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue)) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue))) : 0);
     imp->excitingFunction(nextChild);
     return v8::Handle<v8::Value>();
 }
@@ -66,7 +66,7 @@ static v8::Handle<v8::Value> 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<v8::Value>();
 }
index bf1bc4a..9a7d58e 100644 (file)
@@ -45,7 +45,7 @@ static v8::Handle<v8::Value> 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<v8::Value>();
 }
index 00e0f34..c6cb53f 100644 (file)
@@ -50,7 +50,7 @@ static v8::Handle<v8::Value> 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<v8::Value> 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<v8::Object>::Cast(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined))) : 0);
+    EXCEPTION_BLOCK(Event*, evt, V8Event::HasInstance(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue)) ? V8Event::toNative(v8::Handle<v8::Object>::Cast(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue))) : 0);
     bool result = imp->dispatchEvent(evt, ec);
     if (UNLIKELY(ec))
         goto fail;
index 0477223..999913b 100644 (file)
@@ -103,8 +103,8 @@ static v8::Handle<v8::Value> 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<v8::Object>::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<v8::Object>::Cast(MAYBE_MISSING_PARAMETER(args, 1, MissingIsUndefinedValue))) : 0);
     ScriptExecutionContext* scriptContext = getScriptExecutionContext();
     if (!scriptContext)
         return v8::Undefined();
@@ -176,8 +176,8 @@ v8::Handle<v8::Value> 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)
index 142012d..327db4c 100644 (file)
@@ -46,7 +46,7 @@ static v8::Handle<v8::Value> 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<MediaQueryListListener>, listener, MediaQueryListListener::create(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined)));
+    EXCEPTION_BLOCK(RefPtr<MediaQueryListListener>, listener, MediaQueryListListener::create(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue)));
     imp->method(listener);
     return v8::Handle<v8::Value>();
 }
index 97f4a26..5846b58 100644 (file)
@@ -67,9 +67,9 @@ static v8::Handle<v8::Value> 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<TestNamedConstructor> impl = TestNamedConstructor::createForJSConstructor(document, str1, str2, str3, ec);
     v8::Handle<v8::Object> wrapper = args.Holder();
index 2ece582..d37e04e 100644 (file)
@@ -875,9 +875,9 @@ static v8::Handle<v8::Value> 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<v8::Object>::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<v8::Object>::Cast(MAYBE_MISSING_PARAMETER(args, 2, MissingIsUndefinedValue))) : 0);
     imp->voidMethodWithArgs(intArg, strArg, objArg);
     return v8::Handle<v8::Value>();
 }
@@ -895,9 +895,9 @@ static v8::Handle<v8::Value> 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<v8::Object>::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<v8::Object>::Cast(MAYBE_MISSING_PARAMETER(args, 2, MissingIsUndefinedValue))) : 0);
     return v8::Integer::New(imp->intMethodWithArgs(intArg, strArg, objArg));
 }
 
@@ -914,9 +914,9 @@ static v8::Handle<v8::Value> 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<v8::Object>::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<v8::Object>::Cast(MAYBE_MISSING_PARAMETER(args, 2, MissingIsUndefinedValue))) : 0);
     return toV8(imp->objMethodWithArgs(intArg, strArg, objArg));
 }
 
@@ -928,8 +928,8 @@ static v8::Handle<v8::Value> 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<v8::Object>::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<v8::Object>::Cast(MAYBE_MISSING_PARAMETER(args, 1, MissingIsUndefinedValue))) : 0);
     RefPtr<TestObj> result = imp->methodThatRequiresAllArgsAndThrows(strArg, objArg, ec);
     if (UNLIKELY(ec))
         goto fail;
@@ -960,7 +960,7 @@ static v8::Handle<v8::Value> 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<IDBKey>, key, createIDBKeyFromValue(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined)));
+    EXCEPTION_BLOCK(RefPtr<IDBKey>, key, createIDBKeyFromValue(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue)));
     imp->idbKey(key);
     return v8::Handle<v8::Value>();
 }
@@ -971,7 +971,7 @@ static v8::Handle<v8::Value> 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<v8::Value> optionsObjectCallback(const v8::Arguments& args)
         imp->optionsObject(oo);
         return v8::Handle<v8::Value>();
     }
-    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<v8::Value> customArgsAndExceptionCallback(const v8::Arguments&
     RefPtr<ScriptCallStack> callStack(createScriptCallStackForInspector());
     if (!callStack)
         return v8::Undefined();
-    EXCEPTION_BLOCK(log*, intArg, V8log::HasInstance(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined)) ? V8log::toNative(v8::Handle<v8::Object>::Cast(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined))) : 0);
+    EXCEPTION_BLOCK(log*, intArg, V8log::HasInstance(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue)) ? V8log::toNative(v8::Handle<v8::Object>::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<v8::Value> methodWithOptionalArgCallback(const v8::Arguments&
         imp->methodWithOptionalArg();
         return v8::Handle<v8::Value>();
     }
-    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<v8::Value>();
 }
@@ -1142,12 +1142,12 @@ static v8::Handle<v8::Value> 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<v8::Value>();
     }
-    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<v8::Value>();
 }
@@ -1158,21 +1158,52 @@ static v8::Handle<v8::Value> 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<v8::Value>();
     }
-    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<v8::Value>();
     }
-    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<v8::Value>();
 }
 
+static v8::Handle<v8::Value> 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<v8::Value>();
+    }
+    STRING_TO_V8PARAMETER_EXCEPTION_BLOCK(V8Parameter<>, str, MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue));
+    imp->methodWithOptionalString(str);
+    return v8::Handle<v8::Value>();
+}
+
+static v8::Handle<v8::Value> 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<v8::Value>();
+}
+
+static v8::Handle<v8::Value> 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<v8::Value>();
+}
+
 static v8::Handle<v8::Value> methodWithCallbackArgCallback(const v8::Arguments& args)
 {
     INC_STATS("DOM.TestObj.methodWithCallbackArg");
@@ -1192,7 +1223,7 @@ static v8::Handle<v8::Value> 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<TestCallback> callback = V8TestCallback::create(args[1], getScriptExecutionContext());
@@ -1255,8 +1286,8 @@ static v8::Handle<v8::Value> 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<v8::Object>::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<v8::Object>::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<v8::Value>();
 }
@@ -1267,12 +1298,12 @@ static v8::Handle<v8::Value> 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<v8::Object>::Cast(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined))) : 0);
+    EXCEPTION_BLOCK(TestObj*, objArg, V8TestObj::HasInstance(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue)) ? V8TestObj::toNative(v8::Handle<v8::Object>::Cast(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue))) : 0);
     if (args.Length() <= 1) {
         imp->overloadedMethod(objArg);
         return v8::Handle<v8::Value>();
     }
-    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<v8::Value>();
 }
@@ -1283,7 +1314,7 @@ static v8::Handle<v8::Value> 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<v8::Value>();
 }
@@ -1294,7 +1325,7 @@ static v8::Handle<v8::Value> 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<v8::Value>();
 }
@@ -1318,7 +1349,7 @@ static v8::Handle<v8::Value> 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<DOMStringList>, listArg, v8ValueToWebCoreDOMStringList(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined)));
+    EXCEPTION_BLOCK(RefPtr<DOMStringList>, listArg, v8ValueToWebCoreDOMStringList(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue)));
     imp->overloadedMethod(listArg);
     return v8::Handle<v8::Value>();
 }
@@ -1329,7 +1360,7 @@ static v8::Handle<v8::Value> 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<DOMStringList>, arrayArg, v8ValueToWebCoreDOMStringList(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined)));
+    EXCEPTION_BLOCK(RefPtr<DOMStringList>, arrayArg, v8ValueToWebCoreDOMStringList(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue)));
     imp->overloadedMethod(arrayArg);
     return v8::Handle<v8::Value>();
 }
@@ -1368,7 +1399,7 @@ static v8::Handle<v8::Value> 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<v8::Value> 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<v8::Value>();
 }
@@ -1393,7 +1424,7 @@ static v8::Handle<v8::Value> 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<v8::Value>();
 }
@@ -1421,7 +1452,7 @@ static v8::Handle<v8::Value> 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<v8::Object>::Cast(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined))) : 0);
+    EXCEPTION_BLOCK(int, intArg, V8int::HasInstance(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue)) ? V8int::toNative(v8::Handle<v8::Object>::Cast(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue))) : 0);
     imp->enabledAtRuntimeMethod1(intArg);
     return v8::Handle<v8::Value>();
 }
@@ -1432,7 +1463,7 @@ static v8::Handle<v8::Value> 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<v8::Object>::Cast(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined))) : 0);
+    EXCEPTION_BLOCK(int, intArg, V8int::HasInstance(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue)) ? V8int::toNative(v8::Handle<v8::Object>::Cast(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue))) : 0);
     imp->enabledAtRuntimeMethod2(intArg);
     return v8::Handle<v8::Value>();
 }
@@ -1461,7 +1492,7 @@ static v8::Handle<v8::Value> 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<v8::Object>::Cast(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined))) : 0);
+    EXCEPTION_BLOCK(a*, , V8a::HasInstance(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue)) ? V8a::toNative(v8::Handle<v8::Object>::Cast(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue))) : 0);
     imp->convert1();
     return v8::Handle<v8::Value>();
 }
@@ -1472,7 +1503,7 @@ static v8::Handle<v8::Value> 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<v8::Object>::Cast(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined))) : 0);
+    EXCEPTION_BLOCK(b*, , V8b::HasInstance(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue)) ? V8b::toNative(v8::Handle<v8::Object>::Cast(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue))) : 0);
     imp->convert2();
     return v8::Handle<v8::Value>();
 }
@@ -1483,7 +1514,7 @@ static v8::Handle<v8::Value> 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<v8::Object>::Cast(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined))) : 0);
+    EXCEPTION_BLOCK(c*, , V8c::HasInstance(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue)) ? V8c::toNative(v8::Handle<v8::Object>::Cast(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue))) : 0);
     imp->convert3();
     return v8::Handle<v8::Value>();
 }
@@ -1494,7 +1525,7 @@ static v8::Handle<v8::Value> 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<v8::Object>::Cast(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined))) : 0);
+    EXCEPTION_BLOCK(d*, , V8d::HasInstance(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue)) ? V8d::toNative(v8::Handle<v8::Object>::Cast(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefinedValue))) : 0);
     imp->convert4();
     return v8::Handle<v8::Value>();
 }
@@ -1505,7 +1536,7 @@ static v8::Handle<v8::Value> 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<v8::Object>::Cast(MAYBE_MISSING_PARAMETER(args, 0, MissingIsUndefined))) : 0);
+    EXCEPTION_BLOCK(e*, , V8e::HasInstance(MAYBE_MISSING_PARAMETER(args, 0, MissingIsNullValue)) ? V8e::toNative(v8::Handle<v8::Object>::Cast(MAYBE_MISSING_PARAMETER(args, 0, MissingIsNullValue))) : 0);
     imp->convert5();
     return v8::Handle<v8::Value>();
 }
@@ -1540,9 +1571,9 @@ static v8::Handle<v8::Value> 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<float>(MAYBE_MISSING_PARAMETER(args, 1, MissingIsUndefined)->NumberValue()));
-    EXCEPTION_BLOCK(int, b, V8int::HasInstance(MAYBE_MISSING_PARAMETER(args, 2, MissingIsUndefined)) ? V8int::toNative(v8::Handle<v8::Object>::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<float>(MAYBE_MISSING_PARAMETER(args, 1, MissingIsUndefinedValue)->NumberValue()));
+    EXCEPTION_BLOCK(int, b, V8int::HasInstance(MAYBE_MISSING_PARAMETER(args, 2, MissingIsUndefinedValue)) ? V8int::toNative(v8::Handle<v8::Object>::Cast(MAYBE_MISSING_PARAMETER(args, 2, MissingIsUndefinedValue))) : 0);
     RefPtr<bool> 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},
index 27e51b2..f409e04 100644 (file)
@@ -127,7 +127,7 @@ v8::Handle<v8::Value> 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<SerializedScriptValue> value = SerializedScriptValue::create(args[1], 0, 0, valueDidThrow);
     if (valueDidThrow)
index 528b4fb..8fd1a88 100644 (file)
@@ -512,8 +512,8 @@ namespace WebCore {
     }
 
     enum ParameterMissingPolicy {
-        MissingIsUndefined,
-        MissingIsEmpty
+        MissingIsUndefinedValue,
+        MissingIsNullValue
     };
 
 } // namespace WebCore
index 7242a36..a3c3e9d 100644 (file)
@@ -48,4 +48,4 @@
         return;
 
 #define MAYBE_MISSING_PARAMETER(args, index, policy) \
-    (((policy) == MissingIsEmpty && (index) >= (args).Length()) ? (v8::Local<v8::Value>()) : ((args)[(index)]))
+    (((policy) == MissingIsNullValue && (index) >= (args).Length()) ? (v8::Local<v8::Value>()) : ((args)[(index)]))
index c62ac9b..a8542f2 100644 (file)
@@ -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);
     };
 
index 8d44737..6d6658f 100644 (file)
@@ -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);
index eff0293..1c6f46b 100644 (file)
@@ -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);
     };
 
 }
index 14683d1..44a9326 100644 (file)
@@ -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);
     };
 
 }
index e2514f0..6fae6d6 100644 (file)
@@ -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);
     };
 
index 0a4051b..42d8e05 100644 (file)
@@ -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);
     };
 
 }
index ed0d2ba..e11698d 100644 (file)
@@ -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);
 
     };
index 0d8b1f2..020fb77 100644 (file)
@@ -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);
     };
 }
index cd499ea..6d2d618 100644 (file)
@@ -24,6 +24,6 @@ module view {
         CPPPureInterface,
         OmitConstructor
     ] MediaQueryListListener {
-        void queryChanged(in [Optional=CallWithDefaultValue] MediaQueryList list);
+        void queryChanged(in [Optional=TreatAsUndefined] MediaQueryList list);
     };
 }
index 6ff4578..977e0ba 100644 (file)
@@ -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);
     };
 }
index 67390b2..bfe8f20 100644 (file)
@@ -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);
     };
 
 }
index daf2e7e..567bf4d 100644 (file)
@@ -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);
     };
 
 }
index c6adabf..e6127de 100644 (file)
@@ -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();
     };
index dcf796a..ed6e613 100644 (file)
@@ -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);
     
     };
index 45d6f48..816152d 100644 (file)
@@ -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.
     };
 
index a28292c..934e0b5 100644 (file)
@@ -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);
 
     };
 
index 53a1ffc..0ecd460 100644 (file)
@@ -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
 
index 0a2368e..7324ce0 100644 (file)
@@ -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);
     };
 
 }
index 8238575..0640273 100644 (file)
@@ -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);
     };
 
 }
index befd7e2..8306d28 100644 (file)
@@ -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();
     };
 
index 8fcc47d..a5df203 100644 (file)
@@ -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);
     };
 
 }
index fe1b750..3105009 100644 (file)
@@ -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);
     };
 
 }
index 11833be..c8c28d6 100644 (file)
@@ -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);
     };
 
 }
index de7b04d..d72dbab 100644 (file)
@@ -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);
index 20d4c8e..ae9fe0b 100644 (file)
@@ -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
index 94d4542..f135cbd 100644 (file)
@@ -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;
index b2b4887..a5776f3 100644 (file)
@@ -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;
     };
index e71361f..62d57f7 100644 (file)
@@ -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
 
     };
index 1232359..bf9379e 100644 (file)
@@ -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
 
     };
index 3ece01c..4d62b6c 100644 (file)
@@ -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;
index 5aee2e5..6c4cb83 100644 (file)
@@ -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);
 
     };
 
index 3c07a11..4f927d3 100644 (file)
@@ -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);
 
     };
index b67be68..99faf35 100644 (file)
@@ -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, 
index 8edef0e..c7112cb 100644 (file)
@@ -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);
 
     };
 
index ebe813f..e258a99 100644 (file)
@@ -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;
 
index a1ecc41..65737bc 100644 (file)
@@ -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
     };
 
index eb7168f..12330ae 100644 (file)
@@ -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
index 011d679..5bfa106 100644 (file)
@@ -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);
     };
 
 }
index d781677..f5d492e 100644 (file)
@@ -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);
     };
 
index 2421b65..d18cb94 100644 (file)
@@ -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);
 
     };
 
index 39edfc8..1466d23 100644 (file)
@@ -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);
     };
 }
index 83dcdc9..0d7ec76 100644 (file)
@@ -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;
index e0fd563..a1df96a 100644 (file)
@@ -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) */
     };
 }
index 73ac211..4c9a8eb 100644 (file)
@@ -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);
     };
 
 }
index 3068e40..a39b5ea 100644 (file)
@@ -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.
index 1091646..b626e13 100644 (file)
@@ -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 {
     };
 }
index 35a806c..4ae7085 100644 (file)
@@ -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
 
index a4d172d..484a2aa 100644 (file)
@@ -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
     };
 
index dd020e2..ab03929 100644 (file)
@@ -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;
index 308010f..33020cd 100644 (file)
@@ -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;
index 4e218b9..133d0b6 100644 (file)
@@ -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
 
index 4260c20..4129d47 100644 (file)
@@ -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;
index 73e9c3b..92d7b49 100644 (file)
@@ -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;
index b286439..a6cd1c3 100644 (file)
@@ -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); 
index 5d60ef4..00d2939 100644 (file)
@@ -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;
     };
 
index 7c046eb..84923d6 100644 (file)
@@ -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);
     };
 
 }
index 482c61f..649c247 100644 (file)
@@ -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);
     };
 
 }
index 1553b5e..676517b 100644 (file)
@@ -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);
     };
 
 }
index 3b76115..099727b 100644 (file)
@@ -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;
index 4f7a40b..85535db 100644 (file)
@@ -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,
index 75b1927..08229f5 100644 (file)
@@ -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);
 
     };
index d4560f7..74bf672 100644 (file)
@@ -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);
     };
 
index 785ed81..b64c4b8 100644 (file)
@@ -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);
index 7180811..9bfe746 100644 (file)
@@ -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);
index 40e18d5..3174c99 100644 (file)
@@ -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);
index 0f5320a..eb1c8ae 100644 (file)
@@ -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);
index 9984ada..7541582 100644 (file)
@@ -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);
index c4adf99..0f5269e 100644 (file)
@@ -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);
     };
 }
index 83877b5..d6a3bb7 100644 (file)
@@ -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<long> array, [Optional] in unsigned long offset);
index 2726473..8f2823b 100644 (file)
@@ -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<long> array, [Optional] in unsigned long offset);
index 4892da8..c8cf2f4 100644 (file)
@@ -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<long> array, [Optional] in unsigned long offset);
index a9a49f3..3ad12fa 100644 (file)
@@ -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);
index 42cd187..144b9f0 100644 (file)
@@ -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();
index ccd30e3..70245bd 100644 (file)
@@ -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
index 41ace04..3260d67 100644 (file)
@@ -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
index f703640..7902c07 100644 (file)
@@ -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);
index d5d27e2..3b9a20f 100644 (file)
@@ -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
index 3e2eff2..476d531 100644 (file)
@@ -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);
     };
 
 }
index bf3542d..5c3c9dd 100644 (file)
@@ -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);
     };
 
 }
index 32aa342..c5e7ce4 100644 (file)
@@ -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);
     };
 
 }
index f0b1d0c..991974f 100644 (file)
@@ -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();
 
index 6414fcf..3e0c778 100644 (file)
@@ -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 init<blank>EventNS
         // 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);
index 70164ab..1716d0a 100644 (file)
@@ -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);
     };
 
 }
index c5059f8..731c7e2 100644 (file)
@@ -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);
     };
 
index e710839..39c84ff 100644 (file)
@@ -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);
     };
 }
index 91f654d..330ed26 100644 (file)
@@ -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);
     };
 
 }
index 5a01add..61152ef 100644 (file)
@@ -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);
     };
 
 }
index b31d74f..bbc7107 100644 (file)
@@ -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);
     };
 
 }
index 4f984f4..13024cb 100644 (file)
@@ -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);
     };
 
 }
index a83bca0..c675238 100644 (file)
@@ -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);
     };
 
index 1b13685..9c30484 100644 (file)
@@ -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);
     };
 
 }
index 89f637e..526bbf5 100644 (file)
@@ -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;
index ff0309a..42010ad 100644 (file)
@@ -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);
     };
 
 }
index 481eec3..cdb55c6 100644 (file)
@@ -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);
     };
 
 }
index c914a7b..3beebaf 100644 (file)
@@ -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);
     };
 
 }
index cdd32e9..833b954 100644 (file)
@@ -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);
     };
 
index 06f873e..9ca0752 100644 (file)
@@ -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);
     };
 }
index 5c7e477..54dc312 100644 (file)
@@ -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,
index a2cd239..7f33cc5 100644 (file)
@@ -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
index 7164008..f2365ef 100644 (file)
@@ -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);
     };
 }
index 5dabfdf..15ffd6e 100644 (file)
@@ -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);
     };
 
index 4d47ecf..b97fc70 100644 (file)
@@ -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);
     };
 }
index add53cf..9504011 100644 (file)
@@ -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);
     };
 
index e1d4e0e..58b343b 100644 (file)
@@ -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);
     };
 
 }
index cb5c922..cbf10e4 100644 (file)
@@ -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);
     };