Diff
Modified: trunk/LayoutTests/ChangeLog (230889 => 230890)
--- trunk/LayoutTests/ChangeLog 2018-04-21 06:42:26 UTC (rev 230889)
+++ trunk/LayoutTests/ChangeLog 2018-04-21 06:56:29 UTC (rev 230890)
@@ -1,3 +1,19 @@
+2018-04-20 Nan Wang <n_w...@apple.com>
+
+ AX: AOM does not work with DOM Level 1 events
+ https://bugs.webkit.org/show_bug.cgi?id=184847
+
+ Reviewed by Chris Fleizach.
+
+ * accessibility/ios-simulator/AOM-dismiss-event-expected.txt:
+ * accessibility/ios-simulator/AOM-dismiss-event.html:
+ * accessibility/mac/AOM-event-accessiblesetvalue-expected.txt:
+ * accessibility/mac/AOM-event-accessiblesetvalue.html:
+ * accessibility/mac/AOM-events-all-expected.txt:
+ * accessibility/mac/AOM-events-all.html:
+ * accessibility/mac/AOM-events-expected.txt:
+ * accessibility/mac/AOM-events.html:
+
2018-04-20 Chris Dumez <cdu...@apple.com>
Unreviewed, rebaseline more tests after r230864.
Modified: trunk/LayoutTests/accessibility/ios-simulator/AOM-dismiss-event-expected.txt (230889 => 230890)
--- trunk/LayoutTests/accessibility/ios-simulator/AOM-dismiss-event-expected.txt 2018-04-21 06:42:26 UTC (rev 230889)
+++ trunk/LayoutTests/accessibility/ios-simulator/AOM-dismiss-event-expected.txt 2018-04-21 06:56:29 UTC (rev 230890)
@@ -5,7 +5,8 @@
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-received accessibledismiss: [object Event]
+received DOM Level 1 accessibledismiss event
+received accessibledismiss event
PASS dispatched is true
PASS dispatched is false
PASS successfullyParsed is true
Modified: trunk/LayoutTests/accessibility/ios-simulator/AOM-dismiss-event.html (230889 => 230890)
--- trunk/LayoutTests/accessibility/ios-simulator/AOM-dismiss-event.html 2018-04-21 06:42:26 UTC (rev 230889)
+++ trunk/LayoutTests/accessibility/ios-simulator/AOM-dismiss-event.html 2018-04-21 06:56:29 UTC (rev 230890)
@@ -4,7 +4,7 @@
<script src=""
<div id="content">
-<div id="event" role="group" tabindex=0>
+<div id="event" role="group" tabindex=0 _onaccessibledismiss_="eventCallback(true)">
test1
</div>
@@ -21,15 +21,22 @@
description("This tests the accessibledismiss event on iOS.");
+ function eventCallback(domLevel1) {
+ debug("received " + (domLevel1 ? "DOM Level 1 " : "") + "accessibledismiss event");
+ if (domLevel1)
+ document.getElementById("event").removeAttribute("onaccessibledismiss");
+ }
+
if (window.accessibilityController) {
- jsTestIsAsync = true;
var node = document.getElementById("event");
var axNode = accessibilityController.accessibleElementById("event");
+ // DOM Level 1 event
+ axNode.dismiss();
+ // DOM Level 2 event
node._onaccessibledismiss_ = function(event) {
- debug("received accessibledismiss: " + event);
- finishJSTest();
- };
+ eventCallback();
+ };
var dispatched = axNode.dismiss();
shouldBeTrue("dispatched");
Modified: trunk/LayoutTests/accessibility/mac/AOM-event-accessiblesetvalue-expected.txt (230889 => 230890)
--- trunk/LayoutTests/accessibility/mac/AOM-event-accessiblesetvalue-expected.txt 2018-04-21 06:42:26 UTC (rev 230889)
+++ trunk/LayoutTests/accessibility/mac/AOM-event-accessiblesetvalue-expected.txt 2018-04-21 06:56:29 UTC (rev 230890)
@@ -17,6 +17,9 @@
Test Slider.
slider accessible set value to: 70
+Test DOM Level 1 event.
+scroller accessible set value to: 70
+
Test Scrollbar.
scroller accessible set value to: 60
Modified: trunk/LayoutTests/accessibility/mac/AOM-event-accessiblesetvalue.html (230889 => 230890)
--- trunk/LayoutTests/accessibility/mac/AOM-event-accessiblesetvalue.html 2018-04-21 06:42:26 UTC (rev 230889)
+++ trunk/LayoutTests/accessibility/mac/AOM-event-accessiblesetvalue.html 2018-04-21 06:56:29 UTC (rev 230890)
@@ -8,7 +8,7 @@
<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 id="scroller" aria-valuenow="55" role="scrollbar" _onaccessiblesetvalue_="domLevel1Callback(event)">scrollbar</div>
</div>
@@ -74,10 +74,22 @@
axNode = accessibilityController.accessibleElementById("slider");
node._onaccessiblesetvalue_ = function(event) {
debug("slider accessible set value to: " + event.value);
- testScrollbar();
+ testDOMLevel1Event();
};
axNode.setValue("70");
}
+
+ function domLevel1Callback(event) {
+ debug("scroller accessible set value to: " + event.value);
+ document.getElementById("scroller").removeAttribute("onaccessiblesetvalue");
+ testScrollbar();
+ }
+
+ function testDOMLevel1Event() {
+ debug("\nTest DOM Level 1 event.");
+ axNode = accessibilityController.accessibleElementById("scroller");
+ axNode.setValue("70");
+ }
function testScrollbar() {
debug("\nTest Scrollbar.");
Modified: trunk/LayoutTests/accessibility/mac/AOM-events-all-expected.txt (230889 => 230890)
--- trunk/LayoutTests/accessibility/mac/AOM-events-all-expected.txt 2018-04-21 06:42:26 UTC (rev 230889)
+++ trunk/LayoutTests/accessibility/mac/AOM-events-all-expected.txt 2018-04-21 06:56:29 UTC (rev 230890)
@@ -8,19 +8,27 @@
Test accessibleincrement and accessibledecrement
+received DOM Level 1 accessibleincrement event
+received DOM Level 1 accessibledecrement event
received accessibleincrement event
received accessibledecrement event
+Test onaccessiblefocus attribute
+received DOM Level 1 accessiblefocus event
+
Test accessiblefocus
received accessiblefocus event
Test accessiblescrollintoview
+received DOM Level 1 accessiblescrollintoview event
received accessiblescrollintoview event
Test accessiblecontextmenu
+received DOM Level 1 accessiblecontextmenu event
received accessiblecontextmenu event
Test accessibleselect
+received DOM Level 1 accessibleselect event
received accessibleselect event
PASS successfullyParsed is true
Modified: trunk/LayoutTests/accessibility/mac/AOM-events-all.html (230889 => 230890)
--- trunk/LayoutTests/accessibility/mac/AOM-events-all.html 2018-04-21 06:42:26 UTC (rev 230889)
+++ trunk/LayoutTests/accessibility/mac/AOM-events-all.html 2018-04-21 06:56:29 UTC (rev 230890)
@@ -4,17 +4,17 @@
<script src=""
<div id="content">
-<input type="range" min="0" max="100" value="25" step="25" id="slider"/>
-<input type="text" id="input">
-<button id="button">button</button>
+<input type="range" min="0" max="100" value="25" step="25" id="slider" _onaccessibleincrement_="incrementEventCallback(true)" _onaccessibledecrement_="decrementEventCallback(true)"/>
+<input type="text" id="input" _onaccessiblefocus_="focusEventCallback(true)">
+<button id="button" _onaccessiblescrollintoview_="scrollIntoViewEventCallback(true)">button</button>
-<div id="combo" tabindex=0 role="combobox" aria-expanded="false" aria-label="Test">
+<div id="combo" tabindex=0 role="combobox" aria-expanded="false" aria-label="Test" _onaccessiblecontextmenu_="contextMenuEventCallback(true)">
<div role="listbox">
<div role="option">option 1</div>
</div></div>
<select id="group" multiple="multiple">
- <option id="option">Option 1</option>
+ <option id="option" _onaccessibleselect_="selectEventCallback(true)">Option 1</option>
<option>Option 2</option>
</select>
@@ -34,31 +34,81 @@
var axNode;
testIncrementDecrement();
-
+
+ function incrementEventCallback(domLevel1) {
+ debug("received " + (domLevel1 ? "DOM Level 1 " : "") + "accessibleincrement event");
+ if (domLevel1)
+ node.removeAttribute("onaccessibleincrement");
+ }
+
+ function decrementEventCallback(domLevel1) {
+ debug("received " + (domLevel1 ? "DOM Level 1 " : "") + "accessibledecrement event");
+ if (domLevel1)
+ node.removeAttribute("onaccessibledecrement");
+ }
+
+ function focusEventCallback(domLevel1) {
+ debug("received " + (domLevel1 ? "DOM Level 1 " : "") + "accessiblefocus event");
+ if (domLevel1) {
+ node.removeAttribute("onaccessiblefocus");
+ testFocus();
+ }
+ }
+
+ function scrollIntoViewEventCallback(domLevel1) {
+ debug("received " + (domLevel1 ? "DOM Level 1 " : "") + "accessiblescrollintoview event");
+ if (domLevel1)
+ node.removeAttribute("onaccessiblescrollintoview");
+ }
+
+ function contextMenuEventCallback(domLevel1) {
+ debug("received " + (domLevel1 ? "DOM Level 1 " : "") + "accessiblecontextmenu event");
+ if (domLevel1)
+ node.removeAttribute("onaccessiblecontextmenu");
+ }
+
+ function selectEventCallback(domLevel1) {
+ debug("received " + (domLevel1 ? "DOM Level 1 " : "") + "accessibleselect event");
+ if (domLevel1)
+ node.removeAttribute("onaccessibleselect");
+ }
+
function testIncrementDecrement() {
debug("\nTest accessibleincrement and accessibledecrement");
node = document.getElementById("slider");
axNode = accessibilityController.accessibleElementById("slider");
-
+ // DOM Level 1 events
+ axNode.increment();
+ axNode.decrement();
+ // DOM Level 2 events
node._onaccessibleincrement_ = function() {
- debug("received accessibleincrement event");
+ incrementEventCallback();
};
node._onaccessibledecrement_ = function() {
- debug("received accessibledecrement event");
+ decrementEventCallback();
};
axNode.increment();
axNode.decrement();
- testFocus();
+ testFocusDOMLevel1();
}
+ function testFocusDOMLevel1() {
+ // takeFocus() is async so that this deserves a seperate test
+ debug("\nTest onaccessiblefocus attribute");
+ node = document.getElementById("input");
+ axNode = accessibilityController.accessibleElementById("input");
+ axNode.takeFocus();
+ }
+
function testFocus() {
debug("\nTest accessiblefocus");
+ // DOM Level 2 event
node = document.getElementById("input");
axNode = accessibilityController.accessibleElementById("input");
node._onaccessiblefocus_ = function() {
- debug("received accessiblefocus event");
+ focusEventCallback();
testScrollIntoView();
};
axNode.takeFocus();
@@ -68,9 +118,11 @@
debug("\nTest accessiblescrollintoview");
node = document.getElementById("button");
axNode = accessibilityController.accessibleElementById("button");
-
+ // DOM Level 1 event
+ axNode.scrollToMakeVisible();
+ // DOM Level 2 event
node._onaccessiblescrollintoview_ = function() {
- debug("received accessiblescrollintoview event");
+ scrollIntoViewEventCallback();
testShowContextMenu();
};
axNode.scrollToMakeVisible();
@@ -80,9 +132,11 @@
debug("\nTest accessiblecontextmenu");
node = document.getElementById("combo");
axNode = accessibilityController.accessibleElementById("combo");
-
+ // DOM Level 1 event
+ axNode.showMenu();
+ // DOM Level 2 event
node._onaccessiblecontextmenu_ = function() {
- debug("received accessiblecontextmenu event");
+ contextMenuEventCallback();
testSelect();
};
axNode.showMenu();
@@ -92,8 +146,11 @@
debug("\nTest accessibleselect");
node = document.getElementById("option");
axNode = accessibilityController.accessibleElementById("group");
+ // DOM Level 1 event
+ axNode.setSelectedChildAtIndex(0);
+ // DOM Level 2 event
node._onaccessibleselect_ = function() {
- debug("received accessibleselect event");
+ selectEventCallback();
finishJSTest();
}
axNode.setSelectedChildAtIndex(0);
Modified: trunk/LayoutTests/accessibility/mac/AOM-events-expected.txt (230889 => 230890)
--- trunk/LayoutTests/accessibility/mac/AOM-events-expected.txt 2018-04-21 06:42:26 UTC (rev 230889)
+++ trunk/LayoutTests/accessibility/mac/AOM-events-expected.txt 2018-04-21 06:56:29 UTC (rev 230890)
@@ -9,6 +9,7 @@
onaccessibleclick support
+PASS receivedDOMLevel1Event is true
PASS receivedAXEvent is true
PASS receivedFallbackEvent is true
Modified: trunk/LayoutTests/accessibility/mac/AOM-events.html (230889 => 230890)
--- trunk/LayoutTests/accessibility/mac/AOM-events.html 2018-04-21 06:42:26 UTC (rev 230889)
+++ trunk/LayoutTests/accessibility/mac/AOM-events.html 2018-04-21 06:56:29 UTC (rev 230890)
@@ -6,7 +6,7 @@
</head>
<body>
-<button id="button1">Click</button>
+<button id="button1" _onaccessibleclick_="accessibleclickCallback(true)">Click</button>
<button id="button2">Click</button>
<p id="p1">
<button id="button3">Click</button>
@@ -26,6 +26,7 @@
if (window.accessibilityController) {
var node;
var axNode;
+ var receivedDOMLevel1Event;
var receivedAXEvent;
var receivedFallbackEvent;
@@ -35,15 +36,35 @@
testEventCapturingAndBubbling();
}
+ function accessibleclickCallback(domLevel1) {
+ if (domLevel1)
+ receivedDOMLevel1Event = true;
+ else
+ receivedAXEvent = true;
+ }
+
+ function testAccessibleClickDOMLevel1() {
+ debug("\nonaccessibleclick attribute support");
+ axNode = accessibilityController.accessibleElementById("button0");
+ receivedAXEvent = false;
+ axNode.syncPress();
+ shouldBeTrue("receivedAXEvent");
+ }
+
function testAccessibleClick() {
debug("\nonaccessibleclick support");
node = document.getElementById("button1");
axNode = accessibilityController.accessibleElementById("button1");
+ // DOM Level 1 event
+ receiveDOMLevel1Event = false;
+ axNode.syncPress();
+ shouldBeTrue("receivedDOMLevel1Event");
+ // DOM Level 2 event
receivedAXEvent = false;
receivedFallbackEvent = false;
node._onaccessibleclick_ = function() {
- receivedAXEvent = true;
+ accessibleclickCallback();
};
node._onclick_ = function() {
receivedFallbackEvent = true;
Modified: trunk/Source/WebCore/ChangeLog (230889 => 230890)
--- trunk/Source/WebCore/ChangeLog 2018-04-21 06:42:26 UTC (rev 230889)
+++ trunk/Source/WebCore/ChangeLog 2018-04-21 06:56:29 UTC (rev 230890)
@@ -1,3 +1,18 @@
+2018-04-20 Nan Wang <n_w...@apple.com>
+
+ AX: AOM does not work with DOM Level 1 events
+ https://bugs.webkit.org/show_bug.cgi?id=184847
+
+ Reviewed by Chris Fleizach.
+
+ Added the accessibility events to the HTML attribute names.
+
+ Test cases are added to the existing layout tests.
+
+ * html/HTMLAttributeNames.in:
+ * html/HTMLElement.cpp:
+ (WebCore::HTMLElement::createEventHandlerNameMap):
+
2018-04-20 Carlos Garcia Campos <cgar...@igalia.com>
REGRESSION(r228088): [SOUP] Check TLS errors for WebSockets on GTlsConnection::accept-certificate
Modified: trunk/Source/WebCore/html/HTMLAttributeNames.in (230889 => 230890)
--- trunk/Source/WebCore/html/HTMLAttributeNames.in 2018-04-21 06:42:26 UTC (rev 230889)
+++ trunk/Source/WebCore/html/HTMLAttributeNames.in 2018-04-21 06:56:29 UTC (rev 230890)
@@ -190,6 +190,15 @@
nowrap
object
onabort
+onaccessiblecontextmenu
+onaccessibleclick
+onaccessibledecrement
+onaccessibledismiss
+onaccessiblefocus
+onaccessibleincrement
+onaccessiblescrollintoview
+onaccessiblesetvalue
+onaccessibleselect
onanimationstart
onanimationiteration
onanimationend
Modified: trunk/Source/WebCore/html/HTMLElement.cpp (230889 => 230890)
--- trunk/Source/WebCore/html/HTMLElement.cpp 2018-04-21 06:42:26 UTC (rev 230889)
+++ trunk/Source/WebCore/html/HTMLElement.cpp 2018-04-21 06:56:29 UTC (rev 230890)
@@ -226,6 +226,15 @@
static const QualifiedName* const table[] = {
&onabortAttr.get(),
+ &onaccessiblecontextmenuAttr.get(),
+ &onaccessibleclickAttr.get(),
+ &onaccessibledecrementAttr.get(),
+ &onaccessibledismissAttr.get(),
+ &onaccessiblefocusAttr.get(),
+ &onaccessibleincrementAttr.get(),
+ &onaccessiblescrollintoviewAttr.get(),
+ &onaccessiblesetvalueAttr.get(),
+ &onaccessibleselectAttr.get(),
&onanimationendAttr.get(),
&onanimationiterationAttr.get(),
&onanimationstartAttr.get(),