2011-06-17 Mark Pilgrim <pilgrim@chromium.org>
Reviewed by Adam Barth.
Change IDL code generator to require all arguments by default
https://bugs.webkit.org/show_bug.cgi?id=62750
As per discussion on public-webapps, WebIDL is changing the default
behavior to require all function arguments by default and raise an
exception when an argument is missing. (This behavior is currently
opt-in in WebKit's IDL system, on a function-by-function basis, with
the "RequiresAllArguments=Raise" flag.) To order to match WebIDL as
closely as possible, this patch adds an interface-level
"LegacyDefaultOptionalArguments" flag and sets it on all existing IDL
files (500+), then changes the code generator Perl scripts to behave
the old way in the presence of the flag.
No new tests required, all existing tests still pass.
* bindings/scripts/CodeGeneratorJS.pm:
* bindings/scripts/CodeGeneratorV8.pm:
* bindings/scripts/test/TestCallback.idl:
* bindings/scripts/test/TestInterface.idl:
* bindings/scripts/test/TestMediaQueryListListener.idl:
* bindings/scripts/test/TestObj.idl:
* bindings/scripts/test/TestSerializedScriptValueInterface.idl:
* css/CSSCharsetRule.idl:
* css/CSSFontFaceRule.idl:
* css/CSSImportRule.idl:
* css/CSSMediaRule.idl:
* css/CSSPageRule.idl:
* css/CSSPrimitiveValue.idl:
* css/CSSRule.idl:
* css/CSSRuleList.idl:
* css/CSSStyleDeclaration.idl:
* css/CSSStyleRule.idl:
* css/CSSStyleSheet.idl:
* css/CSSUnknownRule.idl:
* css/CSSValue.idl:
* css/CSSValueList.idl:
* css/Counter.idl:
* css/MediaList.idl:
* css/MediaQueryList.idl:
* css/MediaQueryListListener.idl:
* css/RGBColor.idl:
* css/Rect.idl:
* css/StyleMedia.idl:
* css/StyleSheet.idl:
* css/StyleSheetList.idl:
* css/WebKitCSSKeyframeRule.idl:
* css/WebKitCSSKeyframesRule.idl:
* css/WebKitCSSMatrix.idl:
* css/WebKitCSSTransformValue.idl:
* dom/Attr.idl:
* dom/BeforeLoadEvent.idl:
* dom/BeforeProcessEvent.idl:
* dom/CDATASection.idl:
* dom/CharacterData.idl:
* dom/ClientRect.idl:
* dom/ClientRectList.idl:
* dom/Clipboard.idl:
* dom/Comment.idl:
* dom/CompositionEvent.idl:
* dom/CustomEvent.idl:
* dom/DOMCoreException.idl:
* dom/DOMImplementation.idl:
* dom/DOMStringList.idl:
* dom/DOMStringMap.idl:
* dom/DataTransferItem.idl:
* dom/DataTransferItems.idl:
* dom/DeviceMotionEvent.idl:
* dom/DeviceOrientationEvent.idl:
* dom/Document.idl:
* dom/DocumentFragment.idl:
* dom/DocumentType.idl:
* dom/Element.idl:
* dom/Entity.idl:
* dom/EntityReference.idl:
* dom/ErrorEvent.idl:
* dom/Event.idl:
* dom/EventException.idl:
* dom/EventListener.idl:
* dom/EventTarget.idl:
* dom/ExclusiveTrackList.idl:
* dom/GeneratedStream.idl:
* dom/HashChangeEvent.idl:
* dom/KeyboardEvent.idl:
* dom/MessageChannel.idl:
* dom/MessageEvent.idl:
* dom/MessagePort.idl:
* dom/MouseEvent.idl:
* dom/MultipleTrackList.idl:
* dom/MutationEvent.idl:
* dom/NamedNodeMap.idl:
* dom/Node.idl:
* dom/NodeFilter.idl:
* dom/NodeIterator.idl:
* dom/NodeList.idl:
* dom/Notation.idl:
* dom/OverflowEvent.idl:
* dom/PageTransitionEvent.idl:
* dom/PopStateEvent.idl:
* dom/ProcessingInstruction.idl:
* dom/ProgressEvent.idl:
* dom/Range.idl:
* dom/RangeException.idl:
* dom/RequestAnimationFrameCallback.idl:
* dom/Stream.idl:
* dom/StreamEvent.idl:
* dom/StreamList.idl:
* dom/StringCallback.idl:
* dom/Text.idl:
* dom/TextEvent.idl:
* dom/Touch.idl:
* dom/TouchEvent.idl:
* dom/TouchList.idl:
* dom/TrackList.idl:
* dom/TreeWalker.idl:
* dom/UIEvent.idl:
* dom/WebKitAnimationEvent.idl:
* dom/WebKitTransitionEvent.idl:
* dom/WheelEvent.idl:
* fileapi/Blob.idl:
* fileapi/DOMFileSystem.idl:
* fileapi/DOMFileSystemSync.idl:
* fileapi/DirectoryEntry.idl:
* fileapi/DirectoryEntrySync.idl:
* fileapi/DirectoryReader.idl:
* fileapi/DirectoryReaderSync.idl:
* fileapi/EntriesCallback.idl:
* fileapi/Entry.idl:
* fileapi/EntryArray.idl:
* fileapi/EntryArraySync.idl:
* fileapi/EntryCallback.idl:
* fileapi/EntrySync.idl:
* fileapi/ErrorCallback.idl:
* fileapi/File.idl:
* fileapi/FileCallback.idl:
* fileapi/FileEntry.idl:
* fileapi/FileEntrySync.idl:
* fileapi/FileError.idl:
* fileapi/FileException.idl:
* fileapi/FileList.idl:
* fileapi/FileReader.idl:
* fileapi/FileReaderSync.idl:
* fileapi/FileSystemCallback.idl:
* fileapi/FileWriter.idl:
* fileapi/FileWriterCallback.idl:
* fileapi/FileWriterSync.idl:
* fileapi/Metadata.idl:
* fileapi/MetadataCallback.idl:
* fileapi/OperationNotAllowedException.idl:
* fileapi/WebKitBlobBuilder.idl:
* fileapi/WebKitFlags.idl:
* html/DOMFormData.idl:
* html/DOMSettableTokenList.idl:
* html/DOMTokenList.idl:
* html/DOMURL.idl:
* html/HTMLAllCollection.idl:
* html/HTMLAnchorElement.idl:
* html/HTMLAppletElement.idl:
* html/HTMLAreaElement.idl:
* html/HTMLAudioElement.idl:
* html/HTMLBRElement.idl:
* html/HTMLBaseElement.idl:
* html/HTMLBaseFontElement.idl:
* html/HTMLBlockquoteElement.idl:
* html/HTMLBodyElement.idl:
* html/HTMLButtonElement.idl:
* html/HTMLCanvasElement.idl:
* html/HTMLCollection.idl:
* html/HTMLDListElement.idl:
* html/HTMLDataListElement.idl:
* html/HTMLDetailsElement.idl:
* html/HTMLDirectoryElement.idl:
* html/HTMLDivElement.idl:
* html/HTMLDocument.idl:
* html/HTMLElement.idl:
* html/HTMLEmbedElement.idl:
* html/HTMLFieldSetElement.idl:
* html/HTMLFontElement.idl:
* html/HTMLFormElement.idl:
* html/HTMLFrameElement.idl:
* html/HTMLFrameSetElement.idl:
* html/HTMLHRElement.idl:
* html/HTMLHeadElement.idl:
* html/HTMLHeadingElement.idl:
* html/HTMLHtmlElement.idl:
* html/HTMLIFrameElement.idl:
* html/HTMLImageElement.idl:
* html/HTMLInputElement.idl:
* html/HTMLIsIndexElement.idl:
* html/HTMLKeygenElement.idl:
* html/HTMLLIElement.idl:
* html/HTMLLabelElement.idl:
* html/HTMLLegendElement.idl:
* html/HTMLLinkElement.idl:
* html/HTMLMapElement.idl:
* html/HTMLMarqueeElement.idl:
* html/HTMLMediaElement.idl:
* html/HTMLMenuElement.idl:
* html/HTMLMetaElement.idl:
* html/HTMLMeterElement.idl:
* html/HTMLModElement.idl:
* html/HTMLOListElement.idl:
* html/HTMLObjectElement.idl:
* html/HTMLOptGroupElement.idl:
* html/HTMLOptionElement.idl:
* html/HTMLOptionsCollection.idl:
* html/HTMLOutputElement.idl:
* html/HTMLParagraphElement.idl:
* html/HTMLParamElement.idl:
* html/HTMLPreElement.idl:
* html/HTMLProgressElement.idl:
* html/HTMLQuoteElement.idl:
* html/HTMLScriptElement.idl:
* html/HTMLSelectElement.idl:
* html/HTMLSourceElement.idl:
* html/HTMLStyleElement.idl:
* html/HTMLTableCaptionElement.idl:
* html/HTMLTableCellElement.idl:
* html/HTMLTableColElement.idl:
* html/HTMLTableElement.idl:
* html/HTMLTableRowElement.idl:
* html/HTMLTableSectionElement.idl:
* html/HTMLTextAreaElement.idl:
* html/HTMLTitleElement.idl:
* html/HTMLTrackElement.idl:
* html/HTMLUListElement.idl:
* html/HTMLVideoElement.idl:
* html/ImageData.idl:
* html/MediaError.idl:
* html/SpellcheckRange.idl:
* html/SpellcheckRangeList.idl:
* html/TextMetrics.idl:
* html/TimeRanges.idl:
* html/ValidityState.idl:
* html/VoidCallback.idl:
* html/canvas/ArrayBuffer.idl:
* html/canvas/ArrayBufferView.idl:
* html/canvas/CanvasGradient.idl:
* html/canvas/CanvasPattern.idl:
* html/canvas/CanvasPixelArray.idl:
* html/canvas/CanvasRenderingContext.idl:
* html/canvas/CanvasRenderingContext2D.idl:
* html/canvas/DataView.idl:
* html/canvas/Float32Array.idl:
* html/canvas/Float64Array.idl:
* html/canvas/Int16Array.idl:
* html/canvas/Int32Array.idl:
* html/canvas/Int8Array.idl:
* html/canvas/OESStandardDerivatives.idl:
* html/canvas/OESTextureFloat.idl:
* html/canvas/OESVertexArrayObject.idl:
* html/canvas/Uint16Array.idl:
* html/canvas/Uint32Array.idl:
* html/canvas/Uint8Array.idl:
* html/canvas/WebGLActiveInfo.idl:
* html/canvas/WebGLBuffer.idl:
* html/canvas/WebGLContextAttributes.idl:
* html/canvas/WebGLContextEvent.idl:
* html/canvas/WebGLFramebuffer.idl:
* html/canvas/WebGLProgram.idl:
* html/canvas/WebGLRenderbuffer.idl:
* html/canvas/WebGLRenderingContext.idl:
* html/canvas/WebGLShader.idl:
* html/canvas/WebGLTexture.idl:
* html/canvas/WebGLUniformLocation.idl:
* html/canvas/WebGLVertexArrayObjectOES.idl:
* html/canvas/WebKitLoseContext.idl:
* inspector/InjectedScriptHost.idl:
* inspector/InspectorFrontendHost.idl:
* inspector/JavaScriptCallFrame.idl:
* inspector/ScriptProfile.idl:
* inspector/ScriptProfileNode.idl:
* loader/appcache/DOMApplicationCache.idl:
* notifications/Notification.idl:
* notifications/NotificationCenter.idl:
* page/AbstractView.idl:
* page/BarInfo.idl:
* page/Console.idl:
* page/Coordinates.idl:
* page/Crypto.idl:
* page/DOMSelection.idl:
* page/DOMWindow.idl:
* page/EventSource.idl:
* page/Geolocation.idl:
* page/Geoposition.idl:
* page/History.idl:
* page/Location.idl:
* page/MemoryInfo.idl:
* page/Navigator.idl:
* page/NavigatorUserMediaError.idl:
* page/NavigatorUserMediaErrorCallback.idl:
* page/NavigatorUserMediaSuccessCallback.idl:
* page/Performance.idl:
* page/PerformanceNavigation.idl:
* page/PerformanceTiming.idl:
* page/PositionCallback.idl:
* page/PositionError.idl:
* page/PositionErrorCallback.idl:
* page/Screen.idl:
* page/SpeechInputEvent.idl:
* page/SpeechInputResult.idl:
* page/SpeechInputResultList.idl:
* page/WebKitAnimation.idl:
* page/WebKitAnimationList.idl:
* page/WebKitPoint.idl:
* page/WorkerNavigator.idl:
* plugins/DOMMimeType.idl:
* plugins/DOMMimeTypeArray.idl:
* plugins/DOMPlugin.idl:
* plugins/DOMPluginArray.idl:
* storage/Database.idl:
* storage/DatabaseCallback.idl:
* storage/DatabaseSync.idl:
* storage/IDBAny.idl:
* storage/IDBCursor.idl:
* storage/IDBCursorWithValue.idl:
* storage/IDBDatabase.idl:
* storage/IDBDatabaseError.idl:
* storage/IDBDatabaseException.idl:
* storage/IDBFactory.idl:
* storage/IDBIndex.idl:
* storage/IDBKey.idl:
* storage/IDBKeyRange.idl:
* storage/IDBObjectStore.idl:
* storage/IDBRequest.idl:
* storage/IDBTransaction.idl:
* storage/IDBVersionChangeEvent.idl:
* storage/IDBVersionChangeRequest.idl:
* storage/SQLError.idl:
* storage/SQLException.idl:
* storage/SQLResultSet.idl:
* storage/SQLResultSetRowList.idl:
* storage/SQLStatementCallback.idl:
* storage/SQLStatementErrorCallback.idl:
* storage/SQLTransaction.idl:
* storage/SQLTransactionCallback.idl:
* storage/SQLTransactionErrorCallback.idl:
* storage/SQLTransactionSync.idl:
* storage/SQLTransactionSyncCallback.idl:
* storage/Storage.idl:
* storage/StorageEvent.idl:
* storage/StorageInfo.idl:
* storage/StorageInfoErrorCallback.idl:
* storage/StorageInfoQuotaCallback.idl:
* storage/StorageInfoUsageCallback.idl:
* svg/ElementTimeControl.idl:
* svg/SVGAElement.idl:
* svg/SVGAltGlyphElement.idl:
* svg/SVGAngle.idl:
* svg/SVGAnimateColorElement.idl:
* svg/SVGAnimateElement.idl:
* svg/SVGAnimateMotionElement.idl:
* svg/SVGAnimateTransformElement.idl:
* svg/SVGAnimatedAngle.idl:
* svg/SVGAnimatedBoolean.idl:
* svg/SVGAnimatedEnumeration.idl:
* svg/SVGAnimatedInteger.idl:
* svg/SVGAnimatedLength.idl:
* svg/SVGAnimatedLengthList.idl:
* svg/SVGAnimatedNumber.idl:
* svg/SVGAnimatedNumberList.idl:
* svg/SVGAnimatedPreserveAspectRatio.idl:
* svg/SVGAnimatedRect.idl:
* svg/SVGAnimatedString.idl:
* svg/SVGAnimatedTransformList.idl:
* svg/SVGAnimationElement.idl:
* svg/SVGCircleElement.idl:
* svg/SVGClipPathElement.idl:
* svg/SVGColor.idl:
* svg/SVGComponentTransferFunctionElement.idl:
* svg/SVGCursorElement.idl:
* svg/SVGDefsElement.idl:
* svg/SVGDescElement.idl:
* svg/SVGDocument.idl:
* svg/SVGElement.idl:
* svg/SVGElementInstance.idl:
* svg/SVGElementInstanceList.idl:
* svg/SVGEllipseElement.idl:
* svg/SVGException.idl:
* svg/SVGExternalResourcesRequired.idl:
* svg/SVGFEBlendElement.idl:
* svg/SVGFEColorMatrixElement.idl:
* svg/SVGFEComponentTransferElement.idl:
* svg/SVGFECompositeElement.idl:
* svg/SVGFEConvolveMatrixElement.idl:
* svg/SVGFEDiffuseLightingElement.idl:
* svg/SVGFEDisplacementMapElement.idl:
* svg/SVGFEDistantLightElement.idl:
* svg/SVGFEDropShadowElement.idl:
* svg/SVGFEFloodElement.idl:
* svg/SVGFEFuncAElement.idl:
* svg/SVGFEFuncBElement.idl:
* svg/SVGFEFuncGElement.idl:
* svg/SVGFEFuncRElement.idl:
* svg/SVGFEGaussianBlurElement.idl:
* svg/SVGFEImageElement.idl:
* svg/SVGFEMergeElement.idl:
* svg/SVGFEMergeNodeElement.idl:
* svg/SVGFEMorphologyElement.idl:
* svg/SVGFEOffsetElement.idl:
* svg/SVGFEPointLightElement.idl:
* svg/SVGFESpecularLightingElement.idl:
* svg/SVGFESpotLightElement.idl:
* svg/SVGFETileElement.idl:
* svg/SVGFETurbulenceElement.idl:
* svg/SVGFilterElement.idl:
* svg/SVGFilterPrimitiveStandardAttributes.idl:
* svg/SVGFitToViewBox.idl:
* svg/SVGFontElement.idl:
* svg/SVGFontFaceElement.idl:
* svg/SVGFontFaceFormatElement.idl:
* svg/SVGFontFaceNameElement.idl:
* svg/SVGFontFaceSrcElement.idl:
* svg/SVGFontFaceUriElement.idl:
* svg/SVGForeignObjectElement.idl:
* svg/SVGGElement.idl:
* svg/SVGGlyphElement.idl:
* svg/SVGGradientElement.idl:
* svg/SVGHKernElement.idl:
* svg/SVGImageElement.idl:
* svg/SVGLangSpace.idl:
* svg/SVGLength.idl:
* svg/SVGLengthList.idl:
* svg/SVGLineElement.idl:
* svg/SVGLinearGradientElement.idl:
* svg/SVGLocatable.idl:
* svg/SVGMPathElement.idl:
* svg/SVGMarkerElement.idl:
* svg/SVGMaskElement.idl:
* svg/SVGMatrix.idl:
* svg/SVGMetadataElement.idl:
* svg/SVGMissingGlyphElement.idl:
* svg/SVGNumber.idl:
* svg/SVGNumberList.idl:
* svg/SVGPaint.idl:
* svg/SVGPathElement.idl:
* svg/SVGPathSeg.idl:
* svg/SVGPathSegArcAbs.idl:
* svg/SVGPathSegArcRel.idl:
* svg/SVGPathSegClosePath.idl:
* svg/SVGPathSegCurvetoCubicAbs.idl:
* svg/SVGPathSegCurvetoCubicRel.idl:
* svg/SVGPathSegCurvetoCubicSmoothAbs.idl:
* svg/SVGPathSegCurvetoCubicSmoothRel.idl:
* svg/SVGPathSegCurvetoQuadraticAbs.idl:
* svg/SVGPathSegCurvetoQuadraticRel.idl:
* svg/SVGPathSegCurvetoQuadraticSmoothAbs.idl:
* svg/SVGPathSegCurvetoQuadraticSmoothRel.idl:
* svg/SVGPathSegLinetoAbs.idl:
* svg/SVGPathSegLinetoHorizontalAbs.idl:
* svg/SVGPathSegLinetoHorizontalRel.idl:
* svg/SVGPathSegLinetoRel.idl:
* svg/SVGPathSegLinetoVerticalAbs.idl:
* svg/SVGPathSegLinetoVerticalRel.idl:
* svg/SVGPathSegList.idl:
* svg/SVGPathSegMovetoAbs.idl:
* svg/SVGPathSegMovetoRel.idl:
* svg/SVGPatternElement.idl:
* svg/SVGPoint.idl:
* svg/SVGPointList.idl:
* svg/SVGPolygonElement.idl:
* svg/SVGPolylineElement.idl:
* svg/SVGPreserveAspectRatio.idl:
* svg/SVGRadialGradientElement.idl:
* svg/SVGRect.idl:
* svg/SVGRectElement.idl:
* svg/SVGRenderingIntent.idl:
* svg/SVGSVGElement.idl:
* svg/SVGScriptElement.idl:
* svg/SVGSetElement.idl:
* svg/SVGStopElement.idl:
* svg/SVGStringList.idl:
* svg/SVGStylable.idl:
* svg/SVGStyleElement.idl:
* svg/SVGSwitchElement.idl:
* svg/SVGSymbolElement.idl:
* svg/SVGTRefElement.idl:
* svg/SVGTSpanElement.idl:
* svg/SVGTests.idl:
* svg/SVGTextContentElement.idl:
* svg/SVGTextElement.idl:
* svg/SVGTextPathElement.idl:
* svg/SVGTextPositioningElement.idl:
* svg/SVGTitleElement.idl:
* svg/SVGTransform.idl:
* svg/SVGTransformList.idl:
* svg/SVGTransformable.idl:
* svg/SVGURIReference.idl:
* svg/SVGUnitTypes.idl:
* svg/SVGUseElement.idl:
* svg/SVGVKernElement.idl:
* svg/SVGViewElement.idl:
* svg/SVGViewSpec.idl:
* svg/SVGZoomAndPan.idl:
* svg/SVGZoomEvent.idl:
* testing/Internals.idl:
* webaudio/AudioBuffer.idl:
* webaudio/AudioBufferSourceNode.idl:
* webaudio/AudioChannelMerger.idl:
* webaudio/AudioChannelSplitter.idl:
* webaudio/AudioContext.idl:
* webaudio/AudioDestinationNode.idl:
* webaudio/AudioGain.idl:
* webaudio/AudioGainNode.idl:
* webaudio/AudioListener.idl:
* webaudio/AudioNode.idl:
* webaudio/AudioPannerNode.idl:
* webaudio/AudioParam.idl:
* webaudio/AudioProcessingEvent.idl:
* webaudio/AudioSourceNode.idl:
* webaudio/BiquadFilterNode.idl:
* webaudio/ConvolverNode.idl:
* webaudio/DelayNode.idl:
* webaudio/DynamicsCompressorNode.idl:
* webaudio/HighPass2FilterNode.idl:
* webaudio/JavaScriptAudioNode.idl:
* webaudio/LowPass2FilterNode.idl:
* webaudio/OfflineAudioCompletionEvent.idl:
* webaudio/RealtimeAnalyserNode.idl:
* websockets/CloseEvent.idl:
* websockets/WebSocket.idl:
* workers/AbstractWorker.idl:
* workers/DedicatedWorkerContext.idl:
* workers/SharedWorker.idl:
* workers/SharedWorkerContext.idl:
* workers/Worker.idl:
* workers/WorkerContext.idl:
* workers/WorkerLocation.idl:
* xml/DOMParser.idl:
* xml/XMLHttpRequest.idl:
* xml/XMLHttpRequestException.idl:
* xml/XMLHttpRequestProgressEvent.idl:
* xml/XMLHttpRequestUpload.idl:
* xml/XMLSerializer.idl:
* xml/XPathEvaluator.idl:
* xml/XPathException.idl:
* xml/XPathExpression.idl:
* xml/XPathNSResolver.idl:
* xml/XPathResult.idl:
* xml/XSLTProcessor.idl:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@89148
268f45cc-cd09-0410-ab3c-
d52691b4dbfc