Diff
Modified: trunk/LayoutTests/ChangeLog (216541 => 216542)
--- trunk/LayoutTests/ChangeLog 2017-05-09 21:35:55 UTC (rev 216541)
+++ trunk/LayoutTests/ChangeLog 2017-05-09 21:40:11 UTC (rev 216542)
@@ -1,3 +1,17 @@
+2017-05-09 Chris Dumez <[email protected]>
+
+ Introduce DocumentAndElementEventHandlers IDL interface
+ https://bugs.webkit.org/show_bug.cgi?id=171879
+
+ Reviewed by Simon Fraser and Ryosuke Niwa.
+
+ * fast/events/DocumentAndElementEventHandlers-expected.txt: Added.
+ * fast/events/DocumentAndElementEventHandlers.html: Added.
+ Add layout test coverage.
+
+ * js/dom/dom-static-property-for-in-iteration-expected.txt:
+ Rebaseline now that those event handlers are enumerable.
+
2017-05-10 Dean Jackson <[email protected]>
Restrict SVG filters to accessible security origins
Added: trunk/LayoutTests/fast/events/DocumentAndElementEventHandlers-expected.txt (0 => 216542)
--- trunk/LayoutTests/fast/events/DocumentAndElementEventHandlers-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/events/DocumentAndElementEventHandlers-expected.txt 2017-05-09 21:40:11 UTC (rev 216542)
@@ -0,0 +1,8 @@
+
+PASS oncopy EventHandler on Document
+PASS oncopy EventHander on Element
+PASS oncut EventHandler on Document
+PASS oncut EventHander on Element
+PASS onpaste EventHandler on Document
+PASS onpaste EventHander on Element
+
Added: trunk/LayoutTests/fast/events/DocumentAndElementEventHandlers.html (0 => 216542)
--- trunk/LayoutTests/fast/events/DocumentAndElementEventHandlers.html (rev 0)
+++ trunk/LayoutTests/fast/events/DocumentAndElementEventHandlers.html 2017-05-09 21:40:11 UTC (rev 216542)
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html>
+<body>
+<script src=""
+<script src=""
+<script>
+function testOnDocument(eventHandler, description)
+{
+ test(function() {
+ assert_idl_attribute(document, eventHandler, "document has " + eventHandler + " IDL attribute");
+ assert_own_property(Document.prototype, eventHandler, eventHandler + " on Document prototype");
+ assert_true(eventHandler in document, eventHandler + " in document is true");
+ assert_true(Object.getOwnPropertyDescriptor(Document.prototype, eventHandler).enumerable, "document." + eventHandler + " is enumerable");
+ }, description);
+}
+
+function testOnElement(eventHandler, description)
+{
+ test(function() {
+ assert_idl_attribute(document.body, eventHandler, "element has " + eventHandler + " IDL attribute");
+ assert_own_property(Element.prototype, eventHandler, eventHandler + " on Element prototype");
+ assert_true(eventHandler in document.body, eventHandler + " in element is true");
+ assert_true(Object.getOwnPropertyDescriptor(Element.prototype, eventHandler).enumerable, "element." + eventHandler + " is enumerable");
+ }, description);
+}
+
+for (let eventHandler of ["oncopy", "oncut", "onpaste"]) {
+ testOnDocument(eventHandler, eventHandler + " EventHandler on Document");
+ testOnElement(eventHandler, eventHandler + " EventHander on Element");
+}
+</script>
+</body>
+</html>
Modified: trunk/LayoutTests/js/dom/dom-static-property-for-in-iteration-expected.txt (216541 => 216542)
--- trunk/LayoutTests/js/dom/dom-static-property-for-in-iteration-expected.txt 2017-05-09 21:35:55 UTC (rev 216541)
+++ trunk/LayoutTests/js/dom/dom-static-property-for-in-iteration-expected.txt 2017-05-09 21:40:11 UTC (rev 216542)
@@ -135,6 +135,9 @@
PASS a["innerHTML"] is nerget
PASS a["outerHTML"] is <a id="foo" href=""
PASS a["webkitRegionOverset"] is undefined
+PASS a["oncopy"] is null
+PASS a["oncut"] is null
+PASS a["onpaste"] is null
PASS a["previousElementSibling"] is [object HTMLDivElement]
PASS a["nextElementSibling"] is [object HTMLScriptElement]
PASS a["children"] is [object HTMLCollection]
Modified: trunk/Source/WebCore/CMakeLists.txt (216541 => 216542)
--- trunk/Source/WebCore/CMakeLists.txt 2017-05-09 21:35:55 UTC (rev 216541)
+++ trunk/Source/WebCore/CMakeLists.txt 2017-05-09 21:40:11 UTC (rev 216542)
@@ -431,6 +431,7 @@
dom/DeviceMotionEvent.idl
dom/DeviceOrientationEvent.idl
dom/Document.idl
+ dom/DocumentAndElementEventHandlers.idl
dom/DocumentFragment.idl
dom/DocumentOrShadowRoot.idl
dom/DocumentType.idl
Modified: trunk/Source/WebCore/ChangeLog (216541 => 216542)
--- trunk/Source/WebCore/ChangeLog 2017-05-09 21:35:55 UTC (rev 216541)
+++ trunk/Source/WebCore/ChangeLog 2017-05-09 21:40:11 UTC (rev 216542)
@@ -1,3 +1,27 @@
+2017-05-09 Chris Dumez <[email protected]>
+
+ Introduce DocumentAndElementEventHandlers IDL interface
+ https://bugs.webkit.org/show_bug.cgi?id=171879
+
+ Reviewed by Simon Fraser and Ryosuke Niwa.
+
+ Introduce DocumentAndElementEventHandlers IDL interface:
+ - https://html.spec.whatwg.org/#documentandelementeventhandlers
+
+ This avoids duplication between Document.idl and Element.idl.
+
+ Also mark oncopy / oncut / onpaste EventHandlers as enumerable to match
+ the specification.
+
+ Test: fast/events/DocumentAndElementEventHandlers.html
+
+ * CMakeLists.txt:
+ * DerivedSources.make:
+ * WebCore.xcodeproj/project.pbxproj:
+ * dom/Document.idl:
+ * dom/DocumentAndElementEventHandlers.idl: Added.
+ * dom/Element.idl:
+
2017-05-10 Dean Jackson <[email protected]>
Restrict SVG filters to accessible security origins
Modified: trunk/Source/WebCore/DerivedSources.make (216541 => 216542)
--- trunk/Source/WebCore/DerivedSources.make 2017-05-09 21:35:55 UTC (rev 216541)
+++ trunk/Source/WebCore/DerivedSources.make 2017-05-09 21:40:11 UTC (rev 216542)
@@ -367,6 +367,7 @@
$(WebCore)/dom/DeviceMotionEvent.idl \
$(WebCore)/dom/DeviceOrientationEvent.idl \
$(WebCore)/dom/Document.idl \
+ $(WebCore)/dom/DocumentAndElementEventHandlers.idl \
$(WebCore)/dom/DocumentFragment.idl \
$(WebCore)/dom/DocumentOrShadowRoot.idl \
$(WebCore)/dom/DocumentType.idl \
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (216541 => 216542)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2017-05-09 21:35:55 UTC (rev 216541)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2017-05-09 21:40:11 UTC (rev 216542)
@@ -3125,8 +3125,8 @@
7C4C96DD1AD4483500365A50 /* JSReadableStream.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C4C96D91AD4483500365A50 /* JSReadableStream.h */; };
7C4C96DD1AD4483500365A60 /* JSWritableStream.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C4C96D91AD4483500365A60 /* JSWritableStream.h */; };
7C4C96DE1AD4483500363572 /* JSReadableStreamBYOBReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C4C96DA1AD4483500363572 /* JSReadableStreamBYOBReader.cpp */; };
+ 7C4C96DE1AD4483500365A50 /* JSReadableStreamDefaultReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C4C96DA1AD4483500365A50 /* JSReadableStreamDefaultReader.cpp */; };
7C4C96DF1AD4483500363572 /* JSReadableStreamBYOBReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C4C96DB1AD4483500363572 /* JSReadableStreamBYOBReader.h */; };
- 7C4C96DE1AD4483500365A50 /* JSReadableStreamDefaultReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C4C96DA1AD4483500365A50 /* JSReadableStreamDefaultReader.cpp */; };
7C4C96DF1AD4483500365A50 /* JSReadableStreamDefaultReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C4C96DB1AD4483500365A50 /* JSReadableStreamDefaultReader.h */; };
7C4C96E31AD44ABF00365A50 /* LaunchServicesSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C4C96E21AD44ABF00365A50 /* LaunchServicesSPI.h */; settings = {ATTRIBUTES = (Private, ); }; };
7C4EDD741A7B607800198C4D /* FontCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7C4EDD731A7B607800198C4D /* FontCocoa.mm */; };
@@ -11138,8 +11138,8 @@
7C4C96D91AD4483500365A50 /* JSReadableStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSReadableStream.h; sourceTree = "<group>"; };
7C4C96D91AD4483500365A60 /* JSWritableStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWritableStream.h; sourceTree = "<group>"; };
7C4C96DA1AD4483500363572 /* JSReadableStreamBYOBReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSReadableStreamBYOBReader.cpp; sourceTree = "<group>"; };
+ 7C4C96DA1AD4483500365A50 /* JSReadableStreamDefaultReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSReadableStreamDefaultReader.cpp; sourceTree = "<group>"; };
7C4C96DB1AD4483500363572 /* JSReadableStreamBYOBReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSReadableStreamBYOBReader.h; sourceTree = "<group>"; };
- 7C4C96DA1AD4483500365A50 /* JSReadableStreamDefaultReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSReadableStreamDefaultReader.cpp; sourceTree = "<group>"; };
7C4C96DB1AD4483500365A50 /* JSReadableStreamDefaultReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSReadableStreamDefaultReader.h; sourceTree = "<group>"; };
7C4C96E21AD44ABF00365A50 /* LaunchServicesSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LaunchServicesSPI.h; sourceTree = "<group>"; };
7C4EDD731A7B607800198C4D /* FontCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = FontCocoa.mm; sourceTree = "<group>"; };
@@ -11365,6 +11365,7 @@
830A36BB1DAC5FA7006D7D09 /* JSMouseEventInit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSMouseEventInit.h; sourceTree = "<group>"; };
83149FF51EB38B1200089665 /* DOMRect.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DOMRect.cpp; sourceTree = "<group>"; };
831D1F291C56ECA000F5F6C0 /* HTMLDataElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLDataElement.cpp; sourceTree = "<group>"; };
+ 8329A4171EC25B2B008ED4BE /* DocumentAndElementEventHandlers.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DocumentAndElementEventHandlers.idl; sourceTree = "<group>"; };
8329DCC21C7A6AE300730B33 /* HTMLHyperlinkElementUtils.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = HTMLHyperlinkElementUtils.idl; sourceTree = "<group>"; };
832B843319D8E55100B26055 /* SVGAnimateElementBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAnimateElementBase.h; sourceTree = "<group>"; };
832B843519D8E57400B26055 /* SVGAnimateElementBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGAnimateElementBase.cpp; sourceTree = "<group>"; };
@@ -12276,8 +12277,8 @@
9908B0F11BCACF9100ED0F65 /* ReadableStreamInternals.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode._javascript_; path = ReadableStreamInternals.js; sourceTree = "<group>"; };
9908B0F11BCACF9100ED0F75 /* WritableStreamInternals.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode._javascript_; path = WritableStreamInternals.js; sourceTree = "<group>"; };
9908B0F11BCACF9100ED3F64 /* ReadableByteStreamInternals.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode._javascript_; path = ReadableByteStreamInternals.js; sourceTree = "<group>"; };
+ 9908B0F21BCACF9100ED0F65 /* ReadableStreamDefaultReader.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode._javascript_; path = ReadableStreamDefaultReader.js; sourceTree = "<group>"; };
9908B0F21BCACF9100ED3572 /* ReadableStreamBYOBReader.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode._javascript_; path = ReadableStreamBYOBReader.js; sourceTree = "<group>"; };
- 9908B0F21BCACF9100ED0F65 /* ReadableStreamDefaultReader.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode._javascript_; path = ReadableStreamDefaultReader.js; sourceTree = "<group>"; };
9908B0F31BCACFFE00ED0F65 /* ByteLengthQueuingStrategyBuiltins.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ByteLengthQueuingStrategyBuiltins.cpp; sourceTree = "<group>"; };
9908B0F51BCAD07D00ED0F65 /* ByteLengthQueuingStrategyBuiltins.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ByteLengthQueuingStrategyBuiltins.h; sourceTree = "<group>"; };
9908B0F61BCAD07D00ED0F65 /* CountQueuingStrategyBuiltins.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CountQueuingStrategyBuiltins.cpp; sourceTree = "<group>"; };
@@ -12292,10 +12293,10 @@
9908B0FD1BCAD07D00ED0F66 /* JSDOMBindingInternalsBuiltins.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMBindingInternalsBuiltins.cpp; sourceTree = "<group>"; };
9908B0FD1BCAD07D00ED0F75 /* WritableStreamInternalsBuiltins.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WritableStreamInternalsBuiltins.cpp; sourceTree = "<group>"; };
9908B0FD1BCAD07D00ED3F64 /* ReadableByteStreamInternalsBuiltins.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ReadableByteStreamInternalsBuiltins.cpp; sourceTree = "<group>"; };
+ 9908B0FE1BCAD07D00ED0F65 /* ReadableStreamDefaultReaderBuiltins.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ReadableStreamDefaultReaderBuiltins.cpp; sourceTree = "<group>"; };
9908B0FE1BCAD07D00ED3572 /* ReadableStreamBYOBReaderBuiltins.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ReadableStreamBYOBReaderBuiltins.cpp; sourceTree = "<group>"; };
+ 9908B0FF1BCAD07D00ED0F65 /* ReadableStreamDefaultReaderBuiltins.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReadableStreamDefaultReaderBuiltins.h; sourceTree = "<group>"; };
9908B0FF1BCAD07D00ED3572 /* ReadableStreamBYOBReaderBuiltins.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReadableStreamBYOBReaderBuiltins.h; sourceTree = "<group>"; };
- 9908B0FE1BCAD07D00ED0F65 /* ReadableStreamDefaultReaderBuiltins.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ReadableStreamDefaultReaderBuiltins.cpp; sourceTree = "<group>"; };
- 9908B0FF1BCAD07D00ED0F65 /* ReadableStreamDefaultReaderBuiltins.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReadableStreamDefaultReaderBuiltins.h; sourceTree = "<group>"; };
9920398018B95BC600B39AF9 /* UserInputBridge.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UserInputBridge.cpp; sourceTree = "<group>"; };
9920398118B95BC600B39AF9 /* UserInputBridge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UserInputBridge.h; sourceTree = "<group>"; };
996E59DB1DF00D90006612B9 /* NavigatorWebDriver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NavigatorWebDriver.cpp; sourceTree = "<group>"; };
@@ -25523,6 +25524,7 @@
A8185F3409765765005826D9 /* Document.cpp */,
A8185F3809765765005826D9 /* Document.h */,
6548E24809E1E04D00AF8020 /* Document.idl */,
+ 8329A4171EC25B2B008ED4BE /* DocumentAndElementEventHandlers.idl */,
A3BB59F11457A40D00AC56FE /* DocumentEventQueue.cpp */,
A3BB59F21457A40D00AC56FE /* DocumentEventQueue.h */,
A8185F3709765765005826D9 /* DocumentFragment.cpp */,
Modified: trunk/Source/WebCore/dom/Document.idl (216541 => 216542)
--- trunk/Source/WebCore/dom/Document.idl 2017-05-09 21:35:55 UTC (rev 216541)
+++ trunk/Source/WebCore/dom/Document.idl 2017-05-09 21:40:11 UTC (rev 216542)
@@ -144,12 +144,6 @@
readonly attribute VisibilityState visibilityState;
attribute EventHandler onvisibilitychange;
- // FIXME: Should be in a separate DocumentAndElementEventHandlers interface.
- // https://html.spec.whatwg.org/#documentandelementeventhandlers
- [NotEnumerable] attribute EventHandler oncopy; // FIXME: Should be enumerable.
- [NotEnumerable] attribute EventHandler oncut; // FIXME: Should be enumerable.
- [NotEnumerable] attribute EventHandler onpaste; // FIXME: Should be enumerable.
-
// FIXME: Those have been dropped from the HTML specification.
readonly attribute HTMLCollection applets;
readonly attribute HTMLCollection anchors;
@@ -190,12 +184,6 @@
optional unrestricted float webkitRotationAngle = NaN, optional unrestricted float webkitForce = NaN);
[NewObject, Custom] TouchList createTouchList(Touch... touches);
#endif
-
- // Non standard event handlers.
- [NotEnumerable] attribute EventHandler onbeforecopy;
- [NotEnumerable] attribute EventHandler onbeforecut;
- [NotEnumerable] attribute EventHandler onbeforeinput;
- [NotEnumerable] attribute EventHandler onbeforepaste;
};
// FIXME: Missing "unloaded" value (https://www.w3.org/TR/page-visibility/#sec-document-interface).
@@ -203,6 +191,7 @@
enum DocumentReadyState { "loading", "interactive", "complete" };
+Document implements DocumentAndElementEventHandlers;
Document implements ParentNode;
Document implements NonElementParentNode;
Document implements DocumentOrShadowRoot;
Added: trunk/Source/WebCore/dom/DocumentAndElementEventHandlers.idl (0 => 216542)
--- trunk/Source/WebCore/dom/DocumentAndElementEventHandlers.idl (rev 0)
+++ trunk/Source/WebCore/dom/DocumentAndElementEventHandlers.idl 2017-05-09 21:40:11 UTC (rev 216542)
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2017 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. AND ITS CONTRIBUTORS ``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 ITS 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/#documentandelementeventhandlers
+[
+ NoInterfaceObject,
+] interface DocumentAndElementEventHandlers {
+ attribute EventHandler oncopy;
+ attribute EventHandler oncut;
+ attribute EventHandler onpaste;
+
+ // Non standard.
+ [NotEnumerable] attribute EventHandler onbeforecopy;
+ [NotEnumerable] attribute EventHandler onbeforecut;
+ [NotEnumerable] attribute EventHandler onbeforeinput;
+ [NotEnumerable] attribute EventHandler onbeforepaste;
+};
Modified: trunk/Source/WebCore/dom/Element.idl (216541 => 216542)
--- trunk/Source/WebCore/dom/Element.idl 2017-05-09 21:35:55 UTC (rev 216541)
+++ trunk/Source/WebCore/dom/Element.idl 2017-05-09 21:40:11 UTC (rev 216542)
@@ -117,15 +117,8 @@
[NotEnumerable, Conditional=IOS_GESTURE_EVENTS] attribute EventHandler ongestureend;
[NotEnumerable, Conditional=IOS_GESTURE_EVENTS] attribute EventHandler ongesturestart;
- // Non standard event handlers.
+ // Non standard.
[NotEnumerable, ImplementedAs=onwebkitAnimationEnd] attribute EventHandler onwebkitanimationend;
- [NotEnumerable] attribute EventHandler onbeforecopy;
- [NotEnumerable] attribute EventHandler onbeforecut;
- [NotEnumerable] attribute EventHandler onbeforeinput;
- [NotEnumerable] attribute EventHandler onbeforepaste;
- [NotEnumerable] attribute EventHandler oncopy;
- [NotEnumerable] attribute EventHandler oncut;
- [NotEnumerable] attribute EventHandler onpaste;
[NotEnumerable, ImplementedAs=onwebkitAnimationIteration] attribute EventHandler onwebkitanimationiteration;
[NotEnumerable, ImplementedAs=onwebkitAnimationStart] attribute EventHandler onwebkitanimationstart;
[NotEnumerable, ImplementedAs=onwebkitTransitionEnd] attribute EventHandler onwebkittransitionend;
@@ -160,6 +153,7 @@
Element implements Animatable;
Element implements ChildNode;
+Element implements DocumentAndElementEventHandlers;
Element implements NonDocumentTypeChildNode;
Element implements ParentNode;
Element implements Slotable;