haikuwebkit/Source/WebCore/page/WindowEventHandlers.idl

48 lines
2.5 KiB
Plaintext
Raw Permalink Normal View History

Organize event handlers a bit https://bugs.webkit.org/show_bug.cgi?id=145106 Reviewed by Darin Adler. Source/WebCore: - Add GlobalEventHandlers.idl (from https://html.spec.whatwg.org/multipage/webappapis.html#globaleventhandlers) and move all event handlers shared by Element, Document and DOMWindow there. Put all the standard defined event handlers at the top (commenting out the ones that aren't implemented yet) and the non-standard ones at the bottom. There is one change in behavior here. Previously, the media related event handlers where only exposed on Element and DOMWindow. The spec says they should also be on Document, so this adds support for that (this is tested in fast/dom/event-handler-attributes.html). - Add WindowEventHandlers.idl (from https://html.spec.whatwg.org/multipage/webappapis.html#windoweventhandlers) and move all event handlers shared by DOMWindow, HTMLBodyElement and HTMLFrameSetElement there. Put all the standard defined event handlers at the top (commenting out the ones that aren't implemented yet) and the non-standard ones at the bottom. - Group remaining event handlers in Element, Document, DOMWindow, HTMLBodyElement and HTMLFrameSetElement by their grouping, and add some FIXMEs for future cleaning. * CMakeLists.txt: * DerivedSources.make: * WebCore.xcodeproj/project.pbxproj: - Add GlobalEventHandlers.idl and WindowEventHandlers.idl. * bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): Add special cases for WindowEventHandler when used on DOMWindow and DocumentEventHandler when used on Document so that event handlers using those extended attributes can be set on shared interfaces. This is used to allow DOMWindow to implement WindowEventHandlers. * dom/Document.idl: Move event handlers to GlobalEventHandlers and have Document implement it. Group remaining event handlers. * dom/Element.idl: Move event handlers to GlobalEventHandlers and have Element implement it. Group remaining event handlers. * dom/GlobalEventHandlers.idl: Added. * html/HTMLBodyElement.idl: Move event handlers to WindowEventHandlers and have HTMLBodyElement implement it. Group remaining event handlers. * html/HTMLFrameSetElement.idl: Move event handlers to WindowEventHandlers and have HTMLFrameSetElement implement it. Group remaining event handlers. * page/DOMWindow.idl: Move event handlers to GlobalEventHandlers and WindowEventHandlers and have DOMWindow implement both of them. Group remaining event handlers. * page/WindowEventHandlers.idl: Added. LayoutTests: * fast/dom/event-handler-attributes-expected.txt: * fast/dom/event-handler-attributes.html: Update for putting media related event handlers on Document in addition to Element and DOMWindow. Canonical link: https://commits.webkit.org/163205@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@184616 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-05-20 05:41:13 +00:00
/*
* Copyright (C) 2015 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.
*
*/
// https://html.spec.whatwg.org/multipage/webappapis.html#windoweventhandlers
[WebIDL] Add support for interface mixins https://bugs.webkit.org/show_bug.cgi?id=216217 Reviewed by Darin Adler. Implement support for WebIDL interface mixins, which are interface fragments that can be included into other interfaces (using an 'includes' statement), but do not create new types themselves. Prior to this, we have been emulating the behavior by allowing any interface to be included in another interface, and marking some interfaces with the [LegacyNoInterfaceObject] extended attribute. This change codifies that with in the spec approved way. - Updates IDL parser to parse mixin interfaces (and fixes the parsing of callback interfaces to be a bit more strict while I was there). - Updates IDL pre-processor to avoid creating global variables and IsoSubspaces for mixins. - Updates IDL code generator to only support including mixin interfaces during supplemental inclusion. - Updates IDL files to use interface mixin where appropriately specified. * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * CMakeLists.txt: * DerivedSources-output.xcfilelist: * DerivedSources.make: * dom/DeviceOrientationOrMotionEvent.idl: Removed. Remove DeviceOrientationOrMotionEvent.idl and corresponding generated files, inlining it into DeviceMotionEvent.idl and DeviceOrientationEvent.idl as specified. This is needed as mixin interfaces do not support static operations or attributes. * bindings/scripts/CodeGenerator.pm: (IsValidSupplementalInterface): (IsValidSupplementalDictionary): (ProcessSupplementalDependencies): (GetInterfaceExtendedAttributesFromName): Update IDL code generator to only support including mixin interfaces during supplemental inclusion. Also removes some left of remnents of exception interface support. * bindings/scripts/IDLParser.pm: (parseCallbackRestOrInterface): (parseCallbackInterface): (parseCallbackInterfaceMembers): (parseCallbackInterfaceMember): (parseMixin): (parseMixinMembers): (parseMixinMember): (parseNamespace): (parsePartialInterfaceMember): (parseAttributeOrOperationForStringifierOrStatic): Update IDL parser to parse mixin interfaces and fix the parsing of callback interfaces to match the spec by restricting its members to constants and regular functions. * bindings/scripts/preprocess-idls.pl: (isMixinInterfaceFromIDL): (containsInterfaceFromIDL): (getInterfaceExtendedAttributesFromIDL): (containsInterfaceOrExceptionFromIDL): Deleted. Ensure mixin interfaces don't get exposed on any global objects and remove some left of remnents of exception interface support. * bindings/scripts/test/JS/JSTestInterface.cpp: * bindings/scripts/test/JS/JSTestLegacyNoInterfaceObject.cpp: Added. * bindings/scripts/test/JS/JSTestLegacyNoInterfaceObject.h: Added. * bindings/scripts/test/SupplementalDependencies.dep: * bindings/scripts/test/TestIncludes.idl: * bindings/scripts/test/TestLegacyNoInterfaceObject.idl: Added. * bindings/scripts/test/TestOperationBase.idl: Update bindings tests to use mixins for includes. Add new dedicated [LegacyNoInterfaceObject] since it was no longer being tested. * Modules/fetch/FetchBody.idl: * Modules/mediasource/VideoPlaybackQuality.idl: * Modules/speech/SpeechSynthesis.idl: * Modules/speech/SpeechSynthesisVoice.idl: * Modules/streams/ReadableStreamSink.idl: * accessibility/AccessibilityRole.idl: * accessibility/AriaAttributes.idl: * animation/Animatable.idl: * css/ElementCSSInlineStyle.idl: * css/StyleMedia.idl: * dom/ChildNode.idl: * dom/DeviceMotionEvent.idl: * dom/DeviceOrientationEvent.idl: * dom/Document.idl: * dom/DocumentAndElementEventHandlers.idl: * dom/DocumentOrShadowRoot.idl: * dom/EventListener.idl: * dom/GlobalEventHandlers.idl: * dom/NavigatorMaxTouchPoints.idl: * dom/NonDocumentTypeChildNode.idl: * dom/NonElementParentNode.idl: * dom/ParentNode.idl: * dom/Slotable.idl: * html/HTMLHyperlinkElementUtils.idl: * html/HTMLOrForeignElement.idl: * html/canvas/CanvasCompositing.idl: * html/canvas/CanvasDrawImage.idl: * html/canvas/CanvasDrawPath.idl: * html/canvas/CanvasFillStrokeStyles.idl: * html/canvas/CanvasFilters.idl: * html/canvas/CanvasGradient.idl: * html/canvas/CanvasImageData.idl: * html/canvas/CanvasImageSmoothing.idl: * html/canvas/CanvasPath.idl: * html/canvas/CanvasPathDrawingStyles.idl: * html/canvas/CanvasRect.idl: * html/canvas/CanvasShadowStyles.idl: * html/canvas/CanvasState.idl: * html/canvas/CanvasText.idl: * html/canvas/CanvasTextDrawingStyles.idl: * html/canvas/CanvasTransform.idl: * html/canvas/CanvasUserInterface.idl: * html/canvas/WebGLRenderingContextBase.idl: * page/GlobalCrypto.idl: * page/GlobalPerformance.idl: * page/Navigator.idl: * page/NavigatorID.idl: * page/NavigatorLanguage.idl: * page/NavigatorOnLine.idl: * page/NavigatorPlugins.idl: * page/NavigatorServiceWorker.idl: * page/NavigatorShare.idl: * page/WindowEventHandlers.idl: * page/WindowOrWorkerGlobalScope.idl: * svg/SVGFilterPrimitiveStandardAttributes.idl: * svg/SVGFitToViewBox.idl: * svg/SVGTests.idl: * svg/SVGURIReference.idl: * svg/SVGZoomAndPan.idl: * workers/AbstractWorker.idl: * xml/XPathEvaluator.idl: * xml/XPathNSResolver.idl: Update IDLs. Canonical link: https://commits.webkit.org/229047@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@266678 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-09-06 02:49:22 +00:00
interface mixin WindowEventHandlers {
[WK2] Add support for Window's beforeprint / afterprint events https://bugs.webkit.org/show_bug.cgi?id=196478 Reviewed by Alex Christensen. LayoutTests/imported/w3c: Rebaseline WPT tests now that more checks are passing. * web-platform-tests/html/browsers/the-window-object/security-window/window-security.https-expected.txt: * web-platform-tests/html/browsers/the-window-object/security-window/window-security.sub-expected.txt: * web-platform-tests/html/browsers/the-window-object/window-properties.https-expected.txt: * web-platform-tests/html/dom/interfaces-expected.txt: * web-platform-tests/html/webappapis/scripting/events/body-exposed-window-event-handlers-expected.txt: * web-platform-tests/html/webappapis/scripting/events/event-handler-attributes-body-window-expected.txt: Source/WebCore: Add support for Window's beforeprint / afterprint events as per: - https://html.spec.whatwg.org/#dom-print Blink and Gecko already support this. Test: printing/printing-events.html * dom/EventNames.h: * html/HTMLAttributeNames.in: * html/HTMLBodyElement.cpp: (WebCore::HTMLBodyElement::createWindowEventHandlerNameMap): * page/Page.cpp: (WebCore::dispatchPrintEvent): (WebCore::Page::dispatchBeforePrintEvent): (WebCore::Page::dispatchAfterPrintEvent): * page/Page.h: * page/WindowEventHandlers.idl: Source/WebKit: Add support for Window's beforeprint / afterprint events as per: - https://html.spec.whatwg.org/#dom-print Blink and Gecko already support this. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::beginPrinting): (WebKit::WebPage::endPrinting): Tools: Add minimal implementation for printFrame in WebKitTestRunner. * WebKitTestRunner/TestController.cpp: (WTR::printFrame): (WTR::TestController::createOtherPage): (WTR::TestController::createWebViewWithOptions): LayoutTests: Add layout test coverage. * TestExpectations: * platform/wk2/TestExpectations: * printing/printing-events-expected.txt: Added. * printing/printing-events.html: Added. Canonical link: https://commits.webkit.org/210773@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243762 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-04-02 21:43:24 +00:00
[WindowEventHandler] attribute EventHandler onafterprint;
[WindowEventHandler] attribute EventHandler onbeforeprint;
[WebIDL] Add support for interface mixins https://bugs.webkit.org/show_bug.cgi?id=216217 Reviewed by Darin Adler. Implement support for WebIDL interface mixins, which are interface fragments that can be included into other interfaces (using an 'includes' statement), but do not create new types themselves. Prior to this, we have been emulating the behavior by allowing any interface to be included in another interface, and marking some interfaces with the [LegacyNoInterfaceObject] extended attribute. This change codifies that with in the spec approved way. - Updates IDL parser to parse mixin interfaces (and fixes the parsing of callback interfaces to be a bit more strict while I was there). - Updates IDL pre-processor to avoid creating global variables and IsoSubspaces for mixins. - Updates IDL code generator to only support including mixin interfaces during supplemental inclusion. - Updates IDL files to use interface mixin where appropriately specified. * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * CMakeLists.txt: * DerivedSources-output.xcfilelist: * DerivedSources.make: * dom/DeviceOrientationOrMotionEvent.idl: Removed. Remove DeviceOrientationOrMotionEvent.idl and corresponding generated files, inlining it into DeviceMotionEvent.idl and DeviceOrientationEvent.idl as specified. This is needed as mixin interfaces do not support static operations or attributes. * bindings/scripts/CodeGenerator.pm: (IsValidSupplementalInterface): (IsValidSupplementalDictionary): (ProcessSupplementalDependencies): (GetInterfaceExtendedAttributesFromName): Update IDL code generator to only support including mixin interfaces during supplemental inclusion. Also removes some left of remnents of exception interface support. * bindings/scripts/IDLParser.pm: (parseCallbackRestOrInterface): (parseCallbackInterface): (parseCallbackInterfaceMembers): (parseCallbackInterfaceMember): (parseMixin): (parseMixinMembers): (parseMixinMember): (parseNamespace): (parsePartialInterfaceMember): (parseAttributeOrOperationForStringifierOrStatic): Update IDL parser to parse mixin interfaces and fix the parsing of callback interfaces to match the spec by restricting its members to constants and regular functions. * bindings/scripts/preprocess-idls.pl: (isMixinInterfaceFromIDL): (containsInterfaceFromIDL): (getInterfaceExtendedAttributesFromIDL): (containsInterfaceOrExceptionFromIDL): Deleted. Ensure mixin interfaces don't get exposed on any global objects and remove some left of remnents of exception interface support. * bindings/scripts/test/JS/JSTestInterface.cpp: * bindings/scripts/test/JS/JSTestLegacyNoInterfaceObject.cpp: Added. * bindings/scripts/test/JS/JSTestLegacyNoInterfaceObject.h: Added. * bindings/scripts/test/SupplementalDependencies.dep: * bindings/scripts/test/TestIncludes.idl: * bindings/scripts/test/TestLegacyNoInterfaceObject.idl: Added. * bindings/scripts/test/TestOperationBase.idl: Update bindings tests to use mixins for includes. Add new dedicated [LegacyNoInterfaceObject] since it was no longer being tested. * Modules/fetch/FetchBody.idl: * Modules/mediasource/VideoPlaybackQuality.idl: * Modules/speech/SpeechSynthesis.idl: * Modules/speech/SpeechSynthesisVoice.idl: * Modules/streams/ReadableStreamSink.idl: * accessibility/AccessibilityRole.idl: * accessibility/AriaAttributes.idl: * animation/Animatable.idl: * css/ElementCSSInlineStyle.idl: * css/StyleMedia.idl: * dom/ChildNode.idl: * dom/DeviceMotionEvent.idl: * dom/DeviceOrientationEvent.idl: * dom/Document.idl: * dom/DocumentAndElementEventHandlers.idl: * dom/DocumentOrShadowRoot.idl: * dom/EventListener.idl: * dom/GlobalEventHandlers.idl: * dom/NavigatorMaxTouchPoints.idl: * dom/NonDocumentTypeChildNode.idl: * dom/NonElementParentNode.idl: * dom/ParentNode.idl: * dom/Slotable.idl: * html/HTMLHyperlinkElementUtils.idl: * html/HTMLOrForeignElement.idl: * html/canvas/CanvasCompositing.idl: * html/canvas/CanvasDrawImage.idl: * html/canvas/CanvasDrawPath.idl: * html/canvas/CanvasFillStrokeStyles.idl: * html/canvas/CanvasFilters.idl: * html/canvas/CanvasGradient.idl: * html/canvas/CanvasImageData.idl: * html/canvas/CanvasImageSmoothing.idl: * html/canvas/CanvasPath.idl: * html/canvas/CanvasPathDrawingStyles.idl: * html/canvas/CanvasRect.idl: * html/canvas/CanvasShadowStyles.idl: * html/canvas/CanvasState.idl: * html/canvas/CanvasText.idl: * html/canvas/CanvasTextDrawingStyles.idl: * html/canvas/CanvasTransform.idl: * html/canvas/CanvasUserInterface.idl: * html/canvas/WebGLRenderingContextBase.idl: * page/GlobalCrypto.idl: * page/GlobalPerformance.idl: * page/Navigator.idl: * page/NavigatorID.idl: * page/NavigatorLanguage.idl: * page/NavigatorOnLine.idl: * page/NavigatorPlugins.idl: * page/NavigatorServiceWorker.idl: * page/NavigatorShare.idl: * page/WindowEventHandlers.idl: * page/WindowOrWorkerGlobalScope.idl: * svg/SVGFilterPrimitiveStandardAttributes.idl: * svg/SVGFitToViewBox.idl: * svg/SVGTests.idl: * svg/SVGURIReference.idl: * svg/SVGZoomAndPan.idl: * workers/AbstractWorker.idl: * xml/XPathEvaluator.idl: * xml/XPathNSResolver.idl: Update IDLs. Canonical link: https://commits.webkit.org/229047@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@266678 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-09-06 02:49:22 +00:00
// FIXME: The spec says that onbeforeunload should be of type OnBeforeUnloadEventHandler, not EventHandler.
[WindowEventHandler] attribute EventHandler onbeforeunload;
[WindowEventHandler] attribute EventHandler onhashchange;
[WindowEventHandler] attribute EventHandler onlanguagechange;
[WindowEventHandler] attribute EventHandler onmessage;
Re-align DocumentAndElementEventHandlers.idl, GlobalEventHandlers.idl and WindowEventHandlers.idl with the HTML spec https://bugs.webkit.org/show_bug.cgi?id=217088 Reviewed by Darin Adler. LayoutTests/imported/w3c: Update results for more passing tests. * web-platform-tests/html/dom/idlharness.https-expected.txt: * web-platform-tests/html/webappapis/scripting/events/event-handler-attributes-body-window-expected.txt: * web-platform-tests/html/webappapis/scripting/events/event-handler-attributes-windowless-body-expected.txt: * web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt: Source/WebCore: Re-align DocumentAndElementEventHandlers.idl, GlobalEventHandlers.idl and WindowEventHandlers.idl with the HTML spec, adding commented out variants of properties we don't yet support. The actual changes are: - onwebkitanimation* handlers moved from DocumentAndElementEventHandlers to GlobalEventHandlers (and were removed from DOMWindow as they are now redundant). - onrejectionhandled/onunhandledrejection handlers move from GlobalEventHandlers to WindowEventHandlers Updated results for more existing tests that now pass. * dom/DocumentAndElementEventHandlers.idl: * dom/GlobalEventHandlers.idl: * page/DOMWindow.idl: * page/WindowEventHandlers.idl: * workers/WorkerGlobalScope.idl: LayoutTests: Update results for more passing tests. * fast/dom/event-handler-attributes-expected.txt: * js/dom/dom-static-property-for-in-iteration-expected.txt: * platform/glib/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt: * platform/gtk/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt: * platform/gtk/js/dom/dom-static-property-for-in-iteration-expected.txt: * platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt: * platform/ios-wk2/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt: * platform/ios-wk2/js/dom/dom-static-property-for-in-iteration-expected.txt: * platform/mac-wk1/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt: * platform/mac-wk1/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt: * platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt: * platform/mac-wk2/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt: * platform/mac-wk2/js/dom/dom-static-property-for-in-iteration-expected.txt: * platform/wpe/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt: * platform/wpe/js/dom/dom-static-property-for-in-iteration-expected.txt: Canonical link: https://commits.webkit.org/229912@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@267791 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-09-30 16:04:16 +00:00
// FIXME: Implement 'onmessageerror'
// attribute EventHandler onmessageerror;
[WindowEventHandler] attribute EventHandler onoffline;
[WindowEventHandler] attribute EventHandler ononline;
[WindowEventHandler] attribute EventHandler onpagehide;
[WindowEventHandler] attribute EventHandler onpageshow;
[WindowEventHandler] attribute EventHandler onpopstate;
Re-align DocumentAndElementEventHandlers.idl, GlobalEventHandlers.idl and WindowEventHandlers.idl with the HTML spec https://bugs.webkit.org/show_bug.cgi?id=217088 Reviewed by Darin Adler. LayoutTests/imported/w3c: Update results for more passing tests. * web-platform-tests/html/dom/idlharness.https-expected.txt: * web-platform-tests/html/webappapis/scripting/events/event-handler-attributes-body-window-expected.txt: * web-platform-tests/html/webappapis/scripting/events/event-handler-attributes-windowless-body-expected.txt: * web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt: Source/WebCore: Re-align DocumentAndElementEventHandlers.idl, GlobalEventHandlers.idl and WindowEventHandlers.idl with the HTML spec, adding commented out variants of properties we don't yet support. The actual changes are: - onwebkitanimation* handlers moved from DocumentAndElementEventHandlers to GlobalEventHandlers (and were removed from DOMWindow as they are now redundant). - onrejectionhandled/onunhandledrejection handlers move from GlobalEventHandlers to WindowEventHandlers Updated results for more existing tests that now pass. * dom/DocumentAndElementEventHandlers.idl: * dom/GlobalEventHandlers.idl: * page/DOMWindow.idl: * page/WindowEventHandlers.idl: * workers/WorkerGlobalScope.idl: LayoutTests: Update results for more passing tests. * fast/dom/event-handler-attributes-expected.txt: * js/dom/dom-static-property-for-in-iteration-expected.txt: * platform/glib/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt: * platform/gtk/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt: * platform/gtk/js/dom/dom-static-property-for-in-iteration-expected.txt: * platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt: * platform/ios-wk2/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt: * platform/ios-wk2/js/dom/dom-static-property-for-in-iteration-expected.txt: * platform/mac-wk1/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt: * platform/mac-wk1/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt: * platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt: * platform/mac-wk2/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt: * platform/mac-wk2/js/dom/dom-static-property-for-in-iteration-expected.txt: * platform/wpe/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt: * platform/wpe/js/dom/dom-static-property-for-in-iteration-expected.txt: Canonical link: https://commits.webkit.org/229912@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@267791 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-09-30 16:04:16 +00:00
[WindowEventHandler] attribute EventHandler onrejectionhandled;
[WindowEventHandler] attribute EventHandler onstorage;
Re-align DocumentAndElementEventHandlers.idl, GlobalEventHandlers.idl and WindowEventHandlers.idl with the HTML spec https://bugs.webkit.org/show_bug.cgi?id=217088 Reviewed by Darin Adler. LayoutTests/imported/w3c: Update results for more passing tests. * web-platform-tests/html/dom/idlharness.https-expected.txt: * web-platform-tests/html/webappapis/scripting/events/event-handler-attributes-body-window-expected.txt: * web-platform-tests/html/webappapis/scripting/events/event-handler-attributes-windowless-body-expected.txt: * web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt: Source/WebCore: Re-align DocumentAndElementEventHandlers.idl, GlobalEventHandlers.idl and WindowEventHandlers.idl with the HTML spec, adding commented out variants of properties we don't yet support. The actual changes are: - onwebkitanimation* handlers moved from DocumentAndElementEventHandlers to GlobalEventHandlers (and were removed from DOMWindow as they are now redundant). - onrejectionhandled/onunhandledrejection handlers move from GlobalEventHandlers to WindowEventHandlers Updated results for more existing tests that now pass. * dom/DocumentAndElementEventHandlers.idl: * dom/GlobalEventHandlers.idl: * page/DOMWindow.idl: * page/WindowEventHandlers.idl: * workers/WorkerGlobalScope.idl: LayoutTests: Update results for more passing tests. * fast/dom/event-handler-attributes-expected.txt: * js/dom/dom-static-property-for-in-iteration-expected.txt: * platform/glib/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt: * platform/gtk/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt: * platform/gtk/js/dom/dom-static-property-for-in-iteration-expected.txt: * platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt: * platform/ios-wk2/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt: * platform/ios-wk2/js/dom/dom-static-property-for-in-iteration-expected.txt: * platform/mac-wk1/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt: * platform/mac-wk1/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt: * platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt: * platform/mac-wk2/imported/w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative-expected.txt: * platform/mac-wk2/js/dom/dom-static-property-for-in-iteration-expected.txt: * platform/wpe/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt: * platform/wpe/js/dom/dom-static-property-for-in-iteration-expected.txt: Canonical link: https://commits.webkit.org/229912@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@267791 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-09-30 16:04:16 +00:00
[WindowEventHandler] attribute EventHandler onunhandledrejection;
[WindowEventHandler] attribute EventHandler onunload;
Organize event handlers a bit https://bugs.webkit.org/show_bug.cgi?id=145106 Reviewed by Darin Adler. Source/WebCore: - Add GlobalEventHandlers.idl (from https://html.spec.whatwg.org/multipage/webappapis.html#globaleventhandlers) and move all event handlers shared by Element, Document and DOMWindow there. Put all the standard defined event handlers at the top (commenting out the ones that aren't implemented yet) and the non-standard ones at the bottom. There is one change in behavior here. Previously, the media related event handlers where only exposed on Element and DOMWindow. The spec says they should also be on Document, so this adds support for that (this is tested in fast/dom/event-handler-attributes.html). - Add WindowEventHandlers.idl (from https://html.spec.whatwg.org/multipage/webappapis.html#windoweventhandlers) and move all event handlers shared by DOMWindow, HTMLBodyElement and HTMLFrameSetElement there. Put all the standard defined event handlers at the top (commenting out the ones that aren't implemented yet) and the non-standard ones at the bottom. - Group remaining event handlers in Element, Document, DOMWindow, HTMLBodyElement and HTMLFrameSetElement by their grouping, and add some FIXMEs for future cleaning. * CMakeLists.txt: * DerivedSources.make: * WebCore.xcodeproj/project.pbxproj: - Add GlobalEventHandlers.idl and WindowEventHandlers.idl. * bindings/scripts/CodeGeneratorJS.pm: (GenerateImplementation): Add special cases for WindowEventHandler when used on DOMWindow and DocumentEventHandler when used on Document so that event handlers using those extended attributes can be set on shared interfaces. This is used to allow DOMWindow to implement WindowEventHandlers. * dom/Document.idl: Move event handlers to GlobalEventHandlers and have Document implement it. Group remaining event handlers. * dom/Element.idl: Move event handlers to GlobalEventHandlers and have Element implement it. Group remaining event handlers. * dom/GlobalEventHandlers.idl: Added. * html/HTMLBodyElement.idl: Move event handlers to WindowEventHandlers and have HTMLBodyElement implement it. Group remaining event handlers. * html/HTMLFrameSetElement.idl: Move event handlers to WindowEventHandlers and have HTMLFrameSetElement implement it. Group remaining event handlers. * page/DOMWindow.idl: Move event handlers to GlobalEventHandlers and WindowEventHandlers and have DOMWindow implement both of them. Group remaining event handlers. * page/WindowEventHandlers.idl: Added. LayoutTests: * fast/dom/event-handler-attributes-expected.txt: * fast/dom/event-handler-attributes.html: Update for putting media related event handlers on Document in addition to Element and DOMWindow. Canonical link: https://commits.webkit.org/163205@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@184616 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-05-20 05:41:13 +00:00
};