<!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>[165430] 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/165430">165430</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2014-03-10 21:52:02 -0700 (Mon, 10 Mar 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Web Inspector: AXI: Expose checked/disabled/expanded/pressed/readonly/selected
https://bugs.webkit.org/show_bug.cgi?id=129781
Patch by James Craig <jcraig@apple.com> on 2014-03-10
Reviewed by Joseph Pecoraro.
Enabling several more properties to be exposed in the Accessibility Node Inspector.
Source/WebCore:
Updated Tests: inspector-protocol/dom/getAccessibilityPropertiesForNode.html
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::supportsChecked):
* accessibility/AccessibilityObject.h:
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
* inspector/protocol/DOM.json:
Source/WebInspectorUI:
Updated Tests: inspector-protocol/dom/getAccessibilityPropertiesForNode.html
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Models/DOMNode.js:
* UserInterface/Protocol/InspectorWebBackendCommands.js:
* UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
LayoutTests:
* inspector-protocol/dom/getAccessibilityPropertiesForNode-expected.txt:
* inspector-protocol/dom/getAccessibilityPropertiesForNode.html:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsinspectorprotocoldomgetAccessibilityPropertiesForNodeexpectedtxt">trunk/LayoutTests/inspector-protocol/dom/getAccessibilityPropertiesForNode-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectorprotocoldomgetAccessibilityPropertiesForNodehtml">trunk/LayoutTests/inspector-protocol/dom/getAccessibilityPropertiesForNode.html</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAccessibilityObjectcpp">trunk/Source/WebCore/accessibility/AccessibilityObject.cpp</a></li>
<li><a href="#trunkSourceWebCoreaccessibilityAccessibilityObjecth">trunk/Source/WebCore/accessibility/AccessibilityObject.h</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorDOMAgentcpp">trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectorprotocolDOMjson">trunk/Source/WebCore/inspector/protocol/DOM.json</a></li>
<li><a href="#trunkSourceWebInspectorUIChangeLog">trunk/Source/WebInspectorUI/ChangeLog</a></li>
<li><a href="#trunkSourceWebInspectorUILocalizationsenlprojlocalizedStringsjs">trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceModelsDOMNodejs">trunk/Source/WebInspectorUI/UserInterface/Models/DOMNode.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceProtocolInspectorWebBackendCommandsjs">trunk/Source/WebInspectorUI/UserInterface/Protocol/InspectorWebBackendCommands.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsDOMNodeDetailsSidebarPaneljs">trunk/Source/WebInspectorUI/UserInterface/Views/DOMNodeDetailsSidebarPanel.js</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (165429 => 165430)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-03-11 04:31:06 UTC (rev 165429)
+++ trunk/LayoutTests/ChangeLog        2014-03-11 04:52:02 UTC (rev 165430)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2014-03-10 James Craig <jcraig@apple.com>
+
+ Web Inspector: AXI: Expose checked/disabled/expanded/pressed/readonly/selected
+ https://bugs.webkit.org/show_bug.cgi?id=129781
+
+ Reviewed by Joseph Pecoraro.
+
+ Enabling several more properties to be exposed in the Accessibility Node Inspector.
+
+ * inspector-protocol/dom/getAccessibilityPropertiesForNode-expected.txt:
+ * inspector-protocol/dom/getAccessibilityPropertiesForNode.html:
+
</ins><span class="cx"> 2014-03-10 Bem Jones-Bey <bjonesbe@adobe.com>
</span><span class="cx">
</span><span class="cx"> [CSS Shapes] inset corner radii are not flipped for vertical writing modes
</span></span></pre></div>
<a id="trunkLayoutTestsinspectorprotocoldomgetAccessibilityPropertiesForNodeexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector-protocol/dom/getAccessibilityPropertiesForNode-expected.txt (165429 => 165430)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector-protocol/dom/getAccessibilityPropertiesForNode-expected.txt        2014-03-11 04:31:06 UTC (rev 165429)
+++ trunk/LayoutTests/inspector-protocol/dom/getAccessibilityPropertiesForNode-expected.txt        2014-03-11 04:52:02 UTC (rev 165430)
</span><span class="lines">@@ -1,8 +1,51 @@
</span><span class="cx"> Checking Web Inspector protocol for the Accessibility Node Inspector.
</span><span class="cx">
</span><del>-
-Total elements to be tested: 23.
</del><ins>+Total elements to be tested: 50.
</ins><span class="cx">
</span><ins>+<li role="treeitem" aria-expanded="false">collapsed</li>
+ exists: true
+ label:
+ role: treeitem
+ expanded: false
+
+<li role="treeitem" aria-expanded="true">expanded</li>
+ exists: true
+ label:
+ role: treeitem
+ expanded: true
+
+<div role="tab" aria-selected="false">not selected</div>
+ exists: true
+ label:
+ role: tab
+
+<div role="tab" aria-selected="true">selected</div>
+ exists: true
+ label:
+ role: tab
+ selected: true
+
+<div role="option" aria-selected="false">not selected</div>
+ exists: true
+ label:
+ role: option
+
+<div role="option" aria-selected="true">selected</div>
+ exists: true
+ label:
+ role: option
+ selected: true
+
+<option>not selected</option>
+ exists: false
+ label:
+ role:
+
+<option selected="">FIXME: Selected is false. Expected true. http://webkit.org/b/129835</option>
+ exists: false
+ label:
+ role:
+
</ins><span class="cx"> <img src="./404.gif" alt="x" style="display:none;">
</span><span class="cx"> exists: false
</span><span class="cx"> label:
</span><span class="lines">@@ -47,21 +90,134 @@
</span><span class="cx"> hidden: true
</span><span class="cx"> required: false
</span><span class="cx">
</span><del>-<input aria-invalid="fake-value-will-eval-to-true">
</del><ins>+<div role="radio" aria-checked="false">unchecked</div>
</ins><span class="cx"> exists: true
</span><span class="cx"> label:
</span><ins>+ role: radio
+ checked: false
+ required: false
+
+<div role="radio" aria-checked="mixed">unchecked [sic] mixed state will not be exposed on radios per ARIA spec.</div>
+ exists: true
+ label:
+ role: radio
+ checked: false
+ required: false
+
+<div role="radio" aria-checked="true">checked</div>
+ exists: true
+ label:
+ role: radio
+ checked: true
+ required: false
+
+<div role="radio">unchecked (checked undefined evals to false on radio)</div>
+ exists: true
+ label:
+ role: radio
+ checked: false
+ required: false
+
+<input type="radio" checked="">
+ exists: true
+ label:
+ role: radio
+ checked: true
+ required: false
+
+<input type="radio">
+ exists: true
+ label:
+ role: radio
+ checked: false
+ required: false
+
+<div role="checkbox" aria-checked="false">unchecked</div>
+ exists: true
+ label:
+ role: checkbox
+ checked: false
+ required: false
+
+<div role="checkbox" aria-checked="mixed">mixed</div>
+ exists: true
+ label:
+ role: checkbox
+ checked: mixed
+ required: false
+
+<div role="checkbox" aria-checked="true">checked</div>
+ exists: true
+ label:
+ role: checkbox
+ checked: true
+ required: false
+
+<div role="checkbox">unchecked (checked undefined evals to false on checkbox)</div>
+ exists: true
+ label:
+ role: checkbox
+ checked: false
+ required: false
+
+<input type="checkbox" checked="">
+ exists: true
+ label:
+ role: checkbox
+ checked: true
+ required: false
+
+<input type="checkbox">
+ exists: true
+ label:
+ role: checkbox
+ checked: false
+ required: false
+
+<div role="textbox" tabindex="0" aria-disabled="true">disabled</div>
+ exists: true
+ label:
</ins><span class="cx"> role:
</span><ins>+ disabled: true
+ readonly: true
+ required: false
+
+<input disabled="" value="disabled">
+ exists: true
+ label:
+ role:
+ disabled: true
+ required: false
+
+<div role="textbox" tabindex="0" aria-readonly="true">readonly</div>
+ exists: true
+ label:
+ role:
+ readonly: true
+ required: false
+
+<input readonly="" value="readonly">
+ exists: true
+ label:
+ role:
+ readonly: true
+ required: false
+
+<input aria-invalid="foo" value="fake value will eval to true">
+ exists: true
+ label:
+ role:
</ins><span class="cx"> invalid: true
</span><span class="cx"> required: false
</span><span class="cx">
</span><del>-<input aria-invalid="spelling">
</del><ins>+<input aria-invalid="spelling" value="invalid spelling">
</ins><span class="cx"> exists: true
</span><span class="cx"> label:
</span><span class="cx"> role:
</span><span class="cx"> invalid: spelling
</span><span class="cx"> required: false
</span><span class="cx">
</span><del>-<input aria-required="true">
</del><ins>+<input aria-required="true" value="required">
</ins><span class="cx"> exists: true
</span><span class="cx"> label:
</span><span class="cx"> role:
</span><span class="lines">@@ -89,6 +245,26 @@
</span><span class="cx"> label:
</span><span class="cx"> role: button
</span><span class="cx">
</span><ins>+<div role="button" tabindex="0" aria-pressed="false">Not Pressed.</div>
+ exists: true
+ label:
+ role:
+ pressed: false
+ required: false
+
+<div role="button" tabindex="0" aria-pressed="true">FIXME: Pressed is false. Expected true. http://webkit.org/b/129830</div>
+ exists: true
+ label:
+ role:
+ pressed: false
+ required: false
+
+<div role="button" tabindex="0" aria-disabled="true">disabled</div>
+ exists: true
+ label:
+ role: button
+ disabled: true
+
</ins><span class="cx"> <div role="button" tabindex="0"></div>
</span><span class="cx"> exists: true
</span><span class="cx"> label:
</span></span></pre></div>
<a id="trunkLayoutTestsinspectorprotocoldomgetAccessibilityPropertiesForNodehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector-protocol/dom/getAccessibilityPropertiesForNode.html (165429 => 165430)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector-protocol/dom/getAccessibilityPropertiesForNode.html        2014-03-11 04:31:06 UTC (rev 165429)
+++ trunk/LayoutTests/inspector-protocol/dom/getAccessibilityPropertiesForNode.html        2014-03-11 04:52:02 UTC (rev 165430)
</span><span class="lines">@@ -6,6 +6,8 @@
</span><span class="cx">
</span><span class="cx"> <p>Checking Web Inspector protocol for the Accessibility Node Inspector.</p>
</span><span class="cx">
</span><ins>+<div id="examples">
+
</ins><span class="cx"> <script class="ex"></script>
</span><span class="cx"> <script class="ex" style="display:block;"></script>
</span><span class="cx">
</span><span class="lines">@@ -17,14 +19,36 @@
</span><span class="cx"> <span class="ex" aria-hidden="true"></span>
</span><span class="cx">
</span><span class="cx"> <div class="ex" role="button" tabindex="0"></div>
</span><ins>+<div class="ex" role="button" tabindex="0" aria-disabled="true">disabled</div>
+<div class="ex" role="button" tabindex="0" aria-pressed="true">FIXME: Pressed is false. Expected true. http://webkit.org/b/129830</div>
+<div class="ex" role="button" tabindex="0" aria-pressed="false">Not Pressed.</div>
</ins><span class="cx"> <button class="ex"></button>
</span><span class="cx"> <input class="ex" type="button">
</span><span class="cx">
</span><span class="cx"> <input class="ex">
</span><span class="cx"> <input class="ex" required>
</span><del>-<input class="ex" aria-required="true">
-<input class="ex" aria-invalid="spelling">
-<input class="ex" aria-invalid="fake-value-will-eval-to-true">
</del><ins>+<input class="ex" aria-required="true" value="required">
+<input class="ex" aria-invalid="spelling" value="invalid spelling">
+<input class="ex" aria-invalid="foo" value="fake value will eval to true">
+<input class="ex" readonly value="readonly">
+<div class="ex" role="textbox" tabindex="0" aria-readonly="true">readonly</div>
+<input class="ex" disabled value="disabled">
+<div class="ex" role="textbox" tabindex="0" aria-disabled="true">disabled</div>
+
+<input class="ex" type="checkbox">
+<input class="ex" type="checkbox" checked>
+<div class="ex" role="checkbox">unchecked (checked undefined evals to false on checkbox)</div>
+<div class="ex" role="checkbox" aria-checked="true">checked</div>
+<div class="ex" role="checkbox" aria-checked="mixed">mixed</div>
+<div class="ex" role="checkbox" aria-checked="false">unchecked</div>
+
+<input class="ex" type="radio">
+<input class="ex" type="radio" checked>
+<div class="ex" role="radio">unchecked (checked undefined evals to false on radio)</div>
+<div class="ex" role="radio" aria-checked="true">checked</div>
+<div class="ex" role="radio" aria-checked="mixed">unchecked [sic] mixed state will not be exposed on radios per ARIA spec.</div>
+<div class="ex" role="radio" aria-checked="false">unchecked</div>
+
</ins><span class="cx"> <input class="ex" aria-hidden="true">
</span><span class="cx"> <input class="ex" style="display:none;">
</span><span class="cx">
</span><span class="lines">@@ -34,15 +58,34 @@
</span><span class="cx"> <img class="ex" src="./404.gif" alt="x" aria-hidden="true">
</span><span class="cx"> <img class="ex" src="./404.gif" alt="x" style="display:none;">
</span><span class="cx">
</span><ins>+<select multiple>
+ <option class="ex" selected>FIXME: Selected is false. Expected true. http://webkit.org/b/129835</option>
+ <option class="ex">not selected</option>
+</select>
+<div role="listbox">
+ <div class="ex" role="option" aria-selected="true">selected</div>
+ <div class="ex" role="option" aria-selected="false">not selected</div>
+</div>
+<div role="tablist">
+ <div class="ex" role="tab" aria-selected="true">selected</div>
+ <div class="ex" role="tab" aria-selected="false">not selected</div>
+</div>
+
+<ul role="tree">
+ <li class="ex" role="treeitem" aria-expanded="true">expanded</li>
+ <li class="ex" role="treeitem" aria-expanded="false">collapsed</li>
+</ul>
+
+</div>
+
</ins><span class="cx"> <script type="text/javascript">
</span><span class="cx">
</span><span class="cx"> function $(selector) {
</span><span class="cx"> return document.querySelectorAll(selector);
</span><span class="cx"> }
</span><span class="cx"> function cleanup() {
</span><del>- var examples = $(".ex");
- for (el in examples)
- el.style.display = "none";
</del><ins>+ // Hide the test element container to avoid irrelevant output diffs on subsequent updates.
+ document.getElementById("examples").style.display = "none";
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> function test() {
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (165429 => 165430)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-03-11 04:31:06 UTC (rev 165429)
+++ trunk/Source/WebCore/ChangeLog        2014-03-11 04:52:02 UTC (rev 165430)
</span><span class="lines">@@ -1,3 +1,21 @@
</span><ins>+2014-03-10 James Craig <jcraig@apple.com>
+
+ Web Inspector: AXI: Expose checked/disabled/expanded/pressed/readonly/selected
+ https://bugs.webkit.org/show_bug.cgi?id=129781
+
+ Reviewed by Joseph Pecoraro.
+
+ Enabling several more properties to be exposed in the Accessibility Node Inspector.
+
+ Updated Tests: inspector-protocol/dom/getAccessibilityPropertiesForNode.html
+
+ * accessibility/AccessibilityObject.cpp:
+ (WebCore::AccessibilityObject::supportsChecked):
+ * accessibility/AccessibilityObject.h:
+ * inspector/InspectorDOMAgent.cpp:
+ (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
+ * inspector/protocol/DOM.json:
+
</ins><span class="cx"> 2014-03-10 Bem Jones-Bey <bjonesbe@adobe.com>
</span><span class="cx">
</span><span class="cx"> [CSS Shapes] inset corner radii are not flipped for vertical writing modes
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityObject.cpp (165429 => 165430)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityObject.cpp        2014-03-11 04:31:06 UTC (rev 165429)
+++ trunk/Source/WebCore/accessibility/AccessibilityObject.cpp        2014-03-11 04:52:02 UTC (rev 165430)
</span><span class="lines">@@ -1930,7 +1930,20 @@
</span><span class="cx">
</span><span class="cx"> return false;
</span><span class="cx"> }
</span><del>-
</del><ins>+
+bool AccessibilityObject::supportsChecked() const
+{
+ switch (roleValue()) {
+ case CheckBoxRole:
+ case MenuItemCheckboxRole:
+ case MenuItemRadioRole:
+ case RadioButtonRole:
+ return true;
+ default:
+ return false;
+ }
+}
+
</ins><span class="cx"> AccessibilityButtonState AccessibilityObject::checkboxOrRadioValue() const
</span><span class="cx"> {
</span><span class="cx"> // If this is a real checkbox or radio button, AccessibilityRenderObject will handle.
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityObjecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityObject.h (165429 => 165430)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityObject.h        2014-03-11 04:31:06 UTC (rev 165429)
+++ trunk/Source/WebCore/accessibility/AccessibilityObject.h        2014-03-11 04:52:02 UTC (rev 165430)
</span><span class="lines">@@ -587,6 +587,7 @@
</span><span class="cx"> bool ariaIsMultiline() const;
</span><span class="cx"> virtual const AtomicString& invalidStatus() const;
</span><span class="cx"> bool supportsARIAExpanded() const;
</span><ins>+ bool supportsChecked() const;
</ins><span class="cx"> AccessibilitySortDirection sortDirection() const;
</span><span class="cx"> virtual bool canvasHasFallbackContent() const { return false; }
</span><span class="cx"> bool supportsRangeValue() const;
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorDOMAgentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp (165429 => 165430)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp        2014-03-11 04:31:06 UTC (rev 165429)
+++ trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp        2014-03-11 04:52:02 UTC (rev 165430)
</span><span class="lines">@@ -1414,38 +1414,82 @@
</span><span class="cx"> if (!WebCore::AXObjectCache::accessibilityEnabled())
</span><span class="cx"> WebCore::AXObjectCache::enableAccessibility();
</span><span class="cx">
</span><ins>+ TypeBuilder::DOM::AccessibilityProperties::Checked::Enum checked = TypeBuilder::DOM::AccessibilityProperties::Checked::False;
</ins><span class="cx"> bool exists = false;
</span><ins>+ bool expanded = false;
+ bool disabled = false;
</ins><span class="cx"> bool ignored = true;
</span><span class="cx"> bool ignoredByDefault = false;
</span><span class="cx"> String invalid = "false"; // String values: true, false, spelling, grammar, etc.
</span><span class="cx"> bool hidden = false;
</span><span class="cx"> String label; // FIXME: Waiting on http://webkit.org/b/121134
</span><ins>+ bool pressed = false;
+ bool readonly = false;
</ins><span class="cx"> bool required = false;
</span><span class="cx"> String role;
</span><ins>+ bool selected = false;
+ bool supportsChecked = false;
+ bool supportsExpanded = false;
+ bool supportsPressed = false;
</ins><span class="cx"> bool supportsRequired = false;
</span><span class="cx">
</span><span class="cx"> if (AXObjectCache* axObjectCache = node->document().axObjectCache()) {
</span><span class="cx"> if (AccessibilityObject* axObject = axObjectCache->getOrCreate(node)) {
</span><ins>+
+ supportsChecked = axObject->supportsChecked();
+ if (supportsChecked) {
+ int checkValue = axObject->checkboxOrRadioValue(); // Element using aria-checked.
+ if (checkValue == 1)
+ checked = TypeBuilder::DOM::AccessibilityProperties::Checked::True;
+ else if (checkValue == 2)
+ checked = TypeBuilder::DOM::AccessibilityProperties::Checked::Mixed;
+ else if (axObject->isChecked()) // Native checkbox.
+ checked = TypeBuilder::DOM::AccessibilityProperties::Checked::True;
+ }
+
+ disabled = !axObject->isEnabled();
</ins><span class="cx"> exists = true;
</span><ins>+
+ supportsExpanded = axObject->supportsARIAExpanded();
+ if (supportsExpanded)
+ expanded = axObject->isExpanded();
+
</ins><span class="cx"> ignored = axObject->accessibilityIsIgnored();
</span><span class="cx"> ignoredByDefault = axObject->accessibilityIsIgnoredByDefault();
</span><span class="cx"> invalid = axObject->invalidStatus();
</span><ins>+
</ins><span class="cx"> if (axObject->isARIAHidden() || axObject->isDOMHidden())
</span><span class="cx"> hidden = true;
</span><ins>+
+ supportsPressed = axObject->ariaPressedIsPresent();
+ if (supportsPressed)
+ pressed = axObject->isPressed();
+
+ if (axObject->isTextControl())
+ readonly = axObject->isReadOnly();
+
</ins><span class="cx"> supportsRequired = axObject->supportsRequiredAttribute();
</span><span class="cx"> if (supportsRequired)
</span><span class="cx"> required = axObject->isRequired();
</span><ins>+
</ins><span class="cx"> role = axObject->computedRoleString();
</span><ins>+ selected = axObject->isSelected();
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>- RefPtr<Inspector::TypeBuilder::DOM::AccessibilityProperties> value = Inspector::TypeBuilder::DOM::AccessibilityProperties::create()
</del><ins>+ RefPtr<TypeBuilder::DOM::AccessibilityProperties> value = TypeBuilder::DOM::AccessibilityProperties::create()
</ins><span class="cx"> .setExists(exists)
</span><span class="cx"> .setLabel(label)
</span><span class="cx"> .setRole(role)
</span><span class="cx"> .setNodeId(pushNodePathToFrontend(node));
</span><span class="cx">
</span><span class="cx"> if (exists) {
</span><ins>+ if (supportsChecked)
+ value->setChecked(checked);
+ if (disabled)
+ value->setDisabled(disabled);
+ if (supportsExpanded)
+ value->setExpanded(expanded);
</ins><span class="cx"> if (ignored)
</span><span class="cx"> value->setIgnored(ignored);
</span><span class="cx"> if (ignoredByDefault)
</span><span class="lines">@@ -1454,8 +1498,14 @@
</span><span class="cx"> value->setInvalid(invalid);
</span><span class="cx"> if (hidden)
</span><span class="cx"> value->setHidden(hidden);
</span><ins>+ if (supportsPressed)
+ value->setPressed(pressed);
+ if (readonly)
+ value->setReadonly(readonly);
</ins><span class="cx"> if (supportsRequired)
</span><span class="cx"> value->setRequired(required);
</span><ins>+ if (selected)
+ value->setSelected(selected);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return value.release();
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorprotocolDOMjson"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/protocol/DOM.json (165429 => 165430)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/protocol/DOM.json        2014-03-11 04:31:06 UTC (rev 165429)
+++ trunk/Source/WebCore/inspector/protocol/DOM.json        2014-03-11 04:52:02 UTC (rev 165430)
</span><span class="lines">@@ -59,15 +59,21 @@
</span><span class="cx"> "description": "A structure holding accessibility properties.",
</span><span class="cx"> "type": "object",
</span><span class="cx"> "properties": [
</span><del>- { "name": "exists", "type": "boolean", "description": "Returns whether there is an existing AX object for the DOM node. If this is false, all the other properties will be default values." },
- { "name": "ignored", "type": "boolean", "optional": true, "description": "Returns whether the accessibility of the associated AX object node is ignored, whether heuristically or explicitly." },
- { "name": "ignoredByDefault", "type": "boolean", "optional": true, "description": "Returns whether the accessibility of the associated AX object node is ignored by default for node type." },
- { "name": "invalid", "type": "string", "optional": true, "description": "Returns the invalid status for form fields: true, false, grammar, spelling." },
- { "name": "hidden", "type": "boolean", "optional": true, "description": "Returns true if node or an ancestor is hidden via CSS or explicit @aria-hidden, to clarify why the element is ignored." },
</del><ins>+ { "name": "checked", "type": "string", "optional": true, "enum": ["true", "false", "mixed"], "description": "Checked state of certain form controls." },
+ { "name": "disabled", "type": "boolean", "optional": true, "description": "Disabled state of form controls." },
+ { "name": "exists", "type": "boolean", "description": "Indicates whether there is an existing AX object for the DOM node. If this is false, all the other properties will be default values." },
+ { "name": "expanded", "type": "boolean", "optional": true, "description": "Expanded state." },
+ { "name": "ignored", "type": "boolean", "optional": true, "description": "Indicates whether the accessibility of the associated AX object node is ignored, whether heuristically or explicitly." },
+ { "name": "ignoredByDefault", "type": "boolean", "optional": true, "description": "State indicating whether the accessibility of the associated AX object node is ignored by default for node type." },
+ { "name": "invalid", "type": "string", "optional": true, "description": "Invalid status of form controls: true, false, grammar, spelling." },
+ { "name": "hidden", "type": "boolean", "optional": true, "description": "Hidden state. True if node or an ancestor is hidden via CSS or explicit @aria-hidden, to clarify why the element is ignored." },
</ins><span class="cx"> { "name": "label", "type": "string", "description": "Computed label value for the node, sometimes calculated by referencing other nodes." },
</span><del>- { "name": "required", "type": "boolean", "optional": true, "description": "Returns whether the element is required or not required." },
</del><ins>+ { "name": "nodeId", "$ref": "NodeId", "description": "Target <code>DOMNode</code> id." },
+ { "name": "pressed", "type": "boolean", "optional": true, "description": "Pressed state for toggle buttons." },
+ { "name": "readonly", "type": "boolean", "optional": true, "description": "Readonly state of text controls." },
+ { "name": "required", "type": "boolean", "optional": true, "description": "Required state of form controls." },
</ins><span class="cx"> { "name": "role", "type": "string", "description": "Computed value for first recognized role token, default role per element, or overridden role." },
</span><del>- { "name": "nodeId", "$ref": "NodeId", "description": "Target <code>DOMNode</code> id." }
</del><ins>+ { "name": "selected", "type": "boolean", "optional": true, "description": "Selected state of certain form controls." }
</ins><span class="cx"> ]
</span><span class="cx"> },
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/ChangeLog (165429 => 165430)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/ChangeLog        2014-03-11 04:31:06 UTC (rev 165429)
+++ trunk/Source/WebInspectorUI/ChangeLog        2014-03-11 04:52:02 UTC (rev 165430)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2014-03-10 James Craig <jcraig@apple.com>
+
+ Web Inspector: AXI: Expose checked/disabled/expanded/pressed/readonly/selected
+ https://bugs.webkit.org/show_bug.cgi?id=129781
+
+ Reviewed by Joseph Pecoraro.
+
+ Enabling several more properties to be exposed in the Accessibility Node Inspector.
+
+ Updated Tests: inspector-protocol/dom/getAccessibilityPropertiesForNode.html
+
+ * Localizations/en.lproj/localizedStrings.js:
+ * UserInterface/Models/DOMNode.js:
+ * UserInterface/Protocol/InspectorWebBackendCommands.js:
+ * UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
+
</ins><span class="cx"> 2014-03-10 Brian Burg <bburg@apple.com>
</span><span class="cx">
</span><span class="cx"> Web Inspector: show a debugging-oriented dashboard when scripts pause
</span></span></pre></div>
<a id="trunkSourceWebInspectorUILocalizationsenlprojlocalizedStringsjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js (165429 => 165430)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js        2014-03-11 04:31:06 UTC (rev 165429)
+++ trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js        2014-03-11 04:52:02 UTC (rev 165430)
</span><span class="lines">@@ -75,6 +75,7 @@
</span><span class="cx">