Diff
Modified: trunk/LayoutTests/ChangeLog (229111 => 229112)
--- trunk/LayoutTests/ChangeLog 2018-03-01 00:12:17 UTC (rev 229111)
+++ trunk/LayoutTests/ChangeLog 2018-03-01 00:30:08 UTC (rev 229112)
@@ -1,3 +1,15 @@
+2018-02-28 Nan Wang <n_w...@apple.com>
+
+ AX: AOM: Dispatch accessiblesetvalue event
+ https://bugs.webkit.org/show_bug.cgi?id=183021
+ <rdar://problem/37764242>
+
+ Reviewed by Chris Fleizach.
+
+ * accessibility/mac/AOM-event-accessiblesetvalue-expected.txt: Added.
+ * accessibility/mac/AOM-event-accessiblesetvalue.html: Added.
+ * js/dom/dom-static-property-for-in-iteration-expected.txt:
+
2018-02-28 Chris Dumez <cdu...@apple.com>
html/browsers/browsing-the-web/navigating-across-documents/006.html fails with async policy delegates
Added: trunk/LayoutTests/accessibility/mac/AOM-event-accessiblesetvalue-expected.txt (0 => 229112)
--- trunk/LayoutTests/accessibility/mac/AOM-event-accessiblesetvalue-expected.txt (rev 0)
+++ trunk/LayoutTests/accessibility/mac/AOM-event-accessiblesetvalue-expected.txt 2018-03-01 00:30:08 UTC (rev 229112)
@@ -0,0 +1,28 @@
+button
+contenteditable new value
+
+scrollbar
+This tests accessiblesetvalue event.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+
+Test Combobox.
+combobox accessible set value to: combobox new value
+
+Test Contenteditable.
+contenteditable accessible set value to: contenteditable new value
+
+Test Slider.
+slider accessible set value to: 70
+
+Test Scrollbar.
+scroller accessible set value to: 60
+
+Test that accessiblesetvalue event can only be dispatched to nodes that support setting their values.
+PASS receivedAXEvent is false
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/accessibility/mac/AOM-event-accessiblesetvalue.html (0 => 229112)
--- trunk/LayoutTests/accessibility/mac/AOM-event-accessiblesetvalue.html (rev 0)
+++ trunk/LayoutTests/accessibility/mac/AOM-event-accessiblesetvalue.html 2018-03-01 00:30:08 UTC (rev 229112)
@@ -0,0 +1,101 @@
+<!DOCTYPE html>
+<html>
+<body id="body">
+<script src=""
+<div id="content">
+
+<button id="button">button</button>
+<div contenteditable="true" id="contenteditable">current</div>
+<div id="combobox" role="combobox" aria-expanded="false" aria-label="Test"></div>
+<input id="slider" type="range">
+<div id="scroller" aria-valuenow="55" role="scrollbar">scrollbar</div>
+
+</div>
+
+<p id="description"></p>
+<div id="console"></div>
+
+<script>
+
+ description("This tests accessiblesetvalue event.");
+
+ if (window.accessibilityController) {
+ jsTestIsAsync = true;
+
+ var node;
+ var axNode;
+ var receivedAXEvent = false;
+
+ testCombobox();
+
+ function testCanSetValue() {
+ debug("\nTest that accessiblesetvalue event can only be dispatched to nodes that support setting their values.");
+ node = document.getElementById("button");
+ axNode = accessibilityController.accessibleElementById("button");
+ node._onaccessiblesetvalue_ = function(event) {
+ receivedAXEvent = true;
+ debug("This shouldn't be reached.");
+ };
+ axNode.setValue("test value");
+
+ setTimeout(
+ function(){
+ shouldBeFalse("receivedAXEvent");
+ finishJSTest();
+ },
+ 50);
+ }
+
+ function testCombobox() {
+ debug("\nTest Combobox.");
+ node = document.getElementById("combobox");
+ axNode = accessibilityController.accessibleElementById("combobox");
+ node._onaccessiblesetvalue_ = function(event) {
+ debug("combobox accessible set value to: " + event.value);
+ testContenteditable();
+ };
+ axNode.setValue("combobox new value");
+ }
+
+ function testContenteditable() {
+ debug("\nTest Contenteditable.");
+ node = document.getElementById("contenteditable");
+ axNode = accessibilityController.accessibleElementById("contenteditable");
+ node._onaccessiblesetvalue_ = function(event) {
+ debug("contenteditable accessible set value to: " + event.value);
+ testSlider();
+ };
+ axNode.setValue("contenteditable new value");
+ }
+
+ function testSlider() {
+ debug("\nTest Slider.");
+ node = document.getElementById("slider");
+ axNode = accessibilityController.accessibleElementById("slider");
+ node._onaccessiblesetvalue_ = function(event) {
+ debug("slider accessible set value to: " + event.value);
+ testScrollbar();
+ };
+ axNode.setValue("70");
+ }
+
+ function testScrollbar() {
+ debug("\nTest Scrollbar.");
+ node = document.getElementById("scroller");
+ axNode = accessibilityController.accessibleElementById("scroller");
+ node._onaccessiblesetvalue_ = function(event) {
+ debug("scroller accessible set value to: " + event.value);
+ testCanSetValue();
+ };
+ axNode.setValue("60");
+ }
+
+ } else {
+ testFailed("Could not load accessibility controller");
+ }
+
+</script>
+
+<script src=""
+</body>
+</html>
Modified: trunk/LayoutTests/js/dom/dom-static-property-for-in-iteration-expected.txt (229111 => 229112)
--- trunk/LayoutTests/js/dom/dom-static-property-for-in-iteration-expected.txt 2018-03-01 00:12:17 UTC (rev 229111)
+++ trunk/LayoutTests/js/dom/dom-static-property-for-in-iteration-expected.txt 2018-03-01 00:30:08 UTC (rev 229112)
@@ -135,6 +135,7 @@
PASS a["innerHTML"] is nerget
PASS a["outerHTML"] is <a id="foo" href=""
PASS a["onaccessibleclick"] is null
+PASS a["onaccessiblesetvalue"] is null
PASS a["oncopy"] is null
PASS a["oncut"] is null
PASS a["onpaste"] is null
Modified: trunk/Source/WebCore/CMakeLists.txt (229111 => 229112)
--- trunk/Source/WebCore/CMakeLists.txt 2018-03-01 00:12:17 UTC (rev 229111)
+++ trunk/Source/WebCore/CMakeLists.txt 2018-03-01 00:30:08 UTC (rev 229112)
@@ -439,6 +439,8 @@
Modules/webvr/VRPose.idl
Modules/webvr/VRStageParameters.idl
+ accessibility/AccessibleSetValueEvent.idl
+
animation/Animatable.idl
animation/AnimationEffectReadOnly.idl
animation/AnimationEffectTiming.idl
Modified: trunk/Source/WebCore/ChangeLog (229111 => 229112)
--- trunk/Source/WebCore/ChangeLog 2018-03-01 00:12:17 UTC (rev 229111)
+++ trunk/Source/WebCore/ChangeLog 2018-03-01 00:30:08 UTC (rev 229112)
@@ -1,3 +1,46 @@
+2018-02-28 Nan Wang <n_w...@apple.com>
+
+ AX: AOM: Dispatch accessiblesetvalue event
+ https://bugs.webkit.org/show_bug.cgi?id=183021
+ <rdar://problem/37764242>
+
+ Reviewed by Chris Fleizach.
+
+ Accessibility events.
+ Spec: https://wicg.github.io/aom/spec/phase2.html
+
+ Added a new event type AccessibleSetValueEvent.
+
+ Test: accessibility/mac/AOM-event-accessiblesetvalue.html
+
+ * CMakeLists.txt:
+ * DerivedSources.make:
+ * Sources.txt:
+ * WebCore.xcodeproj/project.pbxproj:
+ * accessibility/AccessibilityAllInOne.cpp:
+ * accessibility/AccessibilityNodeObject.cpp:
+ (WebCore::AccessibilityNodeObject::canSetValueAttribute const):
+ * accessibility/AccessibilityObject.cpp:
+ (WebCore::AccessibilityObject::press):
+ (WebCore::AccessibilityObject::dispatchAccessibilityEvent):
+ (WebCore::AccessibilityObject::dispatchAccessibleSetValueEvent):
+ * accessibility/AccessibilityObject.h:
+ * accessibility/AccessibilityRenderObject.cpp:
+ (WebCore::AccessibilityRenderObject::setValue):
+ * accessibility/AccessibilityScrollbar.cpp:
+ (WebCore::AccessibilityScrollbar::setValue):
+ * accessibility/AccessibilitySlider.cpp:
+ (WebCore::AccessibilitySlider::setValue):
+ * accessibility/AccessibleSetValueEvent.cpp: Added.
+ (WebCore::AccessibleSetValueEvent::AccessibleSetValueEvent):
+ * accessibility/AccessibleSetValueEvent.h: Added.
+ (WebCore::AccessibleSetValueEvent::create):
+ (WebCore::AccessibleSetValueEvent::value const):
+ * accessibility/AccessibleSetValueEvent.idl: Added.
+ * dom/Element.idl:
+ * dom/EventNames.h:
+ * dom/EventNames.in:
+
2018-02-28 Chris Dumez <cdu...@apple.com>
html/browsers/browsing-the-web/navigating-across-documents/006.html fails with async policy delegates
Modified: trunk/Source/WebCore/DerivedSources.make (229111 => 229112)
--- trunk/Source/WebCore/DerivedSources.make 2018-03-01 00:12:17 UTC (rev 229111)
+++ trunk/Source/WebCore/DerivedSources.make 2018-03-01 00:30:08 UTC (rev 229112)
@@ -360,6 +360,7 @@
$(WebCore)/Modules/webvr/VRLayerInit.idl \
$(WebCore)/Modules/webvr/VRPose.idl \
$(WebCore)/Modules/webvr/VRStageParameters.idl \
+ $(WebCore)/accessibility/AccessibleSetValueEvent.idl \
$(WebCore)/animation/Animatable.idl \
$(WebCore)/animation/AnimationEffectReadOnly.idl \
$(WebCore)/animation/AnimationEffectTiming.idl \
Modified: trunk/Source/WebCore/Sources.txt (229111 => 229112)
--- trunk/Source/WebCore/Sources.txt 2018-03-01 00:12:17 UTC (rev 229111)
+++ trunk/Source/WebCore/Sources.txt 2018-03-01 00:30:08 UTC (rev 229112)
@@ -329,6 +329,7 @@
accessibility/AccessibilityTableRow.cpp
accessibility/AccessibilityTree.cpp
accessibility/AccessibilityTreeItem.cpp
+accessibility/AccessibleSetValueEvent.cpp
animation/AnimationEffectReadOnly.cpp
animation/AnimationEffectTiming.cpp
@@ -2327,6 +2328,7 @@
JSAbortController.cpp
JSAbortSignal.cpp
JSAbstractWorker.cpp
+JSAccessibleSetValueEvent.cpp
JSAesCbcCfbParams.cpp
JSAesCtrParams.cpp
JSAesGcmParams.cpp
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (229111 => 229112)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2018-03-01 00:12:17 UTC (rev 229111)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2018-03-01 00:30:08 UTC (rev 229112)
@@ -3232,6 +3232,7 @@
A9D248010D757E6900FDF959 /* JSDOMPluginArray.h in Headers */ = {isa = PBXBuildFile; fileRef = A9D247FD0D757E6900FDF959 /* JSDOMPluginArray.h */; };
A9D248070D757E7D00FDF959 /* JSDOMMimeType.h in Headers */ = {isa = PBXBuildFile; fileRef = A9D248030D757E7D00FDF959 /* JSDOMMimeType.h */; };
A9D248090D757E7D00FDF959 /* JSDOMMimeTypeArray.h in Headers */ = {isa = PBXBuildFile; fileRef = A9D248050D757E7D00FDF959 /* JSDOMMimeTypeArray.h */; };
+ A9F2E0EB20475CDE00512855 /* AccessibleSetValueEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = A9F2E0E820475CDC00512855 /* AccessibleSetValueEvent.h */; };
AA12DF491743DF83004DAFDF /* PlatformSpeechSynthesizerIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = AAE3755D17429BCC006200C2 /* PlatformSpeechSynthesizerIOS.mm */; };
AA21ECCD0ABF0FC6002B834C /* CSSCursorImageValue.h in Headers */ = {isa = PBXBuildFile; fileRef = AA0978EE0ABAA6E100874480 /* CSSCursorImageValue.h */; settings = {ATTRIBUTES = (Private, ); }; };
AA2A5ACE16A485FD00975A25 /* SpeechSynthesisVoice.h in Headers */ = {isa = PBXBuildFile; fileRef = AA2A5AC716A485D500975A25 /* SpeechSynthesisVoice.h */; };
@@ -11569,6 +11570,9 @@
A9D248030D757E7D00FDF959 /* JSDOMMimeType.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSDOMMimeType.h; sourceTree = "<group>"; };
A9D248040D757E7D00FDF959 /* JSDOMMimeTypeArray.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMMimeTypeArray.cpp; sourceTree = "<group>"; };
A9D248050D757E7D00FDF959 /* JSDOMMimeTypeArray.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSDOMMimeTypeArray.h; sourceTree = "<group>"; };
+ A9F2E0E720475CDC00512855 /* AccessibleSetValueEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AccessibleSetValueEvent.cpp; sourceTree = "<group>"; };
+ A9F2E0E820475CDC00512855 /* AccessibleSetValueEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AccessibleSetValueEvent.h; sourceTree = "<group>"; };
+ A9F2E0E920475CDE00512855 /* AccessibleSetValueEvent.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = AccessibleSetValueEvent.idl; sourceTree = "<group>"; };
AA0978ED0ABAA6E100874480 /* CSSCursorImageValue.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CSSCursorImageValue.cpp; sourceTree = "<group>"; };
AA0978EE0ABAA6E100874480 /* CSSCursorImageValue.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CSSCursorImageValue.h; sourceTree = "<group>"; };
AA2A5AB816A485D500975A25 /* DOMWindowSpeechSynthesis.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = DOMWindowSpeechSynthesis.cpp; sourceTree = "<group>"; };
@@ -16248,6 +16252,9 @@
A91C9FBD1B6586DE00AFFD54 /* AccessibilityTree.h */,
A91C9FC01B659A6700AFFD54 /* AccessibilityTreeItem.cpp */,
A91C9FC11B659A6700AFFD54 /* AccessibilityTreeItem.h */,
+ A9F2E0E720475CDC00512855 /* AccessibleSetValueEvent.cpp */,
+ A9F2E0E820475CDC00512855 /* AccessibleSetValueEvent.h */,
+ A9F2E0E920475CDE00512855 /* AccessibleSetValueEvent.idl */,
2981CAAF131822EC00D12F2A /* AXObjectCache.cpp */,
29A8121A0FBB9C1D00510293 /* AXObjectCache.h */,
91C9F2F81AE3BE240095B61C /* AXTextStateChangeIntent.h */,
@@ -27021,6 +27028,7 @@
5120BBAF1F1CECE700EFEBF1 /* CookieStorageObserver.h in Headers */,
9746AF2114F4DDE6003E7A71 /* Coordinates.h in Headers */,
3F8020351E9E47BF00DEC61D /* CoreAudioCaptureDevice.h in Headers */,
+ A9F2E0EB20475CDE00512855 /* AccessibleSetValueEvent.h in Headers */,
3F8020371E9E47C500DEC61D /* CoreAudioCaptureDeviceManager.h in Headers */,
07AFF4221EFB144900B545B3 /* CoreAudioCaptureSourceIOS.h in Headers */,
CD7D33481C7A16BF00041293 /* CoreVideoSoftLink.h in Headers */,
Modified: trunk/Source/WebCore/accessibility/AccessibilityAllInOne.cpp (229111 => 229112)
--- trunk/Source/WebCore/accessibility/AccessibilityAllInOne.cpp 2018-03-01 00:12:17 UTC (rev 229111)
+++ trunk/Source/WebCore/accessibility/AccessibilityAllInOne.cpp 2018-03-01 00:30:08 UTC (rev 229112)
@@ -58,3 +58,4 @@
#include "AccessibilityTableRow.cpp"
#include "AccessibilityTree.cpp"
#include "AccessibilityTreeItem.cpp"
+#include "AccessibleSetValueEvent.cpp"
Modified: trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp (229111 => 229112)
--- trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp 2018-03-01 00:12:17 UTC (rev 229111)
+++ trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp 2018-03-01 00:30:08 UTC (rev 229112)
@@ -2083,7 +2083,7 @@
if (isMeter())
return false;
- if (isProgressIndicator() || isSlider())
+ if (isProgressIndicator() || isSlider() || isScrollbar())
return true;
#if PLATFORM(GTK)
Modified: trunk/Source/WebCore/accessibility/AccessibilityObject.cpp (229111 => 229112)
--- trunk/Source/WebCore/accessibility/AccessibilityObject.cpp 2018-03-01 00:12:17 UTC (rev 229111)
+++ trunk/Source/WebCore/accessibility/AccessibilityObject.cpp 2018-03-01 00:30:08 UTC (rev 229112)
@@ -33,6 +33,7 @@
#include "AccessibilityRenderObject.h"
#include "AccessibilityScrollView.h"
#include "AccessibilityTable.h"
+#include "AccessibleSetValueEvent.h"
#include "DOMTokenList.h"
#include "Editing.h"
#include "Editor.h"
@@ -997,8 +998,7 @@
if (auto* cache = axObjectCache()) {
if (auto* pressObject = cache->getOrCreate(pressElement)) {
auto event = Event::create(eventNames().accessibleclickEvent, true, true);
- pressObject->dispatchAccessibilityEvent(event);
- if (event->defaultPrevented())
+ if (pressObject->dispatchAccessibilityEvent(event))
return true;
}
}
@@ -2153,7 +2153,7 @@
return nullAtom();
}
-void AccessibilityObject::dispatchAccessibilityEvent(Event& event)
+bool AccessibilityObject::dispatchAccessibilityEvent(Event& event)
{
Vector<Element*> eventPath;
for (auto* parentObject = this; parentObject; parentObject = parentObject->parentObject()) {
@@ -2162,8 +2162,19 @@
}
EventDispatcher::dispatchEvent(eventPath, event);
+
+ // return true if preventDefault() was called, so that we don't execute the fallback behavior.
+ return event.defaultPrevented();
}
+bool AccessibilityObject::dispatchAccessibleSetValueEvent(const String& value)
+{
+ if (!canSetValueAttribute())
+ return false;
+ auto event = AccessibleSetValueEvent::create(eventNames().accessiblesetvalueEvent, value);
+ return dispatchAccessibilityEvent(event);
+}
+
// Lacking concrete evidence of orientation, horizontal means width > height. vertical is height > width;
AccessibilityOrientation AccessibilityObject::orientation() const
{
Modified: trunk/Source/WebCore/accessibility/AccessibilityObject.h (229111 => 229112)
--- trunk/Source/WebCore/accessibility/AccessibilityObject.h 2018-03-01 00:12:17 UTC (rev 229111)
+++ trunk/Source/WebCore/accessibility/AccessibilityObject.h 2018-03-01 00:30:08 UTC (rev 229112)
@@ -895,7 +895,8 @@
const AtomicString& getAttribute(const QualifiedName&) const;
bool hasTagName(const QualifiedName&) const;
- void dispatchAccessibilityEvent(Event&);
+ bool dispatchAccessibilityEvent(Event&);
+ bool dispatchAccessibleSetValueEvent(const String&);
virtual VisiblePositionRange visiblePositionRange() const { return VisiblePositionRange(); }
virtual VisiblePositionRange visiblePositionRangeForLine(unsigned) const { return VisiblePositionRange(); }
Modified: trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp (229111 => 229112)
--- trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp 2018-03-01 00:12:17 UTC (rev 229111)
+++ trunk/Source/WebCore/accessibility/AccessibilityRenderObject.cpp 2018-03-01 00:30:08 UTC (rev 229112)
@@ -1757,6 +1757,9 @@
{
if (!m_renderer || !is<Element>(m_renderer->node()))
return;
+ if (dispatchAccessibleSetValueEvent(string))
+ return;
+
Element& element = downcast<Element>(*m_renderer->node());
RenderObject& renderer = *m_renderer;
Modified: trunk/Source/WebCore/accessibility/AccessibilityScrollbar.cpp (229111 => 229112)
--- trunk/Source/WebCore/accessibility/AccessibilityScrollbar.cpp 2018-03-01 00:12:17 UTC (rev 229111)
+++ trunk/Source/WebCore/accessibility/AccessibilityScrollbar.cpp 2018-03-01 00:30:08 UTC (rev 229112)
@@ -98,6 +98,8 @@
return;
float newValue = value * m_scrollbar->maximum();
+ if (dispatchAccessibleSetValueEvent(String::number(newValue)))
+ return;
m_scrollbar->scrollableArea().scrollToOffsetWithoutAnimation(m_scrollbar->orientation(), newValue);
}
Modified: trunk/Source/WebCore/accessibility/AccessibilitySlider.cpp (229111 => 229112)
--- trunk/Source/WebCore/accessibility/AccessibilitySlider.cpp 2018-03-01 00:12:17 UTC (rev 229111)
+++ trunk/Source/WebCore/accessibility/AccessibilitySlider.cpp 2018-03-01 00:30:08 UTC (rev 229112)
@@ -128,6 +128,9 @@
void AccessibilitySlider::setValue(const String& value)
{
+ if (dispatchAccessibleSetValueEvent(value))
+ return;
+
HTMLInputElement* input = inputElement();
if (input->value() == value)
Added: trunk/Source/WebCore/accessibility/AccessibleSetValueEvent.cpp (0 => 229112)
--- trunk/Source/WebCore/accessibility/AccessibleSetValueEvent.cpp (rev 0)
+++ trunk/Source/WebCore/accessibility/AccessibleSetValueEvent.cpp 2018-03-01 00:30:08 UTC (rev 229112)
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2018 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.
+ */
+
+#include "config.h"
+#include "AccessibleSetValueEvent.h"
+
+namespace WebCore {
+
+AccessibleSetValueEvent::AccessibleSetValueEvent(const AtomicString& type, const AtomicString& value)
+ : Event(type, true, true)
+ , m_value(value)
+{
+}
+
+AccessibleSetValueEvent::~AccessibleSetValueEvent() = default;
+
+}
Added: trunk/Source/WebCore/accessibility/AccessibleSetValueEvent.h (0 => 229112)
--- trunk/Source/WebCore/accessibility/AccessibleSetValueEvent.h (rev 0)
+++ trunk/Source/WebCore/accessibility/AccessibleSetValueEvent.h 2018-03-01 00:30:08 UTC (rev 229112)
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2018 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.
+ */
+
+#pragma once
+
+#include "Event.h"
+
+namespace WebCore {
+
+class AccessibleSetValueEvent : public Event {
+public:
+ static Ref<AccessibleSetValueEvent> create(const AtomicString& type, const AtomicString& value)
+ {
+ return adoptRef(*new AccessibleSetValueEvent(type, value));
+ }
+
+ virtual ~AccessibleSetValueEvent();
+
+ const AtomicString& value() const { return m_value; }
+
+protected:
+ AccessibleSetValueEvent(const AtomicString& type, const AtomicString& value);
+
+ // Event.
+ EventInterface eventInterface() const override { return AccessibleSetValueEventInterfaceType; }
+
+private:
+ const AtomicString m_value;
+};
+
+}
+
Added: trunk/Source/WebCore/accessibility/AccessibleSetValueEvent.idl (0 => 229112)
--- trunk/Source/WebCore/accessibility/AccessibleSetValueEvent.idl (rev 0)
+++ trunk/Source/WebCore/accessibility/AccessibleSetValueEvent.idl 2018-03-01 00:30:08 UTC (rev 229112)
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2018 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.
+ */
+
+[
+ EnabledAtRuntime=AccessibilityObjectModel,
+ NoInterfaceObject,
+] interface AccessibleSetValueEvent : Event {
+ readonly attribute DOMString value;
+};
Modified: trunk/Source/WebCore/dom/Element.idl (229111 => 229112)
--- trunk/Source/WebCore/dom/Element.idl 2018-03-01 00:12:17 UTC (rev 229111)
+++ trunk/Source/WebCore/dom/Element.idl 2018-03-01 00:30:08 UTC (rev 229112)
@@ -143,6 +143,7 @@
// Accessibility events.
[EnabledAtRuntime=AccessibilityObjectModel] attribute EventHandler onaccessibleclick;
+ [EnabledAtRuntime=AccessibilityObjectModel] attribute EventHandler onaccessiblesetvalue;
};
dictionary ShadowRootInit {
Modified: trunk/Source/WebCore/dom/EventNames.h (229111 => 229112)
--- trunk/Source/WebCore/dom/EventNames.h 2018-03-01 00:12:17 UTC (rev 229111)
+++ trunk/Source/WebCore/dom/EventNames.h 2018-03-01 00:30:08 UTC (rev 229112)
@@ -46,6 +46,7 @@
macro(DOMSubtreeModified) \
macro(abort) \
macro(accessibleclick) \
+ macro(accessiblesetvalue) \
macro(activate) \
macro(active) \
macro(addsourcebuffer) \
Modified: trunk/Source/WebCore/dom/EventNames.in (229111 => 229112)
--- trunk/Source/WebCore/dom/EventNames.in 2018-03-01 00:12:17 UTC (rev 229111)
+++ trunk/Source/WebCore/dom/EventNames.in 2018-03-01 00:30:08 UTC (rev 229112)
@@ -76,3 +76,4 @@
MediaEncryptedEvent conditional=ENCRYPTED_MEDIA
MediaKeyMessageEvent conditional=ENCRYPTED_MEDIA
VRDisplayEvent
+AccessibleSetValueEvent