<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[170008] trunk</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/170008">170008</a></dd>
<dt>Author</dt> <dd>mario.prada@samsung.com</dd>
<dt>Date</dt> <dd>2014-06-16 08:01:06 -0700 (Mon, 16 Jun 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>[ATK] Missing 'selection-changed' signal when navigating a combo box with keyboard
https://bugs.webkit.org/show_bug.cgi?id=133512
Reviewed by Chris Fleizach.
Source/WebCore:
Make sure that AccessibilityMenuList objects update their active
option when it changes, which will send a platform-dependent
accessibility-related notification when needed.
Test: accessibility/combo-box-collapsed-selection-changed.html
* rendering/RenderMenuList.cpp:
(RenderMenuList::didUpdateActiveOption): Keep the out-of-bounds
check for the index passed but don't avoid updating the option for
the associated AccessibilityMenuList object if the selected list
item does not have a renderer, because that could be the case for
cases where the popup (and its elements) would be rendered in the
UI Process (e.g. GTK+ port uses GtkMenu and GtkMenuItem for that).
* accessibility/AccessibilityMenuList.cpp:
(WebCore::AccessibilityMenuList::didUpdateActiveOption): Ensure
that the AccessibilityMenuListPopup object for a given menu list
has accessibility children before updating its active option.
Tools:
Added support for connecting to AtkSelection's 'selection-changed'
signal, and print it out as AXSelectedChildrenChanged in the tests.
Also removed some dead code, that became useless after <a href="http://trac.webkit.org/projects/webkit/changeset/169487">r169487</a>.
* WebKitTestRunner/InjectedBundle/atk/AccessibilityNotificationHandlerAtk.cpp:
(WTR::AccessibilityNotificationHandler::connectAccessibilityCallbacks): Updated.
LayoutTests:
Re-implemented test for combo boxes in terms of addNotificationListener()
instead of using the (already deprecated) logAccessibilityEvents method,
and made the test cross platform (as the fix is not platform specific).
* accessibility/combo-box-collapsed-selection-changed.html:
Implemented based on the former gtk-only test, and made it cross-platform.
* accessibility/combo-box-collapsed-selection-changed-expected.txt: New.
* platform/gtk/accessibility/combo-box-collapsed-selection-changed.html: Removed.
* platform/gtk/accessibility/combo-box-collapsed-selection-changed-expected.txt: Removed.
Updated expectation for test that checks that a notification is
sent when navigating through a multiselection list box, now that
we are actually printing such a notification.
* accessibility/multiselect-list-reports-active-option-expected.txt: Updated.
Removed two expected failures from TestExpectations for tests that
are now passing, one for the combo box test mentioned above and
another one for a test that is passing as well now, after applying
this fix: accessibility/menu-list-sends-change-notification.html
* platform/gtk/TestExpectations: Removed two 'failure' expectations.
* platform/mac/TestExpectations: Skip accessiblity test timing out, probably because
those kind of notifications while navigating a combo box are not needed in the Mac.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsaccessibilitymultiselectlistreportsactiveoptionexpectedtxt">trunk/LayoutTests/accessibility/multiselect-list-reports-active-option-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformgtkTestExpectations">trunk/LayoutTests/platform/gtk/TestExpectations</a></li>
<li><a href="#trunkLayoutTestsplatformmacTestExpectations">trunk/LayoutTests/platform/mac/TestExpectations</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAccessibilityMenuListcpp">trunk/Source/WebCore/accessibility/AccessibilityMenuList.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderMenuListcpp">trunk/Source/WebCore/rendering/RenderMenuList.cpp</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsWebKitTestRunnerInjectedBundleatkAccessibilityNotificationHandlerAtkcpp">trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityNotificationHandlerAtk.cpp</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsaccessibilitycomboboxcollapsedselectionchangedexpectedtxt">trunk/LayoutTests/accessibility/combo-box-collapsed-selection-changed-expected.txt</a></li>
<li><a href="#trunkLayoutTestsaccessibilitycomboboxcollapsedselectionchangedhtml">trunk/LayoutTests/accessibility/combo-box-collapsed-selection-changed.html</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsplatformgtkaccessibilitycomboboxcollapsedselectionchangedexpectedtxt">trunk/LayoutTests/platform/gtk/accessibility/combo-box-collapsed-selection-changed-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformgtkaccessibilitycomboboxcollapsedselectionchangedhtml">trunk/LayoutTests/platform/gtk/accessibility/combo-box-collapsed-selection-changed.html</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (170007 => 170008)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-06-16 12:17:10 UTC (rev 170007)
+++ trunk/LayoutTests/ChangeLog        2014-06-16 15:01:06 UTC (rev 170008)
</span><span class="lines">@@ -1,3 +1,36 @@
</span><ins>+2014-06-16 Mario Sanchez Prada <mario.prada@samsung.com>
+
+ [ATK] Missing 'selection-changed' signal when navigating a combo box with keyboard
+ https://bugs.webkit.org/show_bug.cgi?id=133512
+
+ Reviewed by Chris Fleizach.
+
+ Re-implemented test for combo boxes in terms of addNotificationListener()
+ instead of using the (already deprecated) logAccessibilityEvents method,
+ and made the test cross platform (as the fix is not platform specific).
+
+ * accessibility/combo-box-collapsed-selection-changed.html:
+ Implemented based on the former gtk-only test, and made it cross-platform.
+ * accessibility/combo-box-collapsed-selection-changed-expected.txt: New.
+ * platform/gtk/accessibility/combo-box-collapsed-selection-changed.html: Removed.
+ * platform/gtk/accessibility/combo-box-collapsed-selection-changed-expected.txt: Removed.
+
+ Updated expectation for test that checks that a notification is
+ sent when navigating through a multiselection list box, now that
+ we are actually printing such a notification.
+
+ * accessibility/multiselect-list-reports-active-option-expected.txt: Updated.
+
+ Removed two expected failures from TestExpectations for tests that
+ are now passing, one for the combo box test mentioned above and
+ another one for a test that is passing as well now, after applying
+ this fix: accessibility/menu-list-sends-change-notification.html
+
+ * platform/gtk/TestExpectations: Removed two 'failure' expectations.
+
+ * platform/mac/TestExpectations: Skip accessiblity test timing out, probably because
+ those kind of notifications while navigating a combo box are not needed in the Mac.
+
</ins><span class="cx"> 2014-06-16 Frédéric Wang <fred.wang@free.fr>
</span><span class="cx">
</span><span class="cx"> Draw radicals with glyphs for better rendering
</span></span></pre></div>
<a id="trunkLayoutTestsaccessibilitycomboboxcollapsedselectionchangedexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/accessibility/combo-box-collapsed-selection-changed-expected.txt (0 => 170008)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/accessibility/combo-box-collapsed-selection-changed-expected.txt         (rev 0)
+++ trunk/LayoutTests/accessibility/combo-box-collapsed-selection-changed-expected.txt        2014-06-16 15:01:06 UTC (rev 170008)
</span><span class="lines">@@ -0,0 +1,11 @@
</span><ins>+
+This tests that a combo box notifies when the selected child has changed while arrowing through the options of a combobox while collapsed.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS selectionChangedNotifications is 4
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsaccessibilitycomboboxcollapsedselectionchangedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/accessibility/combo-box-collapsed-selection-changed.html (0 => 170008)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/accessibility/combo-box-collapsed-selection-changed.html         (rev 0)
+++ trunk/LayoutTests/accessibility/combo-box-collapsed-selection-changed.html        2014-06-16 15:01:06 UTC (rev 170008)
</span><span class="lines">@@ -0,0 +1,57 @@
</span><ins>+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src="../resources/js-test-pre.js"></script>
+<script>
+
+</script>
+</head>
+<body>
+<form>
+<select id="combo">
+<option selected value='foo'>foo</option>
+<option value='bar'>bar</option>
+<option value='baz'>baz</option>
+</select>
+</form>
+
+<p id="description"></p>
+<div id="console"></div>
+
+<script>
+window.jsTestIsAsync = true;
+
+description("This tests that a combo box notifies when the selected child has changed while arrowing through the options of a combobox while collapsed.");
+
+var selectionChangedNotifications = 0;
+
+if (window.testRunner && window.accessibilityController) {
+ testRunner.dumpAsText();
+
+ // Focus in the combobox and move around the options. The signal
+ // 'state-change:selected' should be emitted with every change.
+ document.getElementById("combo").focus();
+
+ axCombo = accessibilityController.focusedElement;
+ axCombo.addNotificationListener(function (notification) {
+ if (notification == "AXSelectedChildrenChanged")
+ selectionChangedNotifications++;
+ });
+
+ eventSender.keyDown("downArrow");
+ eventSender.keyDown("downArrow");
+ eventSender.keyDown("upArrow");
+ eventSender.keyDown("upArrow");
+
+ window.setTimeout(function() {
+ if (window.accessibilityController)
+ axCombo.removeNotificationListener();
+
+ shouldBe("selectionChangedNotifications", "4");
+ finishJSTest();
+ }, 0);
+}
+</script>
+<script src="../resources/js-test-post.js"></script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsaccessibilitymultiselectlistreportsactiveoptionexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/accessibility/multiselect-list-reports-active-option-expected.txt (170007 => 170008)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/accessibility/multiselect-list-reports-active-option-expected.txt        2014-06-16 12:17:10 UTC (rev 170007)
+++ trunk/LayoutTests/accessibility/multiselect-list-reports-active-option-expected.txt        2014-06-16 15:01:06 UTC (rev 170008)
</span><span class="lines">@@ -22,6 +22,8 @@
</span><span class="cx"> PASS accessibleTwo.isSelectedOptionActive is false
</span><span class="cx"> PASS accessibleThree.isSelected is true
</span><span class="cx"> PASS accessibleThree.isSelectedOptionActive is true
</span><ins>+List notification: AXSelectedChildrenChanged
+List notification: AXSelectedChildrenChanged
</ins><span class="cx">
</span><span class="cx"> TEST COMPLETE
</span><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestsplatformgtkTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/gtk/TestExpectations (170007 => 170008)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/gtk/TestExpectations        2014-06-16 12:17:10 UTC (rev 170007)
+++ trunk/LayoutTests/platform/gtk/TestExpectations        2014-06-16 15:01:06 UTC (rev 170008)
</span><span class="lines">@@ -1681,8 +1681,6 @@
</span><span class="cx"> webkit.org/b/113772 http/tests/w3c/webperf/submission/Google/resource-timing/html/test_resource_iframe_self_navigation.html [ Failure ]
</span><span class="cx"> webkit.org/b/113772 http/tests/w3c/webperf/submission/Google/resource-timing/html/test_resource_cached.html [ Failure ]
</span><span class="cx">
</span><del>-webkit.org/b/114259 platform/gtk/accessibility/combo-box-collapsed-selection-changed.html [ Failure ]
-
</del><span class="cx"> webkit.org/b/115025 fast/events/constructors/mouse-event-constructor.html [ Failure ]
</span><span class="cx"> webkit.org/b/115025 fast/events/constructors/wheel-event-constructor.html [ Failure ]
</span><span class="cx">
</span><span class="lines">@@ -1786,8 +1784,6 @@
</span><span class="cx">
</span><span class="cx"> webkit.org/b/125406 fast/regions/relative-in-absolute-borders-overflow.html [ ImageOnlyFailure ]
</span><span class="cx">
</span><del>-webkit.org/b/126521 accessibility/menu-list-sends-change-notification.html [ Failure ]
-
</del><span class="cx"> webkit.org/b/126619 http/tests/media/video-auth.html [ Failure ]
</span><span class="cx">
</span><span class="cx"> # Subpixel rendering: borders are reporting float values.
</span></span></pre></div>
<a id="trunkLayoutTestsplatformgtkaccessibilitycomboboxcollapsedselectionchangedexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/platform/gtk/accessibility/combo-box-collapsed-selection-changed-expected.txt (170007 => 170008)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/gtk/accessibility/combo-box-collapsed-selection-changed-expected.txt        2014-06-16 12:17:10 UTC (rev 170007)
+++ trunk/LayoutTests/platform/gtk/accessibility/combo-box-collapsed-selection-changed-expected.txt        2014-06-16 15:01:06 UTC (rev 170008)
</span><span class="lines">@@ -1,36 +0,0 @@
</span><del>-Accessibility object emitted "focus-event = 1" / Name: "bar" / Role: 11
-Accessibility object emitted "state-change:focused = 1" / Name: "bar" / Role: 11
-Accessibility object emitted "state-change:selected = 1" / Name: "bar" / Role: 34
-Accessibility object emitted "focus-event = 1" / Name: "bar" / Role: 34
-Accessibility object emitted "state-change:focused = 1" / Name: "bar" / Role: 34
-Accessibility object emitted "focus-event = 1" / Name: "baz" / Role: 11
-Accessibility object emitted "state-change:focused = 1" / Name: "baz" / Role: 11
-Accessibility object emitted "focus-event = 0" / Name: "bar" / Role: 34
-Accessibility object emitted "state-change:focused = 0" / Name: "bar" / Role: 34
-Accessibility object emitted "state-change:selected = 1" / Name: "baz" / Role: 34
-Accessibility object emitted "focus-event = 1" / Name: "baz" / Role: 34
-Accessibility object emitted "state-change:focused = 1" / Name: "baz" / Role: 34
-Accessibility object emitted "focus-event = 1" / Name: "bar" / Role: 11
-Accessibility object emitted "state-change:focused = 1" / Name: "bar" / Role: 11
-Accessibility object emitted "focus-event = 0" / Name: "baz" / Role: 34
-Accessibility object emitted "state-change:focused = 0" / Name: "baz" / Role: 34
-Accessibility object emitted "state-change:selected = 1" / Name: "bar" / Role: 34
-Accessibility object emitted "focus-event = 1" / Name: "bar" / Role: 34
-Accessibility object emitted "state-change:focused = 1" / Name: "bar" / Role: 34
-Accessibility object emitted "focus-event = 1" / Name: "foo" / Role: 11
-Accessibility object emitted "state-change:focused = 1" / Name: "foo" / Role: 11
-Accessibility object emitted "focus-event = 0" / Name: "bar" / Role: 34
-Accessibility object emitted "state-change:focused = 0" / Name: "bar" / Role: 34
-Accessibility object emitted "state-change:selected = 1" / Name: "foo" / Role: 34
-Accessibility object emitted "focus-event = 1" / Name: "foo" / Role: 34
-Accessibility object emitted "state-change:focused = 1" / Name: "foo" / Role: 34
-
-This tests that the 'state-changed:selected' signal is emitted when arrowing through the options of a combobox while collapsed.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
</del></span></pre></div>
<a id="trunkLayoutTestsplatformgtkaccessibilitycomboboxcollapsedselectionchangedhtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/platform/gtk/accessibility/combo-box-collapsed-selection-changed.html (170007 => 170008)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/gtk/accessibility/combo-box-collapsed-selection-changed.html        2014-06-16 12:17:10 UTC (rev 170007)
+++ trunk/LayoutTests/platform/gtk/accessibility/combo-box-collapsed-selection-changed.html        2014-06-16 15:01:06 UTC (rev 170008)
</span><span class="lines">@@ -1,42 +0,0 @@
</span><del>-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<html>
-<head>
-<script src="../../../resources/js-test-pre.js"></script>
-<script>
-
-function runTest() {
- description("This tests that the 'state-changed:selected' signal is emitted when arrowing through the options of a combobox while collapsed.");
-
- if (window.testRunner) {
- testRunner.dumpAsText();
- }
-
- if (window.accessibilityController) {
- accessibilityController.logAccessibilityEvents();
- }
-
- // Focus in the combobox and move around the options. The signal
- // 'state-change:selected' should be emitted with every change.
- document.getElementById("combo").focus();
- eventSender.keyDown("downArrow");
- eventSender.keyDown("downArrow");
- eventSender.keyDown("upArrow");
- eventSender.keyDown("upArrow");
-}
-</script>
-</head>
-<body onload="runTest();">
-<form>
-<select id="combo">
-<option selected value='foo'>foo</option>
-<option value='bar'>bar</option>
-<option value='baz'>baz</option>
-</select>
-</form>
-<p id="description"></p>
-<div id="console"></div>
-<script>
-</script>
-<script src="../../../resources/js-test-post.js"></script>
-</body>
-</html>
</del></span></pre></div>
<a id="trunkLayoutTestsplatformmacTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/TestExpectations (170007 => 170008)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/TestExpectations        2014-06-16 12:17:10 UTC (rev 170007)
+++ trunk/LayoutTests/platform/mac/TestExpectations        2014-06-16 15:01:06 UTC (rev 170008)
</span><span class="lines">@@ -41,6 +41,7 @@
</span><span class="cx">
</span><span class="cx"> # Accessibility tests for notifications that don't exist or aren't needed on Mac OS X.
</span><span class="cx"> accessibility/aria-checkbox-sends-notification.html
</span><ins>+accessibility/combo-box-collapsed-selection-changed.html
</ins><span class="cx"> accessibility/children-changed-sends-notification.html
</span><span class="cx"> accessibility/menu-list-sends-change-notification.html
</span><span class="cx"> accessibility/multiselect-list-reports-active-option.html
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (170007 => 170008)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-06-16 12:17:10 UTC (rev 170007)
+++ trunk/Source/WebCore/ChangeLog        2014-06-16 15:01:06 UTC (rev 170008)
</span><span class="lines">@@ -1,3 +1,29 @@
</span><ins>+2014-06-16 Mario Sanchez Prada <mario.prada@samsung.com>
+
+ [ATK] Missing 'selection-changed' signal when navigating a combo box with keyboard
+ https://bugs.webkit.org/show_bug.cgi?id=133512
+
+ Reviewed by Chris Fleizach.
+
+ Make sure that AccessibilityMenuList objects update their active
+ option when it changes, which will send a platform-dependent
+ accessibility-related notification when needed.
+
+ Test: accessibility/combo-box-collapsed-selection-changed.html
+
+ * rendering/RenderMenuList.cpp:
+ (RenderMenuList::didUpdateActiveOption): Keep the out-of-bounds
+ check for the index passed but don't avoid updating the option for
+ the associated AccessibilityMenuList object if the selected list
+ item does not have a renderer, because that could be the case for
+ cases where the popup (and its elements) would be rendered in the
+ UI Process (e.g. GTK+ port uses GtkMenu and GtkMenuItem for that).
+
+ * accessibility/AccessibilityMenuList.cpp:
+ (WebCore::AccessibilityMenuList::didUpdateActiveOption): Ensure
+ that the AccessibilityMenuListPopup object for a given menu list
+ has accessibility children before updating its active option.
+
</ins><span class="cx"> 2014-06-16 Commit Queue <commit-queue@webkit.org>
</span><span class="cx">
</span><span class="cx"> Unreviewed, rolling out r170003.
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityMenuListcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityMenuList.cpp (170007 => 170008)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityMenuList.cpp        2014-06-16 12:17:10 UTC (rev 170007)
+++ trunk/Source/WebCore/accessibility/AccessibilityMenuList.cpp        2014-06-16 15:01:06 UTC (rev 170008)
</span><span class="lines">@@ -113,7 +113,14 @@
</span><span class="cx"> ASSERT(childObjects.size() == 1);
</span><span class="cx"> ASSERT(childObjects[0]->isMenuListPopup());
</span><span class="cx">
</span><del>- if (childObjects[0]->isMenuListPopup()) {
</del><ins>+ // We might be calling this method in situations where the renderers for list items
+ // associated to the menu list have not been created (e.g. they might be rendered
+ // in the UI process, as it's the case in the GTK+ port, which uses GtkMenuItem).
+ // So, we need to make sure that the accessibility popup object has some children
+ // before asking it to update its active option, or it will read invalid memory.
+ // You can reproduce the issue in the GTK+ port by removing this check and running
+ // accessibility/insert-selected-option-into-select-causes-crash.html (will crash).
+ if (childObjects[0]->isMenuListPopup() && childObjects[0]->children().size()) {
</ins><span class="cx"> if (AccessibilityMenuListPopup* popup = toAccessibilityMenuListPopup(childObjects[0].get()))
</span><span class="cx"> popup->didUpdateActiveOption(optionIndex);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderMenuListcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderMenuList.cpp (170007 => 170008)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderMenuList.cpp        2014-06-16 12:17:10 UTC (rev 170007)
+++ trunk/Source/WebCore/rendering/RenderMenuList.cpp        2014-06-16 15:01:06 UTC (rev 170008)
</span><span class="lines">@@ -436,10 +436,8 @@
</span><span class="cx"> if (listIndex < 0 || listIndex >= static_cast<int>(selectElement().listItems().size()))
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- HTMLElement* listItem = selectElement().listItems()[listIndex];
- ASSERT(listItem);
- if (listItem->renderer()) {
- if (AccessibilityMenuList* menuList = toAccessibilityMenuList(document().axObjectCache()->get(this)))
</del><ins>+ if (AXObjectCache* cache = document().existingAXObjectCache()) {
+ if (AccessibilityMenuList* menuList = toAccessibilityMenuList(cache->get(this)))
</ins><span class="cx"> menuList->didUpdateActiveOption(optionIndex);
</span><span class="cx"> }
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (170007 => 170008)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2014-06-16 12:17:10 UTC (rev 170007)
+++ trunk/Tools/ChangeLog        2014-06-16 15:01:06 UTC (rev 170008)
</span><span class="lines">@@ -1,3 +1,18 @@
</span><ins>+2014-06-16 Mario Sanchez Prada <mario.prada@samsung.com>
+
+ [ATK] Missing 'selection-changed' signal when navigating a combo box with keyboard
+ https://bugs.webkit.org/show_bug.cgi?id=133512
+
+ Reviewed by Chris Fleizach.
+
+ Added support for connecting to AtkSelection's 'selection-changed'
+ signal, and print it out as AXSelectedChildrenChanged in the tests.
+
+ Also removed some dead code, that became useless after r169487.
+
+ * WebKitTestRunner/InjectedBundle/atk/AccessibilityNotificationHandlerAtk.cpp:
+ (WTR::AccessibilityNotificationHandler::connectAccessibilityCallbacks): Updated.
+
</ins><span class="cx"> 2014-06-15 Ryuan Choi <ryuan.choi@samsung.com>
</span><span class="cx">
</span><span class="cx"> [EFL][WK2] Change ewk_view_settings_get to ewk_page_group_settings_get
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundleatkAccessibilityNotificationHandlerAtkcpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityNotificationHandlerAtk.cpp (170007 => 170008)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityNotificationHandlerAtk.cpp        2014-06-16 12:17:10 UTC (rev 170007)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityNotificationHandlerAtk.cpp        2014-06-16 15:01:06 UTC (rev 170008)
</span><span class="lines">@@ -63,44 +63,35 @@
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> GSignalQuery signalQuery;
</span><del>- GUniquePtr<char> signalName;
- GUniquePtr<char> signalValue;
</del><span class="cx"> const char* notificationName = nullptr;
</span><span class="cx"> Vector<JSValueRef> extraArgs;
</span><span class="cx">
</span><span class="cx"> g_signal_query(signalHint->signal_id, &signalQuery);
</span><span class="cx">
</span><span class="cx"> if (!g_strcmp0(signalQuery.signal_name, "state-change")) {
</span><del>- signalName.reset(g_strdup_printf("state-change:%s", g_value_get_string(&paramValues[1])));
- signalValue.reset(g_strdup_printf("%d", g_value_get_boolean(&paramValues[2])));
</del><span class="cx"> if (!g_strcmp0(g_value_get_string(&paramValues[1]), "checked"))
</span><span class="cx"> notificationName = "CheckedStateChanged";
</span><span class="cx"> else if (!g_strcmp0(g_value_get_string(&paramValues[1]), "invalid-entry"))
</span><span class="cx"> notificationName = "AXInvalidStatusChanged";
</span><span class="cx"> } else if (!g_strcmp0(signalQuery.signal_name, "focus-event")) {
</span><del>- signalName.reset(g_strdup("focus-event"));
- signalValue.reset(g_strdup_printf("%d", g_value_get_boolean(&paramValues[1])));
</del><span class="cx"> if (g_value_get_boolean(&paramValues[1]))
</span><span class="cx"> notificationName = "AXFocusedUIElementChanged";
</span><ins>+ } else if (!g_strcmp0(signalQuery.signal_name, "selection-changed")) {
+ notificationName = "AXSelectedChildrenChanged";
</ins><span class="cx"> } else if (!g_strcmp0(signalQuery.signal_name, "children-changed")) {
</span><span class="cx"> const gchar* childrenChangedDetail = g_quark_to_string(signalHint->detail);
</span><del>- signalName.reset(g_strdup_printf("children-changed:%s", childrenChangedDetail));
- signalValue.reset(g_strdup_printf("%d", g_value_get_uint(&paramValues[1])));
</del><span class="cx"> notificationName = !g_strcmp0(childrenChangedDetail, "add") ? "AXChildrenAdded" : "AXChildrenRemoved";
</span><span class="cx"> } else if (!g_strcmp0(signalQuery.signal_name, "property-change")) {
</span><del>- signalName.reset(g_strdup_printf("property-change:%s", g_quark_to_string(signalHint->detail)));
</del><span class="cx"> if (!g_strcmp0(g_quark_to_string(signalHint->detail), "accessible-value"))
</span><span class="cx"> notificationName = "AXValueChanged";
</span><span class="cx"> } else if (!g_strcmp0(signalQuery.signal_name, "load-complete"))
</span><span class="cx"> notificationName = "AXLoadComplete";
</span><span class="cx"> else if (!g_strcmp0(signalQuery.signal_name, "text-caret-moved")) {
</span><span class="cx"> notificationName = "AXTextCaretMoved";
</span><del>- signalName.reset(g_strdup(signalQuery.signal_name));
- signalValue.reset(g_strdup_printf("%d", g_value_get_int(&paramValues[1])));
</del><ins>+ GUniquePtr<char> signalValue(g_strdup_printf("%d", g_value_get_int(&paramValues[1])));
</ins><span class="cx"> JSRetainPtr<JSStringRef> jsSignalValue(Adopt, JSStringCreateWithUTF8CString(signalValue.get()));
</span><span class="cx"> extraArgs.append(JSValueMakeString(jsContext, jsSignalValue.get()));
</span><del>- } else
- signalName.reset(g_strdup(signalQuery.signal_name));
</del><ins>+ }
</ins><span class="cx">
</span><span class="cx"> if (!jsContext)
</span><span class="cx"> return true;
</span><span class="lines">@@ -225,6 +216,7 @@
</span><span class="cx"> "ATK:AtkObject:property-change",
</span><span class="cx"> "ATK:AtkObject:visible-data-changed",
</span><span class="cx"> "ATK:AtkDocument:load-complete",
</span><ins>+ "ATK:AtkSelection:selection-changed",
</ins><span class="cx"> "ATK:AtkText:text-caret-moved",
</span><span class="cx"> 0
</span><span class="cx"> };
</span></span></pre>
</div>
</div>
</body>
</html>