haikuwebkit/Source/WebCore/html/HTMLDialogElement.idl

36 lines
1.6 KiB
Plaintext
Raw Permalink Normal View History

Add a runtime-disabled dialog element skeleton https://bugs.webkit.org/show_bug.cgi?id=199839 Patch by Alex Christensen <achristensen@webkit.org> on 2019-07-17 Reviewed by Ryosuke Niwa. LayoutTests/imported/w3c: * web-platform-tests/custom-elements/builtin-coverage-expected.txt: * web-platform-tests/dom/nodes/Node-cloneNode-expected.txt: * web-platform-tests/html/dom/reflection-misc-expected.txt: * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/centering-expected.txt: * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-close-expected.txt: * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-open-expected.txt: * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-showModal-expected.txt: * web-platform-tests/html/semantics/interfaces-expected.txt: Source/WebCore: Beginning implementation of https://html.spec.whatwg.org/multipage/interactive-elements.html#the-dialog-element Covered by rebaselining WPT tests. * CMakeLists.txt: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * bindings/js/WebCoreBuiltinNames.h: * html/HTMLDialogElement.cpp: Added. (WebCore::HTMLDialogElement::HTMLDialogElement): (WebCore::HTMLDialogElement::open): (WebCore::HTMLDialogElement::setOpen): (WebCore::HTMLDialogElement::returnValue): (WebCore::HTMLDialogElement::setReturnValue): (WebCore::HTMLDialogElement::show): (WebCore::HTMLDialogElement::showModal): (WebCore::HTMLDialogElement::close): * html/HTMLDialogElement.h: Added. * html/HTMLDialogElement.idl: Added. * html/HTMLTagNames.in: * page/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::setDialogElementEnabled): (WebCore::RuntimeEnabledFeatures::dialogElementEnabled const): Source/WebKit: * Shared/WebPreferences.yaml: * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetDialogElementEnabled): (WKPreferencesGetDialogElementEnabled): * UIProcess/API/C/WKPreferencesRefPrivate.h: Add SPI to enable the dialog element for tests. Source/WebKitLegacy/mac: * WebView/WebPreferenceKeysPrivate.h: * WebView/WebPreferences.mm: (+[WebPreferences initialize]): (-[WebPreferences dialogElementEnabled]): (-[WebPreferences setDialogElementEnabled:]): * WebView/WebPreferencesPrivate.h: * WebView/WebView.mm: (-[WebView _preferencesChanged:]): Add SPI to enable the dialog element for tests. Tools: * DumpRenderTree/mac/DumpRenderTree.mm: (resetWebPreferencesToConsistentValues): * WebKitTestRunner/TestController.cpp: (WTR::TestController::resetPreferencesToConsistentValues): Enable the dialog element for layout tests. Canonical link: https://commits.webkit.org/213747@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247527 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-07-17 18:58:14 +00:00
/*
* Copyright (C) 2019 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
[
Exposed=Window,
EnabledAtRuntime=DialogElement,
] interface HTMLDialogElement : HTMLElement {
LayoutTests/imported/w3c: Very basic <dialog> show/close support https://bugs.webkit.org/show_bug.cgi?id=205543 Reviewed by Antti Koivisto. New results, some new passes. * web-platform-tests/html/rendering/non-replaced-elements/flow-content-0/dialog-display-expected.txt: * web-platform-tests/html/rendering/non-replaced-elements/flow-content-0/dialog-expected.txt: * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/abspos-dialog-layout-expected.txt: * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-autofocus-expected.txt: * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-autofocus-just-once-expected.txt: * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-autofocus-multiple-times-expected.txt: * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-close-expected.txt: * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-open-expected.txt: * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-return-value-expected.txt: * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-showModal-expected.txt: * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-showModal-remove-expected.txt: * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/inert-node-is-unfocusable-expected.txt: * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/show-modal-focusing-steps-expected.txt: * web-platform-tests/html/semantics/selectors/pseudo-classes/default-expected.txt: Source/WebCore: Very basic <dialog> show/close support https://bugs.webkit.org/show_bug.cgi?id=205543 Reviewed by Antti Koivisto. Fix HTMLDialogElement.idl for attribute reflection, and showModal() possibly throwing. Have show/showModal() and close() toggle the "open" attribute. Implement parseAttribute() to initialize m_isOpen from the attribute value. Add dialog.css, which is appended to the UA stylesheets if the feature is enabled. Have it set the display value. Tested by web-platform-tests. * CMakeLists.txt: * DerivedSources-input.xcfilelist: * DerivedSources.make: * WebCore.xcodeproj/project.pbxproj: * css/dialog.css: Added. (dialog): (dialog[open]): * html/HTMLDialogElement.cpp: (WebCore::HTMLDialogElement::isOpen const): (WebCore::HTMLDialogElement::show): (WebCore::HTMLDialogElement::showModal): (WebCore::HTMLDialogElement::close): (WebCore::HTMLDialogElement::parseAttribute): (WebCore::HTMLDialogElement::toggleOpen): (WebCore::HTMLDialogElement::open): Deleted. (WebCore::HTMLDialogElement::setOpen): Deleted. * html/HTMLDialogElement.h: * html/HTMLDialogElement.idl: * style/InspectorCSSOMWrappers.cpp: (WebCore::Style::InspectorCSSOMWrappers::collectDocumentWrappers): * style/UserAgentStyle.cpp: (WebCore::Style::UserAgentStyle::ensureDefaultStyleSheetsForElement): * style/UserAgentStyle.h: Source/WebKit: Make support for <dialog> an internal feature, off by default https://bugs.webkit.org/show_bug.cgi?id=205542 Reviewed by Antti Koivisto. Make DialogElementEnabled an internal feature so it shows up in the menus and can be toggled on for experimentation. * Shared/WebPreferences.yaml: LayoutTests: Very basic <dialog> show/close support https://bugs.webkit.org/show_bug.cgi?id=205543 Reviewed by Antti Koivisto. * imported/blink/dialog/element-removed-from-top-layer-has-original-position-expected.html: Removed. * imported/blink/dialog/element-removed-from-top-layer-has-original-position.html: Removed. The changes tested by this patch (added in r140075) were later removed, then this test got re-imported from blink. * platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/documents/dom-tree-accessors/document.getElementsByName/document.getElementsByName-newelements-expected.txt: * platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/documents/dom-tree-accessors/document.getElementsByName/document.getElementsByName-newelements-xhtml-expected.txt: * platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/reflection-misc-expected.txt: Canonical link: https://commits.webkit.org/218759@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@253880 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-12-23 03:51:49 +00:00
[CEReactions, Reflect] attribute boolean open;
Add a runtime-disabled dialog element skeleton https://bugs.webkit.org/show_bug.cgi?id=199839 Patch by Alex Christensen <achristensen@webkit.org> on 2019-07-17 Reviewed by Ryosuke Niwa. LayoutTests/imported/w3c: * web-platform-tests/custom-elements/builtin-coverage-expected.txt: * web-platform-tests/dom/nodes/Node-cloneNode-expected.txt: * web-platform-tests/html/dom/reflection-misc-expected.txt: * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/centering-expected.txt: * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-close-expected.txt: * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-open-expected.txt: * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-showModal-expected.txt: * web-platform-tests/html/semantics/interfaces-expected.txt: Source/WebCore: Beginning implementation of https://html.spec.whatwg.org/multipage/interactive-elements.html#the-dialog-element Covered by rebaselining WPT tests. * CMakeLists.txt: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * bindings/js/WebCoreBuiltinNames.h: * html/HTMLDialogElement.cpp: Added. (WebCore::HTMLDialogElement::HTMLDialogElement): (WebCore::HTMLDialogElement::open): (WebCore::HTMLDialogElement::setOpen): (WebCore::HTMLDialogElement::returnValue): (WebCore::HTMLDialogElement::setReturnValue): (WebCore::HTMLDialogElement::show): (WebCore::HTMLDialogElement::showModal): (WebCore::HTMLDialogElement::close): * html/HTMLDialogElement.h: Added. * html/HTMLDialogElement.idl: Added. * html/HTMLTagNames.in: * page/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::setDialogElementEnabled): (WebCore::RuntimeEnabledFeatures::dialogElementEnabled const): Source/WebKit: * Shared/WebPreferences.yaml: * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetDialogElementEnabled): (WKPreferencesGetDialogElementEnabled): * UIProcess/API/C/WKPreferencesRefPrivate.h: Add SPI to enable the dialog element for tests. Source/WebKitLegacy/mac: * WebView/WebPreferenceKeysPrivate.h: * WebView/WebPreferences.mm: (+[WebPreferences initialize]): (-[WebPreferences dialogElementEnabled]): (-[WebPreferences setDialogElementEnabled:]): * WebView/WebPreferencesPrivate.h: * WebView/WebView.mm: (-[WebView _preferencesChanged:]): Add SPI to enable the dialog element for tests. Tools: * DumpRenderTree/mac/DumpRenderTree.mm: (resetWebPreferencesToConsistentValues): * WebKitTestRunner/TestController.cpp: (WTR::TestController::resetPreferencesToConsistentValues): Enable the dialog element for layout tests. Canonical link: https://commits.webkit.org/213747@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247527 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-07-17 18:58:14 +00:00
attribute DOMString returnValue;
[WebIDL] 'void' type is changing to 'undefined' https://bugs.webkit.org/show_bug.cgi?id=215514 <rdar://problem/67566201> Reviewed by Darin Adler. Update IDLs and IDL parsing / code generation for the switch from 'void' to 'undefined'. Source/WebCore: Also updates the parser to better match current WebIDL grammar, removing the special 'ReturnType' construction and just using 'Type' instead. * Modules/applepay/ApplePaySession.idl: * Modules/async-clipboard/Clipboard.idl: * Modules/cache/DOMCache.idl: * Modules/credentialmanagement/CredentialsContainer.idl: * Modules/encryptedmedia/MediaKeySession.h: * Modules/encryptedmedia/MediaKeySession.idl: * Modules/encryptedmedia/legacy/WebKitMediaKeySession.idl: * Modules/entriesapi/ErrorCallback.idl: * Modules/entriesapi/FileCallback.idl: * Modules/entriesapi/FileSystemDirectoryEntry.idl: * Modules/entriesapi/FileSystemDirectoryReader.idl: * Modules/entriesapi/FileSystemEntriesCallback.idl: * Modules/entriesapi/FileSystemEntry.idl: * Modules/entriesapi/FileSystemEntryCallback.idl: * Modules/entriesapi/FileSystemFileEntry.idl: * Modules/fetch/FetchHeaders.idl: * Modules/geolocation/Geolocation.idl: * Modules/geolocation/PositionCallback.idl: * Modules/geolocation/PositionErrorCallback.idl: * Modules/indexeddb/IDBCursor.idl: * Modules/indexeddb/IDBDatabase.idl: * Modules/indexeddb/IDBObjectStore.idl: * Modules/indexeddb/IDBTransaction.idl: * Modules/mediacontrols/MediaControlsHost.idl: * Modules/mediarecorder/MediaRecorder.idl: * Modules/mediasession/MediaSession.idl: * Modules/mediasource/MediaSource.idl: * Modules/mediasource/SourceBuffer.idl: * Modules/mediastream/CanvasCaptureMediaStreamTrack.idl: * Modules/mediastream/MediaStream.idl: * Modules/mediastream/MediaStreamTrack.idl: * Modules/mediastream/NavigatorMediaDevices.idl: * Modules/mediastream/RTCDTMFSender.idl: * Modules/mediastream/RTCDataChannel.idl: * Modules/mediastream/RTCPeerConnection.idl: * Modules/mediastream/RTCRtpSender.idl: * Modules/mediastream/RTCRtpTransceiver.idl: * Modules/notifications/Notification.idl: * Modules/notifications/NotificationPermissionCallback.idl: * Modules/paymentrequest/MerchantValidationEvent.idl: * Modules/paymentrequest/PaymentRequest.idl: * Modules/paymentrequest/PaymentRequestUpdateEvent.idl: * Modules/paymentrequest/PaymentResponse.idl: * Modules/pictureinpicture/DocumentPictureInPicture.idl: * Modules/plugins/QuickTimePluginReplacement.idl: * Modules/quota/StorageErrorCallback.idl: * Modules/quota/StorageInfo.idl: * Modules/quota/StorageQuota.idl: * Modules/quota/StorageQuotaCallback.idl: * Modules/quota/StorageUsageCallback.idl: * Modules/remoteplayback/RemotePlayback.idl: * Modules/speech/SpeechSynthesis.idl: * Modules/streams/ReadableByteStreamController.idl: * Modules/streams/ReadableStreamBYOBReader.idl: * Modules/streams/ReadableStreamBYOBRequest.idl: * Modules/streams/ReadableStreamDefaultController.idl: * Modules/streams/ReadableStreamDefaultReader.idl: * Modules/streams/ReadableStreamSink.idl: * Modules/streams/ReadableStreamSource.idl: * Modules/streams/TransformStreamDefaultController.idl: * Modules/streams/WritableStreamDefaultController.idl: * Modules/streams/WritableStreamDefaultWriter.idl: * Modules/webaudio/AnalyserNode.idl: * Modules/webaudio/AudioBuffer.idl: * Modules/webaudio/AudioBufferCallback.idl: * Modules/webaudio/AudioBufferSourceNode.idl: * Modules/webaudio/AudioContext.idl: * Modules/webaudio/AudioListener.idl: * Modules/webaudio/AudioNode.idl: * Modules/webaudio/AudioScheduledSourceNode.idl: * Modules/webaudio/BiquadFilterNode.idl: * Modules/webaudio/IIRFilterNode.idl: * Modules/webaudio/OfflineAudioContext.idl: * Modules/webaudio/OscillatorNode.idl: * Modules/webaudio/PannerNode.idl: * Modules/webaudio/WebKitAudioBufferSourceNode.idl: * Modules/webaudio/WebKitAudioContext.idl: * Modules/webaudio/WebKitAudioListener.idl: * Modules/webaudio/WebKitAudioPannerNode.idl: * Modules/webaudio/WebKitOscillatorNode.idl: * Modules/webdatabase/Database.idl: * Modules/webdatabase/DatabaseCallback.idl: * Modules/webdatabase/SQLStatementCallback.idl: * Modules/webdatabase/SQLTransaction.idl: * Modules/webdatabase/SQLTransactionCallback.idl: * Modules/webdatabase/SQLTransactionErrorCallback.idl: * Modules/webgpu/WebGPUBuffer.idl: * Modules/webgpu/WebGPUCommandEncoder.idl: * Modules/webgpu/WebGPUComputePassEncoder.idl: * Modules/webgpu/WebGPUDeviceErrorScopes.idl: * Modules/webgpu/WebGPUProgrammablePassEncoder.idl: * Modules/webgpu/WebGPUQueue.idl: * Modules/webgpu/WebGPURenderPassEncoder.idl: * Modules/webgpu/WebGPUTexture.idl: * Modules/websockets/WebSocket.idl: * Modules/webxr/WebXRSession.idl: * Modules/webxr/WebXRSystem.idl: * Modules/webxr/XRFrameRequestCallback.idl: * Scripts/SettingsTemplates/InternalSettingsGenerated.idl.erb: * animation/AnimationEffect.idl: * animation/KeyframeEffect.idl: * animation/WebAnimation.idl: * bindings/IDLTypes.h: * bindings/js/DOMPromiseProxy.h: * bindings/scripts/CodeGenerator.pm: * bindings/scripts/CodeGeneratorJS.pm: (NeedsExplicitPropagateExceptionCall): (GenerateCallbackImplementationContent): (GenerateImplementationFunctionCall): (GetBaseIDLType): * bindings/scripts/IDLParser.pm: (parseCallbackRest): (parseAttributeOrOperationForStringifierOrStatic): (parseOperation): (parseSpecialOperation): (parseMapLikeProperties): (parseSetLikeProperties): (parseSingleType): (parseUnionMemberType): (parseDistinguishableType): (parseConstType): (parsePrimitiveType): (parseNonAnyType): Deleted. (parseReturnType): Deleted. * bindings/scripts/test/JS/JSTestCallbackFunctionWithThisObject.cpp: (WebCore::JSTestCallbackFunctionWithThisObject::handleEvent): * bindings/scripts/test/JS/JSTestCallbackFunctionWithThisObject.h: * bindings/scripts/test/JS/JSTestCallbackFunctionWithTypedefs.cpp: (WebCore::JSTestCallbackFunctionWithTypedefs::handleEvent): * bindings/scripts/test/JS/JSTestCallbackFunctionWithTypedefs.h: * bindings/scripts/test/JS/JSTestCallbackInterface.cpp: (WebCore::JSTestCallbackInterface::callbackWithNoParam): (WebCore::JSTestCallbackInterface::callbackWithArrayParam): (WebCore::JSTestCallbackInterface::callbackWithSerializedScriptValueParam): (WebCore::JSTestCallbackInterface::callbackWithStringList): (WebCore::JSTestCallbackInterface::callbackWithBoolean): (WebCore::JSTestCallbackInterface::callbackRequiresThisToPass): * bindings/scripts/test/JS/JSTestCallbackInterface.h: * bindings/scripts/test/JS/JSTestIterable.cpp: * bindings/scripts/test/JS/JSTestNode.cpp: * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::JSTestObjConstructor::construct): (WebCore::JSTestObjPrototype::finishCreation): (WebCore::jsTestObjTestReadOnlyVoidPromiseAttributeGetter): (WebCore::jsTestObjPrototypeFunctionUndefinedMethodBody): (WebCore::jsTestObjPrototypeFunctionUndefinedMethod): (WebCore::jsTestObjPrototypeFunctionUndefinedMethodWithArgsBody): (WebCore::jsTestObjPrototypeFunctionUndefinedMethodWithArgs): (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalPromiseBody): (WebCore::jsTestObjPrototypeFunctionTestReturnsOwnPromiseAndPromiseProxyFunctionBody): (WebCore::jsTestObjPrototypeFunctionVoidMethodBody): Deleted. (WebCore::jsTestObjPrototypeFunctionVoidMethod): Deleted. (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgsBody): Deleted. (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs): Deleted. * bindings/scripts/test/JS/JSTestVoidCallbackFunction.cpp: (WebCore::JSTestVoidCallbackFunction::handleEvent): * bindings/scripts/test/JS/JSTestVoidCallbackFunction.h: * bindings/scripts/test/TestCEReactions.idl: * bindings/scripts/test/TestCallTracer.idl: * bindings/scripts/test/TestCallbackFunctionWithThisObject.idl: * bindings/scripts/test/TestCallbackFunctionWithTypedefs.idl: * bindings/scripts/test/TestCallbackInterface.idl: * bindings/scripts/test/TestDomainSecurity.idl: * bindings/scripts/test/TestEnabledBySetting.idl: * bindings/scripts/test/TestGlobalObject.idl: * bindings/scripts/test/TestImplements.idl: * bindings/scripts/test/TestIndexedSetterNoIdentifier.idl: * bindings/scripts/test/TestIndexedSetterThrowingException.idl: * bindings/scripts/test/TestIndexedSetterWithIdentifier.idl: * bindings/scripts/test/TestJSBuiltinConstructor.idl: * bindings/scripts/test/TestNamedAndIndexedSetterNoIdentifier.idl: * bindings/scripts/test/TestNamedAndIndexedSetterThrowingException.idl: * bindings/scripts/test/TestNamedAndIndexedSetterWithIdentifier.idl: * bindings/scripts/test/TestNamedDeleterNoIdentifier.idl: * bindings/scripts/test/TestNamedDeleterThrowingException.idl: * bindings/scripts/test/TestNamedDeleterWithIdentifier.idl: * bindings/scripts/test/TestNamedDeleterWithIndexedGetter.idl: * bindings/scripts/test/TestNamedSetterNoIdentifier.idl: * bindings/scripts/test/TestNamedSetterThrowingException.idl: * bindings/scripts/test/TestNamedSetterWithIdentifier.idl: * bindings/scripts/test/TestNamedSetterWithIndexedGetter.idl: * bindings/scripts/test/TestNamedSetterWithIndexedGetterAndSetter.idl: * bindings/scripts/test/TestNamedSetterWithOverrideBuiltins.idl: * bindings/scripts/test/TestNamedSetterWithUnforgableProperties.idl: * bindings/scripts/test/TestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.idl: * bindings/scripts/test/TestNode.idl: * bindings/scripts/test/TestObj.idl: * bindings/scripts/test/TestOperationBase.idl: * bindings/scripts/test/TestSerializedScriptValueInterface.idl: * bindings/scripts/test/TestSupplemental.idl: * bindings/scripts/test/TestTypedefs.idl: * bindings/scripts/test/TestVoidCallbackFunction.idl: * css/CSSKeyframesRule.idl: * css/CSSMediaRule.idl: * css/CSSPaintCallback.idl: * css/CSSStyleDeclaration.idl: * css/CSSStyleSheet.idl: * css/CSSSupportsRule.idl: * css/DOMCSSRegisterCustomProperty.idl: * css/DeprecatedCSSOMPrimitiveValue.idl: * css/FontFaceSet.idl: * css/MediaList.idl: * css/MediaQueryList.idl: * css/WebKitCSSMatrix.idl: * dom/AbortAlgorithm.idl: * dom/AbortController.idl: * dom/AbortSignal.idl: * dom/CharacterData.idl: * dom/ChildNode.idl: * dom/CompositionEvent.idl: * dom/CustomElementRegistry.idl: * dom/CustomEvent.idl: * dom/DOMStringMap.idl: * dom/DataTransfer.idl: * dom/DataTransferItem.idl: * dom/DataTransferItemList.idl: * dom/DeviceMotionEvent.idl: * dom/DeviceOrientationEvent.idl: * dom/Document.idl: * dom/DocumentFullscreen.idl: * dom/DocumentStorageAccess.idl: * dom/Element.idl: * dom/Event.idl: * dom/EventListener.idl: * dom/EventTarget.idl: * dom/HashChangeEvent.idl: * dom/IdleRequestCallback.idl: * dom/KeyboardEvent.idl: * dom/MessageEvent.idl: * dom/MessagePort.idl: * dom/MouseEvent.idl: * dom/MutationCallback.idl: * dom/MutationEvent.idl: * dom/MutationObserver.idl: * dom/Node.idl: * dom/NodeIterator.idl: * dom/ParentNode.idl: * dom/Range.idl: * dom/RequestAnimationFrameCallback.idl: * dom/StringCallback.idl: * dom/TextEvent.idl: * dom/TouchEvent.idl: * dom/UIEvent.idl: * dom/WheelEvent.idl: * fileapi/BlobCallback.idl: * fileapi/FileReader.idl: * html/DOMFormData.idl: * html/DOMTokenList.idl: * html/DOMURL.idl: * html/HTMLButtonElement.idl: * html/HTMLCanvasElement.idl: * html/HTMLDialogElement.idl: * html/HTMLElement.idl: * html/HTMLFieldSetElement.idl: * html/HTMLFormElement.idl: * html/HTMLImageElement.idl: * html/HTMLInputElement.idl: * html/HTMLKeygenElement.idl: * html/HTMLMarqueeElement.idl: * html/HTMLMediaElement.idl: * html/HTMLObjectElement.idl: * html/HTMLOptionsCollection.idl: * html/HTMLOrForeignElement.idl: * html/HTMLOutputElement.idl: * html/HTMLSelectElement.idl: * html/HTMLTableElement.idl: * html/HTMLTableRowElement.idl: * html/HTMLTableSectionElement.idl: * html/HTMLTextAreaElement.idl: * html/HTMLVideoElement.idl: * html/ImageBitmap.idl: * html/MediaController.idl: * html/URLSearchParams.idl: * html/VoidCallback.idl: * html/canvas/ANGLEInstancedArrays.idl: * html/canvas/CanvasDrawImage.idl: * html/canvas/CanvasDrawPath.idl: * html/canvas/CanvasGradient.idl: * html/canvas/CanvasImageData.idl: * html/canvas/CanvasPath.idl: * html/canvas/CanvasPathDrawingStyles.idl: * html/canvas/CanvasPattern.idl: * html/canvas/CanvasRect.idl: * html/canvas/CanvasRenderingContext2D.idl: * html/canvas/CanvasState.idl: * html/canvas/CanvasText.idl: * html/canvas/CanvasTransform.idl: * html/canvas/CanvasUserInterface.idl: * html/canvas/ImageBitmapRenderingContext.idl: * html/canvas/OESVertexArrayObject.idl: * html/canvas/OffscreenCanvasRenderingContext2D.idl: * html/canvas/Path2D.idl: * html/canvas/WebGL2RenderingContext.idl: * html/canvas/WebGLDrawBuffers.idl: * html/canvas/WebGLLoseContext.idl: * html/canvas/WebGLRenderingContextBase.idl: * html/track/TextTrack.idl: * inspector/CommandLineAPIHost.idl: * inspector/InspectorFrontendHost.idl: * loader/appcache/DOMApplicationCache.idl: * page/DOMSelection.idl: * page/DOMWindow.idl: * page/EventSource.idl: * page/History.idl: * page/IntersectionObserver.idl: * page/IntersectionObserverCallback.idl: * page/Location.idl: * page/Navigator.idl: * page/NavigatorIsLoggedIn.idl: * page/NavigatorShare.idl: * page/Performance.idl: * page/PerformanceObserver.idl: * page/PerformanceObserverCallback.idl: * page/RemoteDOMWindow.idl: * page/ResizeObserver.idl: * page/ResizeObserverCallback.idl: * page/UndoManager.idl: * page/WindowOrWorkerGlobalScope.idl: * plugins/DOMPluginArray.idl: * storage/Storage.idl: * storage/StorageEvent.idl: * svg/SVGAngle.idl: * svg/SVGAnimationElement.idl: * svg/SVGFEDropShadowElement.idl: * svg/SVGFEGaussianBlurElement.idl: * svg/SVGFEMorphologyElement.idl: * svg/SVGLength.idl: * svg/SVGLengthList.idl: * svg/SVGMarkerElement.idl: * svg/SVGNumberList.idl: * svg/SVGPathSegList.idl: * svg/SVGPointList.idl: * svg/SVGSVGElement.idl: * svg/SVGStringList.idl: * svg/SVGTextContentElement.idl: * svg/SVGTransform.idl: * svg/SVGTransformList.idl: * testing/InternalSettings.idl: * testing/Internals.idl: * testing/MockCDMFactory.idl: * testing/MockPageOverlay.idl: * testing/MockPaymentCoordinator.idl: * testing/ServiceWorkerInternals.idl: * testing/TypeConversions.idl: * testing/WebFakeXRDevice.idl: * testing/WebFakeXRInputController.idl: * testing/WebXRTest.idl: * testing/XRSimulateUserActivationFunction.idl: * workers/DedicatedWorkerGlobalScope.idl: * workers/Worker.idl: * workers/WorkerGlobalScope.idl: * workers/service/ExtendableEvent.idl: * workers/service/FetchEvent.idl: * workers/service/ServiceWorker.idl: * workers/service/ServiceWorkerClient.idl: * workers/service/ServiceWorkerClients.idl: * workers/service/ServiceWorkerContainer.idl: * workers/service/ServiceWorkerGlobalScope.idl: * workers/service/ServiceWorkerRegistration.idl: * worklets/PaintWorkletGlobalScope.idl: * worklets/Worklet.idl: * xml/XMLHttpRequest.idl: * xml/XSLTProcessor.idl: Tools: * DumpRenderTree/Bindings/CodeGeneratorDumpRenderTree.pm: (_generateImplementationFile): (_returnExpression): * TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl: * WebKitTestRunner/InjectedBundle/Bindings/AccessibilityController.idl: * WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl: * WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm: (_generateImplementationFile): (_returnExpression): * WebKitTestRunner/InjectedBundle/Bindings/EventSendingController.idl: * WebKitTestRunner/InjectedBundle/Bindings/GCController.idl: * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/Bindings/TextInputController.idl: Canonical link: https://commits.webkit.org/228750@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@266311 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-08-28 23:04:52 +00:00
[CEReactions] undefined show();
[WebIDL] Remove the need to specify [MayThrowException] https://bugs.webkit.org/show_bug.cgi?id=180019 Reviewed by Darin Adler and Chris Dumez. Removes the need to specify [MayThrowException] by deducing it from the bound signature's return value. Any function returning an ExceptionOr is one that throws. In most cases, this was already handled by toJS<>(..., impl.func()), which had overloads for the case that the value was an ExceptionOr. The cases this didn't work for were funtions that returned void, as toJS<>(..., impl.func()) would not compile. To work around this, toJS<>() can now take a lambda as its value, and can determine via the lambda's return type if it needs to throw. For instance, an IDL operation like: [MayThrowException] undefined func(); used to generate a bindings body that looked like the following : auto& impl = castedThis->wrapped(); throwScope.release(); propagateException(*lexicalGlobalObject, throwScope, impl.func()); return JSValue::encode(jsUndefined()); will now generate a bindings body that looks like: auto& impl = castedThis->wrapped(); RELEASE_AND_RETURN(throwScope, JSValue::encode(toJS<IDLUndefined>(*lexicalGlobalObject, throwScope, [&]() -> decltype(auto) { return impl.func(); }))); which closely mirrors a non-undefined return operation. This wrapped lambda form is only used for operations returning undefined or promises, as those are the only functions that can return void, but it would be correct to use them for all types, if not a bit more noisy and perhaps a tiny compile time cost. NOTE: The use of `-> decltype(auto)` explicit return type on the lambda is required to perfectly forward reference types, such as those used by owned promises. Otherwise, a copy constructor is invoked. In addition to supporting all operations, this also removes the requirement to annotate named and indexed getters/setters. This mostly just means always defining a throw scope, but for named getters it also meant adding a new helper, `visibleNamedPropertyItemAccessorFunctor` which constructors the item accessor functor for the `accessVisibleNamedProperty` algorithm rather than hard coding it in the generator. Due to increased use of toJS, the code generator is now checking more return types (via AddToImplIncludesForIDLType) so the code generator was able to find a few invalid return types (e.g. use of Promise<bool> rather than Promise<boolean>, etc.) and these have been fixed and will be an error going forward. Would be a nice improvement to the code generator to do type checking up front, rather than as a side effect of code generation, but we will leave that for another day. * bindings/js/JSDOMAbstractOperations.h: (WebCore::visibleNamedPropertyItemAccessorFunctor): Added. Moves the getterFunctor lambda creation from the GenerateNamedGetterLambda subroutine in CodeGeneratorJS.pm, but uses deduction and constexpr to determine if the getter throws. (WebCore::accessVisibleNamedProperty): Rename Functor to ItemAccessor to make it a bit more clear what the type does. * bindings/js/JSDOMConvertBase.h: (WebCore::toJS): (WebCore::toJSNewlyCreated): Replace SFINAE-based overloading of toJS/toJSNewlyCreated with constexpr based conditionals and add the ability to pass in a functor rather than value. If a functor is used, additional code paths for void and ExpectionOr<void> are added which explicitly return jsUndefined(). * bindings/js/JSDOMConvertDate.cpp: Remove incorrect comment about ExecStates that hasn't applied for a while. * bindings/js/JSDOMConvertSequences.h: Fix comment, replacing ExecState with JSGlobalObject. This has been wrong for a while, and this is just a drive by fix. * bindings/js/JSDOMExceptionHandling.h: (WebCore::invokeFunctorPropagatingExceptionIfNecessary): Use an explicit else as part of the constexpr expression to ensure the functor is not called, even in debug builds. * bindings/js/JSDOMPromiseDeferred.cpp: (WebCore::createDeferredPromise): Deleted. * bindings/js/JSDOMPromiseDeferred.h: Remove unused createDeferredPromise function. * bindings/scripts/CodeGeneratorJS.pm: (AddMapLikeAttributesAndOperationIfNeeded): (AddSetLikeAttributesAndOperationIfNeeded): Fix return type of mapped clear operation to be `any` rather than `undefined` to match the implementation, which returns a JSValue (e.g. `any`). This is now required as we actually look at the return type via deduction and need it to match. (GenerateNamedGetterLambda): Replace most of the implementation with a call to the new `visibleNamedPropertyItemAccessorFunctor` helper which returns a lambda with the correct behavior depending on the return type of the inner lambda passed. (GenerateGetOwnPropertySlot): (GenerateGetOwnPropertySlotByIndex): (GenerateAttributeGetterBodyDefinition): Match most other parts of the generator and always create a throw scope. (GenerateOperationDefinition): Remove explicit call to propagateException now that toJS() will handle that for us. (GenerateParametersCheck): Remove explicit call to propagateException now that toJS() will handle that for us. (GenerateImplementationFunctionCall): Simplify by using invokeFunctorPropagatingExceptionIfNecessary helper for the "returnArgumentName" case and relying on toJS handling the other cases. (NativeToJSValueMayThrow): Add operation to the list of things that might always throw. (NativeToJSValue): Use the lambda wrapped version of toJS for undefined and promise types, which might both return void and thus require it. To keep most code unchanged, and avoid unnecessary compiler work, we only use the wrapped version when it might be necessary. If it turns out to be cheep enough, it might make sense to always use this form for simplicity. (NeedsExplicitPropagateExceptionCall): Deleted. * bindings/scripts/IDLAttributes.json: Remove MayThrowException. * dom/Element.idl: * dom/Element.h: (WebCore::Element::removeAttributeForBindings): (WebCore::Element::removeAttributeNSForBindings): Add bindings specific versions of `removeAttribute` and `removeAttributeNS` which have a void return type (rather than the bool used by the main implementation) as it is now a requirement that that the bound functions signature match the IDL. * Modules/cache/DOMCache.idl: Use the correct interface name, `FetchRequest`, not `Request`. * Modules/cache/DOMCacheStorage.idl: Use the correct interface name, `DOMCache`, not `Cache`. * Modules/encryptedmedia/MediaKeySession.idl: * Modules/encryptedmedia/MediaKeys.idl: * dom/Document+StorageAccess.idl: * page/Navigator+IsLoggedIn.idl: Use the correct IDL type, `boolean`, not `bool`. * dom/AbortSignal.idl: Update whenSignalAborted to match the return type of implementation, which is `boolean`, not `undefined`. * testing/ServiceWorkerInternals.idl: Use the correct interface name, `FetchResponse`, not `Response`. * workers/service/ServiceWorkerClients.idl: Use the correct interface names, `ServiceWorkerClient`, not `Client`, and `ServiceWorkerWindowClient`, not `WindowClient`. * workers/service/ServiceWorkerWindowClient.idl: Use the correct interface names, `ServiceWorkerWindowClient`, not `WindowClient`. * Modules/applepay/ApplePaySession.idl: * Modules/beacon/Navigator+Beacon.idl: * Modules/cache/DOMWindow+Caches.idl: * Modules/encryptedmedia/legacy/WebKitMediaKeySession.idl: * Modules/encryptedmedia/legacy/WebKitMediaKeys.idl: * Modules/fetch/FetchHeaders.idl: * Modules/fetch/FetchRequest.idl: * Modules/fetch/FetchResponse.idl: * Modules/indexeddb/IDBCursor.idl: * Modules/indexeddb/IDBDatabase.idl: * Modules/indexeddb/IDBFactory.idl: * Modules/indexeddb/IDBIndex.idl: * Modules/indexeddb/IDBKeyRange.idl: * Modules/indexeddb/IDBObjectStore.idl: * Modules/indexeddb/IDBTransaction.idl: * Modules/mediarecorder/MediaRecorder.idl: * Modules/mediasession/MediaMetadata.idl: * Modules/mediasession/MediaSession.idl: * Modules/mediasource/MediaSource.idl: * Modules/mediasource/SourceBuffer.idl: * Modules/mediastream/RTCDTMFSender.idl: * Modules/mediastream/RTCDataChannel.idl: * Modules/mediastream/RTCPeerConnection.idl: * Modules/mediastream/RTCRtpReceiver+Transform.idl: * Modules/mediastream/RTCRtpSFrameTransform.idl: * Modules/mediastream/RTCRtpScriptTransformer.idl: * Modules/mediastream/RTCRtpSender+Transform.idl: * Modules/mediastream/RTCRtpSender.idl: * Modules/mediastream/RTCRtpTransceiver.idl: * Modules/paymentrequest/MerchantValidationEvent.idl: * Modules/paymentrequest/PaymentRequestUpdateEvent.idl: * Modules/speech/SpeechRecognition.idl: * Modules/webaudio/AudioBuffer.idl: * Modules/webaudio/AudioBufferSourceNode.idl: * Modules/webaudio/AudioContext.idl: * Modules/webaudio/AudioListener.idl: * Modules/webaudio/AudioNode.idl: * Modules/webaudio/AudioParam.idl: * Modules/webaudio/AudioScheduledSourceNode.idl: * Modules/webaudio/AudioWorkletGlobalScope.idl: * Modules/webaudio/AudioWorkletProcessor.idl: * Modules/webaudio/BaseAudioContext.idl: * Modules/webaudio/BiquadFilterNode.idl: * Modules/webaudio/IIRFilterNode.idl: * Modules/webaudio/PannerNode.idl: * Modules/webaudio/WebKitAudioBufferSourceNode.idl: * Modules/webaudio/WebKitAudioContext.idl: * Modules/webdatabase/SQLResultSetRowList.idl: * Modules/webdatabase/SQLTransaction.idl: * Modules/websockets/WebSocket.idl: * Modules/webxr/WebXRFrame.idl: * Modules/webxr/WebXRReferenceSpace.idl: * Modules/webxr/WebXRSession.idl: * Modules/webxr/WebXRWebGLLayer.idl: * animation/Animatable.idl: * animation/AnimationEffect.idl: * animation/KeyframeEffect.idl: * animation/WebAnimation.idl: * css/CSSGroupingRule.idl: * css/CSSStyleDeclaration.idl: * css/CSSStyleSheet.idl: * css/DOMCSSNamespace+CSSPropertiesandValues.idl: * css/DOMMatrix.idl: * css/DOMMatrixReadOnly.idl: * css/DeprecatedCSSOMPrimitiveValue.idl: * css/FontFaceSet.idl: * css/MediaList.idl: * dom/CharacterData.idl: * dom/ChildNode.idl: * dom/CustomElementRegistry.idl: * dom/DOMImplementation.idl: * dom/DOMPointReadOnly.idl: * dom/DataTransferItemList.idl: * dom/Document+HTML.idl: * dom/Document.idl: * dom/Element+DOMParsing.idl: * dom/Element+PointerEvents.idl: * dom/EventTarget.idl: * dom/MessagePort.idl: * dom/MutationObserver.idl: * dom/NamedNodeMap.idl: * dom/Node.idl: * dom/NodeIterator.idl: * dom/ParentNode.idl: * dom/Range+DOMParsing.idl: * dom/Range.idl: * dom/Text.idl: * dom/TextDecoder.idl: * dom/TextDecoderStreamDecoder.idl: * dom/TreeWalker.idl: * fileapi/Blob.idl: * fileapi/FileReader.idl: * fileapi/FileReaderSync.idl: * html/DOMTokenList.idl: * html/HTMLCanvasElement.idl: * html/HTMLDialogElement.idl: * html/HTMLEmbedElement.idl: * html/HTMLFrameElement.idl: * html/HTMLIFrameElement.idl: * html/HTMLInputElement.idl: * html/HTMLMediaElement.idl: * html/HTMLObjectElement.idl: * html/HTMLOptionsCollection.idl: * html/HTMLSelectElement.idl: * html/HTMLTableElement.idl: * html/HTMLTableRowElement.idl: * html/HTMLTableSectionElement.idl: * html/HTMLTextAreaElement.idl: * html/HTMLVideoElement.idl: * html/OffscreenCanvas.idl: * html/TimeRanges.idl: * html/canvas/CanvasDrawImage.idl: * html/canvas/CanvasFillStrokeStyles.idl: * html/canvas/CanvasGradient.idl: * html/canvas/CanvasImageData.idl: * html/canvas/CanvasPath.idl: * html/canvas/CanvasPattern.idl: * html/canvas/CanvasTransform.idl: * html/canvas/ImageBitmapRenderingContext.idl: * html/canvas/Path2D.idl: * html/canvas/WebGL2RenderingContext.idl: * html/canvas/WebGLRenderingContextBase.idl: * html/track/TextTrack.idl: * inspector/InspectorAuditAccessibilityObject.idl: * inspector/InspectorAuditDOMObject.idl: * inspector/InspectorAuditResourcesObject.idl: * loader/appcache/DOMApplicationCache.idl: * page/Crypto.idl: * page/DOMSelection.idl: * page/DOMWindow.idl: * page/History.idl: * page/Location.idl: * page/NavigatorServiceWorker.idl: * page/Performance+UserTiming.idl: * page/PerformanceObserver.idl: * page/UndoManager.idl: * page/UserMessageHandler.idl: * page/WindowOrWorkerGlobalScope.idl: * storage/Storage.idl: * svg/SVGAngle.idl: * svg/SVGGeometryElement.idl: * svg/SVGGraphicsElement.idl: * svg/SVGLength.idl: * svg/SVGLengthList.idl: * svg/SVGMatrix.idl: * svg/SVGNumberList.idl: * svg/SVGPathSegList.idl: * svg/SVGPointList.idl: * svg/SVGStringList.idl: * svg/SVGTextContentElement.idl: * svg/SVGTransform.idl: * svg/SVGTransformList.idl: * testing/InternalSettings.idl: * testing/Internals.idl: * workers/DedicatedWorkerGlobalScope.idl: * workers/Worker.idl: * workers/WorkerGlobalScope.idl: * workers/service/ExtendableEvent.idl: * workers/service/FetchEvent.idl: * workers/service/ServiceWorker.idl: * workers/service/ServiceWorkerClient.idl: * worklets/PaintWorkletGlobalScope.idl: * xml/DOMParser.idl: * xml/XMLHttpRequest.idl: * xml/XPathEvaluatorBase.idl: * xml/XPathExpression.idl: * xml/XPathResult.idl: Remove use of [MayThrowException]. * bindings/scripts/test/JS/*: Remove uses of [MayThrowException] in the tests and update all the test results. Canonical link: https://commits.webkit.org/235627@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@274832 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-03-23 00:49:01 +00:00
[CEReactions] undefined showModal();
[WebIDL] 'void' type is changing to 'undefined' https://bugs.webkit.org/show_bug.cgi?id=215514 <rdar://problem/67566201> Reviewed by Darin Adler. Update IDLs and IDL parsing / code generation for the switch from 'void' to 'undefined'. Source/WebCore: Also updates the parser to better match current WebIDL grammar, removing the special 'ReturnType' construction and just using 'Type' instead. * Modules/applepay/ApplePaySession.idl: * Modules/async-clipboard/Clipboard.idl: * Modules/cache/DOMCache.idl: * Modules/credentialmanagement/CredentialsContainer.idl: * Modules/encryptedmedia/MediaKeySession.h: * Modules/encryptedmedia/MediaKeySession.idl: * Modules/encryptedmedia/legacy/WebKitMediaKeySession.idl: * Modules/entriesapi/ErrorCallback.idl: * Modules/entriesapi/FileCallback.idl: * Modules/entriesapi/FileSystemDirectoryEntry.idl: * Modules/entriesapi/FileSystemDirectoryReader.idl: * Modules/entriesapi/FileSystemEntriesCallback.idl: * Modules/entriesapi/FileSystemEntry.idl: * Modules/entriesapi/FileSystemEntryCallback.idl: * Modules/entriesapi/FileSystemFileEntry.idl: * Modules/fetch/FetchHeaders.idl: * Modules/geolocation/Geolocation.idl: * Modules/geolocation/PositionCallback.idl: * Modules/geolocation/PositionErrorCallback.idl: * Modules/indexeddb/IDBCursor.idl: * Modules/indexeddb/IDBDatabase.idl: * Modules/indexeddb/IDBObjectStore.idl: * Modules/indexeddb/IDBTransaction.idl: * Modules/mediacontrols/MediaControlsHost.idl: * Modules/mediarecorder/MediaRecorder.idl: * Modules/mediasession/MediaSession.idl: * Modules/mediasource/MediaSource.idl: * Modules/mediasource/SourceBuffer.idl: * Modules/mediastream/CanvasCaptureMediaStreamTrack.idl: * Modules/mediastream/MediaStream.idl: * Modules/mediastream/MediaStreamTrack.idl: * Modules/mediastream/NavigatorMediaDevices.idl: * Modules/mediastream/RTCDTMFSender.idl: * Modules/mediastream/RTCDataChannel.idl: * Modules/mediastream/RTCPeerConnection.idl: * Modules/mediastream/RTCRtpSender.idl: * Modules/mediastream/RTCRtpTransceiver.idl: * Modules/notifications/Notification.idl: * Modules/notifications/NotificationPermissionCallback.idl: * Modules/paymentrequest/MerchantValidationEvent.idl: * Modules/paymentrequest/PaymentRequest.idl: * Modules/paymentrequest/PaymentRequestUpdateEvent.idl: * Modules/paymentrequest/PaymentResponse.idl: * Modules/pictureinpicture/DocumentPictureInPicture.idl: * Modules/plugins/QuickTimePluginReplacement.idl: * Modules/quota/StorageErrorCallback.idl: * Modules/quota/StorageInfo.idl: * Modules/quota/StorageQuota.idl: * Modules/quota/StorageQuotaCallback.idl: * Modules/quota/StorageUsageCallback.idl: * Modules/remoteplayback/RemotePlayback.idl: * Modules/speech/SpeechSynthesis.idl: * Modules/streams/ReadableByteStreamController.idl: * Modules/streams/ReadableStreamBYOBReader.idl: * Modules/streams/ReadableStreamBYOBRequest.idl: * Modules/streams/ReadableStreamDefaultController.idl: * Modules/streams/ReadableStreamDefaultReader.idl: * Modules/streams/ReadableStreamSink.idl: * Modules/streams/ReadableStreamSource.idl: * Modules/streams/TransformStreamDefaultController.idl: * Modules/streams/WritableStreamDefaultController.idl: * Modules/streams/WritableStreamDefaultWriter.idl: * Modules/webaudio/AnalyserNode.idl: * Modules/webaudio/AudioBuffer.idl: * Modules/webaudio/AudioBufferCallback.idl: * Modules/webaudio/AudioBufferSourceNode.idl: * Modules/webaudio/AudioContext.idl: * Modules/webaudio/AudioListener.idl: * Modules/webaudio/AudioNode.idl: * Modules/webaudio/AudioScheduledSourceNode.idl: * Modules/webaudio/BiquadFilterNode.idl: * Modules/webaudio/IIRFilterNode.idl: * Modules/webaudio/OfflineAudioContext.idl: * Modules/webaudio/OscillatorNode.idl: * Modules/webaudio/PannerNode.idl: * Modules/webaudio/WebKitAudioBufferSourceNode.idl: * Modules/webaudio/WebKitAudioContext.idl: * Modules/webaudio/WebKitAudioListener.idl: * Modules/webaudio/WebKitAudioPannerNode.idl: * Modules/webaudio/WebKitOscillatorNode.idl: * Modules/webdatabase/Database.idl: * Modules/webdatabase/DatabaseCallback.idl: * Modules/webdatabase/SQLStatementCallback.idl: * Modules/webdatabase/SQLTransaction.idl: * Modules/webdatabase/SQLTransactionCallback.idl: * Modules/webdatabase/SQLTransactionErrorCallback.idl: * Modules/webgpu/WebGPUBuffer.idl: * Modules/webgpu/WebGPUCommandEncoder.idl: * Modules/webgpu/WebGPUComputePassEncoder.idl: * Modules/webgpu/WebGPUDeviceErrorScopes.idl: * Modules/webgpu/WebGPUProgrammablePassEncoder.idl: * Modules/webgpu/WebGPUQueue.idl: * Modules/webgpu/WebGPURenderPassEncoder.idl: * Modules/webgpu/WebGPUTexture.idl: * Modules/websockets/WebSocket.idl: * Modules/webxr/WebXRSession.idl: * Modules/webxr/WebXRSystem.idl: * Modules/webxr/XRFrameRequestCallback.idl: * Scripts/SettingsTemplates/InternalSettingsGenerated.idl.erb: * animation/AnimationEffect.idl: * animation/KeyframeEffect.idl: * animation/WebAnimation.idl: * bindings/IDLTypes.h: * bindings/js/DOMPromiseProxy.h: * bindings/scripts/CodeGenerator.pm: * bindings/scripts/CodeGeneratorJS.pm: (NeedsExplicitPropagateExceptionCall): (GenerateCallbackImplementationContent): (GenerateImplementationFunctionCall): (GetBaseIDLType): * bindings/scripts/IDLParser.pm: (parseCallbackRest): (parseAttributeOrOperationForStringifierOrStatic): (parseOperation): (parseSpecialOperation): (parseMapLikeProperties): (parseSetLikeProperties): (parseSingleType): (parseUnionMemberType): (parseDistinguishableType): (parseConstType): (parsePrimitiveType): (parseNonAnyType): Deleted. (parseReturnType): Deleted. * bindings/scripts/test/JS/JSTestCallbackFunctionWithThisObject.cpp: (WebCore::JSTestCallbackFunctionWithThisObject::handleEvent): * bindings/scripts/test/JS/JSTestCallbackFunctionWithThisObject.h: * bindings/scripts/test/JS/JSTestCallbackFunctionWithTypedefs.cpp: (WebCore::JSTestCallbackFunctionWithTypedefs::handleEvent): * bindings/scripts/test/JS/JSTestCallbackFunctionWithTypedefs.h: * bindings/scripts/test/JS/JSTestCallbackInterface.cpp: (WebCore::JSTestCallbackInterface::callbackWithNoParam): (WebCore::JSTestCallbackInterface::callbackWithArrayParam): (WebCore::JSTestCallbackInterface::callbackWithSerializedScriptValueParam): (WebCore::JSTestCallbackInterface::callbackWithStringList): (WebCore::JSTestCallbackInterface::callbackWithBoolean): (WebCore::JSTestCallbackInterface::callbackRequiresThisToPass): * bindings/scripts/test/JS/JSTestCallbackInterface.h: * bindings/scripts/test/JS/JSTestIterable.cpp: * bindings/scripts/test/JS/JSTestNode.cpp: * bindings/scripts/test/JS/JSTestObj.cpp: (WebCore::JSTestObjConstructor::construct): (WebCore::JSTestObjPrototype::finishCreation): (WebCore::jsTestObjTestReadOnlyVoidPromiseAttributeGetter): (WebCore::jsTestObjPrototypeFunctionUndefinedMethodBody): (WebCore::jsTestObjPrototypeFunctionUndefinedMethod): (WebCore::jsTestObjPrototypeFunctionUndefinedMethodWithArgsBody): (WebCore::jsTestObjPrototypeFunctionUndefinedMethodWithArgs): (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalPromiseBody): (WebCore::jsTestObjPrototypeFunctionTestReturnsOwnPromiseAndPromiseProxyFunctionBody): (WebCore::jsTestObjPrototypeFunctionVoidMethodBody): Deleted. (WebCore::jsTestObjPrototypeFunctionVoidMethod): Deleted. (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgsBody): Deleted. (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs): Deleted. * bindings/scripts/test/JS/JSTestVoidCallbackFunction.cpp: (WebCore::JSTestVoidCallbackFunction::handleEvent): * bindings/scripts/test/JS/JSTestVoidCallbackFunction.h: * bindings/scripts/test/TestCEReactions.idl: * bindings/scripts/test/TestCallTracer.idl: * bindings/scripts/test/TestCallbackFunctionWithThisObject.idl: * bindings/scripts/test/TestCallbackFunctionWithTypedefs.idl: * bindings/scripts/test/TestCallbackInterface.idl: * bindings/scripts/test/TestDomainSecurity.idl: * bindings/scripts/test/TestEnabledBySetting.idl: * bindings/scripts/test/TestGlobalObject.idl: * bindings/scripts/test/TestImplements.idl: * bindings/scripts/test/TestIndexedSetterNoIdentifier.idl: * bindings/scripts/test/TestIndexedSetterThrowingException.idl: * bindings/scripts/test/TestIndexedSetterWithIdentifier.idl: * bindings/scripts/test/TestJSBuiltinConstructor.idl: * bindings/scripts/test/TestNamedAndIndexedSetterNoIdentifier.idl: * bindings/scripts/test/TestNamedAndIndexedSetterThrowingException.idl: * bindings/scripts/test/TestNamedAndIndexedSetterWithIdentifier.idl: * bindings/scripts/test/TestNamedDeleterNoIdentifier.idl: * bindings/scripts/test/TestNamedDeleterThrowingException.idl: * bindings/scripts/test/TestNamedDeleterWithIdentifier.idl: * bindings/scripts/test/TestNamedDeleterWithIndexedGetter.idl: * bindings/scripts/test/TestNamedSetterNoIdentifier.idl: * bindings/scripts/test/TestNamedSetterThrowingException.idl: * bindings/scripts/test/TestNamedSetterWithIdentifier.idl: * bindings/scripts/test/TestNamedSetterWithIndexedGetter.idl: * bindings/scripts/test/TestNamedSetterWithIndexedGetterAndSetter.idl: * bindings/scripts/test/TestNamedSetterWithOverrideBuiltins.idl: * bindings/scripts/test/TestNamedSetterWithUnforgableProperties.idl: * bindings/scripts/test/TestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.idl: * bindings/scripts/test/TestNode.idl: * bindings/scripts/test/TestObj.idl: * bindings/scripts/test/TestOperationBase.idl: * bindings/scripts/test/TestSerializedScriptValueInterface.idl: * bindings/scripts/test/TestSupplemental.idl: * bindings/scripts/test/TestTypedefs.idl: * bindings/scripts/test/TestVoidCallbackFunction.idl: * css/CSSKeyframesRule.idl: * css/CSSMediaRule.idl: * css/CSSPaintCallback.idl: * css/CSSStyleDeclaration.idl: * css/CSSStyleSheet.idl: * css/CSSSupportsRule.idl: * css/DOMCSSRegisterCustomProperty.idl: * css/DeprecatedCSSOMPrimitiveValue.idl: * css/FontFaceSet.idl: * css/MediaList.idl: * css/MediaQueryList.idl: * css/WebKitCSSMatrix.idl: * dom/AbortAlgorithm.idl: * dom/AbortController.idl: * dom/AbortSignal.idl: * dom/CharacterData.idl: * dom/ChildNode.idl: * dom/CompositionEvent.idl: * dom/CustomElementRegistry.idl: * dom/CustomEvent.idl: * dom/DOMStringMap.idl: * dom/DataTransfer.idl: * dom/DataTransferItem.idl: * dom/DataTransferItemList.idl: * dom/DeviceMotionEvent.idl: * dom/DeviceOrientationEvent.idl: * dom/Document.idl: * dom/DocumentFullscreen.idl: * dom/DocumentStorageAccess.idl: * dom/Element.idl: * dom/Event.idl: * dom/EventListener.idl: * dom/EventTarget.idl: * dom/HashChangeEvent.idl: * dom/IdleRequestCallback.idl: * dom/KeyboardEvent.idl: * dom/MessageEvent.idl: * dom/MessagePort.idl: * dom/MouseEvent.idl: * dom/MutationCallback.idl: * dom/MutationEvent.idl: * dom/MutationObserver.idl: * dom/Node.idl: * dom/NodeIterator.idl: * dom/ParentNode.idl: * dom/Range.idl: * dom/RequestAnimationFrameCallback.idl: * dom/StringCallback.idl: * dom/TextEvent.idl: * dom/TouchEvent.idl: * dom/UIEvent.idl: * dom/WheelEvent.idl: * fileapi/BlobCallback.idl: * fileapi/FileReader.idl: * html/DOMFormData.idl: * html/DOMTokenList.idl: * html/DOMURL.idl: * html/HTMLButtonElement.idl: * html/HTMLCanvasElement.idl: * html/HTMLDialogElement.idl: * html/HTMLElement.idl: * html/HTMLFieldSetElement.idl: * html/HTMLFormElement.idl: * html/HTMLImageElement.idl: * html/HTMLInputElement.idl: * html/HTMLKeygenElement.idl: * html/HTMLMarqueeElement.idl: * html/HTMLMediaElement.idl: * html/HTMLObjectElement.idl: * html/HTMLOptionsCollection.idl: * html/HTMLOrForeignElement.idl: * html/HTMLOutputElement.idl: * html/HTMLSelectElement.idl: * html/HTMLTableElement.idl: * html/HTMLTableRowElement.idl: * html/HTMLTableSectionElement.idl: * html/HTMLTextAreaElement.idl: * html/HTMLVideoElement.idl: * html/ImageBitmap.idl: * html/MediaController.idl: * html/URLSearchParams.idl: * html/VoidCallback.idl: * html/canvas/ANGLEInstancedArrays.idl: * html/canvas/CanvasDrawImage.idl: * html/canvas/CanvasDrawPath.idl: * html/canvas/CanvasGradient.idl: * html/canvas/CanvasImageData.idl: * html/canvas/CanvasPath.idl: * html/canvas/CanvasPathDrawingStyles.idl: * html/canvas/CanvasPattern.idl: * html/canvas/CanvasRect.idl: * html/canvas/CanvasRenderingContext2D.idl: * html/canvas/CanvasState.idl: * html/canvas/CanvasText.idl: * html/canvas/CanvasTransform.idl: * html/canvas/CanvasUserInterface.idl: * html/canvas/ImageBitmapRenderingContext.idl: * html/canvas/OESVertexArrayObject.idl: * html/canvas/OffscreenCanvasRenderingContext2D.idl: * html/canvas/Path2D.idl: * html/canvas/WebGL2RenderingContext.idl: * html/canvas/WebGLDrawBuffers.idl: * html/canvas/WebGLLoseContext.idl: * html/canvas/WebGLRenderingContextBase.idl: * html/track/TextTrack.idl: * inspector/CommandLineAPIHost.idl: * inspector/InspectorFrontendHost.idl: * loader/appcache/DOMApplicationCache.idl: * page/DOMSelection.idl: * page/DOMWindow.idl: * page/EventSource.idl: * page/History.idl: * page/IntersectionObserver.idl: * page/IntersectionObserverCallback.idl: * page/Location.idl: * page/Navigator.idl: * page/NavigatorIsLoggedIn.idl: * page/NavigatorShare.idl: * page/Performance.idl: * page/PerformanceObserver.idl: * page/PerformanceObserverCallback.idl: * page/RemoteDOMWindow.idl: * page/ResizeObserver.idl: * page/ResizeObserverCallback.idl: * page/UndoManager.idl: * page/WindowOrWorkerGlobalScope.idl: * plugins/DOMPluginArray.idl: * storage/Storage.idl: * storage/StorageEvent.idl: * svg/SVGAngle.idl: * svg/SVGAnimationElement.idl: * svg/SVGFEDropShadowElement.idl: * svg/SVGFEGaussianBlurElement.idl: * svg/SVGFEMorphologyElement.idl: * svg/SVGLength.idl: * svg/SVGLengthList.idl: * svg/SVGMarkerElement.idl: * svg/SVGNumberList.idl: * svg/SVGPathSegList.idl: * svg/SVGPointList.idl: * svg/SVGSVGElement.idl: * svg/SVGStringList.idl: * svg/SVGTextContentElement.idl: * svg/SVGTransform.idl: * svg/SVGTransformList.idl: * testing/InternalSettings.idl: * testing/Internals.idl: * testing/MockCDMFactory.idl: * testing/MockPageOverlay.idl: * testing/MockPaymentCoordinator.idl: * testing/ServiceWorkerInternals.idl: * testing/TypeConversions.idl: * testing/WebFakeXRDevice.idl: * testing/WebFakeXRInputController.idl: * testing/WebXRTest.idl: * testing/XRSimulateUserActivationFunction.idl: * workers/DedicatedWorkerGlobalScope.idl: * workers/Worker.idl: * workers/WorkerGlobalScope.idl: * workers/service/ExtendableEvent.idl: * workers/service/FetchEvent.idl: * workers/service/ServiceWorker.idl: * workers/service/ServiceWorkerClient.idl: * workers/service/ServiceWorkerClients.idl: * workers/service/ServiceWorkerContainer.idl: * workers/service/ServiceWorkerGlobalScope.idl: * workers/service/ServiceWorkerRegistration.idl: * worklets/PaintWorkletGlobalScope.idl: * worklets/Worklet.idl: * xml/XMLHttpRequest.idl: * xml/XSLTProcessor.idl: Tools: * DumpRenderTree/Bindings/CodeGeneratorDumpRenderTree.pm: (_generateImplementationFile): (_returnExpression): * TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl: * WebKitTestRunner/InjectedBundle/Bindings/AccessibilityController.idl: * WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl: * WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm: (_generateImplementationFile): (_returnExpression): * WebKitTestRunner/InjectedBundle/Bindings/EventSendingController.idl: * WebKitTestRunner/InjectedBundle/Bindings/GCController.idl: * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/Bindings/TextInputController.idl: Canonical link: https://commits.webkit.org/228750@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@266311 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-08-28 23:04:52 +00:00
[CEReactions] undefined close(optional DOMString returnValue);
Add a runtime-disabled dialog element skeleton https://bugs.webkit.org/show_bug.cgi?id=199839 Patch by Alex Christensen <achristensen@webkit.org> on 2019-07-17 Reviewed by Ryosuke Niwa. LayoutTests/imported/w3c: * web-platform-tests/custom-elements/builtin-coverage-expected.txt: * web-platform-tests/dom/nodes/Node-cloneNode-expected.txt: * web-platform-tests/html/dom/reflection-misc-expected.txt: * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/centering-expected.txt: * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-close-expected.txt: * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-open-expected.txt: * web-platform-tests/html/semantics/interactive-elements/the-dialog-element/dialog-showModal-expected.txt: * web-platform-tests/html/semantics/interfaces-expected.txt: Source/WebCore: Beginning implementation of https://html.spec.whatwg.org/multipage/interactive-elements.html#the-dialog-element Covered by rebaselining WPT tests. * CMakeLists.txt: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * bindings/js/WebCoreBuiltinNames.h: * html/HTMLDialogElement.cpp: Added. (WebCore::HTMLDialogElement::HTMLDialogElement): (WebCore::HTMLDialogElement::open): (WebCore::HTMLDialogElement::setOpen): (WebCore::HTMLDialogElement::returnValue): (WebCore::HTMLDialogElement::setReturnValue): (WebCore::HTMLDialogElement::show): (WebCore::HTMLDialogElement::showModal): (WebCore::HTMLDialogElement::close): * html/HTMLDialogElement.h: Added. * html/HTMLDialogElement.idl: Added. * html/HTMLTagNames.in: * page/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::setDialogElementEnabled): (WebCore::RuntimeEnabledFeatures::dialogElementEnabled const): Source/WebKit: * Shared/WebPreferences.yaml: * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetDialogElementEnabled): (WKPreferencesGetDialogElementEnabled): * UIProcess/API/C/WKPreferencesRefPrivate.h: Add SPI to enable the dialog element for tests. Source/WebKitLegacy/mac: * WebView/WebPreferenceKeysPrivate.h: * WebView/WebPreferences.mm: (+[WebPreferences initialize]): (-[WebPreferences dialogElementEnabled]): (-[WebPreferences setDialogElementEnabled:]): * WebView/WebPreferencesPrivate.h: * WebView/WebView.mm: (-[WebView _preferencesChanged:]): Add SPI to enable the dialog element for tests. Tools: * DumpRenderTree/mac/DumpRenderTree.mm: (resetWebPreferencesToConsistentValues): * WebKitTestRunner/TestController.cpp: (WTR::TestController::resetPreferencesToConsistentValues): Enable the dialog element for layout tests. Canonical link: https://commits.webkit.org/213747@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247527 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-07-17 18:58:14 +00:00
};