<!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>[163891] 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/163891">163891</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2014-02-11 11:27:12 -0800 (Tue, 11 Feb 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Web Inspector: AX: Accessibility Node Inspection
https://bugs.webkit.org/show_bug.cgi?id=127447

Patch by James Craig &lt;jcraig@apple.com&gt; on 2014-02-11
Reviewed by Timothy Hatcher.

Source/WebCore:

New methods supporting WebCore::AccessibilityObject::computedRoleString()
used for Accessibility section in WebInspector Node Inspector. Other updates
support the JSON interface for the WebInspectorUI feature.

Test: accessibility/roles-computedRoleString.html

* accessibility/AccessibilityObject.cpp:
(WebCore::initializeRoleMap):
(WebCore::ariaRoleMap):
(WebCore::reverseAriaRoleMap):
(WebCore::AccessibilityObject::ariaRoleToWebCoreRole):
(WebCore::AccessibilityObject::computedRoleString):
* accessibility/AccessibilityObject.h:
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper computedRoleString]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::getAccessibilityPropertiesForNode):
(WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
* inspector/InspectorDOMAgent.h:
* inspector/protocol/DOM.json:

Source/WebInspectorUI:

New Accessibility section in WebInspector Node Inspector.
Version 1.0 only shows computed role. Computed label should come soon.

Removed CSS fixed table layout b/c CSS bug: http://webkit.org/b/128294

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/DOMNode.js:
* UserInterface/DOMNodeDetailsSidebarPanel.js:
* UserInterface/DetailsSection.css:
* UserInterface/InspectorWebBackendCommands.js:

Tools:

New computedRoleString interfaces in DumpRenderTree/WebKitTestRunner
to support LayoutTest coverage of AccessibilityObject::computedRoleString()

* DumpRenderTree/AccessibilityUIElement.cpp:
* DumpRenderTree/AccessibilityUIElement.h:
* DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:
* DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
* DumpRenderTree/mac/AccessibilityUIElementMac.mm:
* DumpRenderTree/win/AccessibilityUIElementWin.cpp:
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
* WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
* WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:

LayoutTests:

New layout verifying AccessibilityObject::computedRoleString()

* accessibility/roles-computedRoleString-expected.txt: Added.
* accessibility/roles-computedRoleString.html: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsplatformgtkTestExpectations">trunk/LayoutTests/platform/gtk/TestExpectations</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="#trunkSourceWebCoreaccessibilitymacWebAccessibilityObjectWrapperMacmm">trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorDOMAgentcpp">trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorDOMAgenth">trunk/Source/WebCore/inspector/InspectorDOMAgent.h</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="#trunkSourceWebInspectorUIUserInterfaceDOMNodejs">trunk/Source/WebInspectorUI/UserInterface/DOMNode.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceDOMNodeDetailsSidebarPaneljs">trunk/Source/WebInspectorUI/UserInterface/DOMNodeDetailsSidebarPanel.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceDetailsSectioncss">trunk/Source/WebInspectorUI/UserInterface/DetailsSection.css</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceInspectorWebBackendCommandsjs">trunk/Source/WebInspectorUI/UserInterface/InspectorWebBackendCommands.js</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsDumpRenderTreeAccessibilityUIElementcpp">trunk/Tools/DumpRenderTree/AccessibilityUIElement.cpp</a></li>
<li><a href="#trunkToolsDumpRenderTreeAccessibilityUIElementh">trunk/Tools/DumpRenderTree/AccessibilityUIElement.h</a></li>
<li><a href="#trunkToolsDumpRenderTreeatkAccessibilityUIElementAtkcpp">trunk/Tools/DumpRenderTree/atk/AccessibilityUIElementAtk.cpp</a></li>
<li><a href="#trunkToolsDumpRenderTreeiosAccessibilityUIElementIOSmm">trunk/Tools/DumpRenderTree/ios/AccessibilityUIElementIOS.mm</a></li>
<li><a href="#trunkToolsDumpRenderTreemacAccessibilityUIElementMacmm">trunk/Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm</a></li>
<li><a href="#trunkToolsDumpRenderTreewinAccessibilityUIElementWincpp">trunk/Tools/DumpRenderTree/win/AccessibilityUIElementWin.cpp</a></li>
<li><a href="#trunkToolsWebKitTestRunnerInjectedBundleAccessibilityUIElementcpp">trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp</a></li>
<li><a href="#trunkToolsWebKitTestRunnerInjectedBundleAccessibilityUIElementh">trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h</a></li>
<li><a href="#trunkToolsWebKitTestRunnerInjectedBundleBindingsAccessibilityUIElementidl">trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl</a></li>
<li><a href="#trunkToolsWebKitTestRunnerInjectedBundleatkAccessibilityUIElementAtkcpp">trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp</a></li>
<li><a href="#trunkToolsWebKitTestRunnerInjectedBundleiosAccessibilityUIElementIOSmm">trunk/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm</a></li>
<li><a href="#trunkToolsWebKitTestRunnerInjectedBundlemacAccessibilityUIElementMacmm">trunk/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsaccessibilityrolescomputedRoleStringexpectedtxt">trunk/LayoutTests/accessibility/roles-computedRoleString-expected.txt</a></li>
<li><a href="#trunkLayoutTestsaccessibilityrolescomputedRoleStringhtml">trunk/LayoutTests/accessibility/roles-computedRoleString.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (163890 => 163891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-02-11 18:59:17 UTC (rev 163890)
+++ trunk/LayoutTests/ChangeLog        2014-02-11 19:27:12 UTC (rev 163891)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2014-02-11  James Craig  &lt;jcraig@apple.com&gt;
+
+        Web Inspector: AX: Accessibility Node Inspection
+        https://bugs.webkit.org/show_bug.cgi?id=127447
+
+        Reviewed by Timothy Hatcher.
+
+        New layout verifying AccessibilityObject::computedRoleString()
+
+        * accessibility/roles-computedRoleString-expected.txt: Added.
+        * accessibility/roles-computedRoleString.html: Added.
+
</ins><span class="cx"> 2014-02-10  Oliver Hunt  &lt;oliver@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Stop throwing when attempting to read instance properties directly from the prototype
</span></span></pre></div>
<a id="trunkLayoutTestsaccessibilityrolescomputedRoleStringexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/accessibility/roles-computedRoleString-expected.txt (0 => 163891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/accessibility/roles-computedRoleString-expected.txt                                (rev 0)
+++ trunk/LayoutTests/accessibility/roles-computedRoleString-expected.txt        2014-02-11 19:27:12 UTC (rev 163891)
</span><span class="lines">@@ -0,0 +1,169 @@
</span><ins>+ X
+This tests that native elements and ARIA overrides result in the same ARIA computed role, regardless of platform.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS: a[href] -&gt; link. 
+PASS: article -&gt; article. 
+PASS: aside -&gt; complementary. 
+PASS: button -&gt; button. 
+PASS: dfn -&gt; definition. 
+PASS: dl -&gt; . 
+PASS: footer -&gt; . 
+PASS: form -&gt; . 
+PASS: header -&gt; banner. 
+PASS: h1 -&gt; heading. 
+PASS: h2 -&gt; heading. 
+PASS: h3 -&gt; heading. 
+PASS: h4 -&gt; heading. 
+PASS: h5 -&gt; heading. 
+PASS: h5 -&gt; heading. 
+PASS: img[alt='X'] -&gt; img. 
+PASS: input[type='button'] -&gt; button. 
+PASS: input[type='checkbox'] -&gt; checkbox. 
+PASS: input[type='date'] -&gt; . 
+PASS: input[type='datetime'] -&gt; . 
+PASS: input[type='datetime-local'] -&gt; . 
+PASS: input[type='email'] -&gt; . 
+PASS: input[type='file'] -&gt; button. 
+PASS: input[type='image'] -&gt; button. 
+PASS: input[type='month'] -&gt; . 
+PASS: input[type='number'] -&gt; . 
+PASS: input[type='password'] -&gt; . 
+PASS: input[type='radio'] -&gt; radio. 
+PASS: input[type='range'] -&gt; slider. 
+PASS: input[type='reset'] -&gt; button. 
+PASS: input[type='search'] -&gt; . 
+PASS: input[type='submit'] -&gt; button. 
+PASS: input[type='tel'] -&gt; . 
+PASS: input[type='text'] -&gt; . 
+PASS: input[type='time'] -&gt; . 
+PASS: input[type='url'] -&gt; . 
+PASS: input[type='week'] -&gt; . 
+PASS: math -&gt; math. 
+PASS: meter -&gt; progressbar. 
+PASS: nav -&gt; navigation. 
+PASS: ol -&gt; list. 
+PASS: li -&gt; listitem. 
+PASS: p -&gt; . 
+PASS: pre -&gt; group. 
+PASS: progress -&gt; progressbar. 
+PASS: section -&gt; region. 
+PASS: select:not([multiple]) -&gt; . 
+PASS: select[multiple] -&gt; listbox. 
+PASS: option -&gt; option. 
+PASS: optgroup -&gt; option. 
+PASS: option -&gt; option. 
+PASS: option -&gt; option. 
+PASS: table -&gt; grid. 
+PASS: tr -&gt; row. 
+PASS: th -&gt; gridcell. 
+PASS: tr -&gt; row. 
+PASS: td -&gt; gridcell. 
+PASS: tr -&gt; row. 
+PASS: td -&gt; gridcell. 
+PASS: textarea -&gt; textbox. 
+PASS: ul -&gt; list. 
+PASS: li -&gt; listitem. 
+PASS: div[role=&quot;command&quot;] -&gt; . 
+PASS: div[role=&quot;composite&quot;] -&gt; . 
+PASS: div[role=&quot;input&quot;] -&gt; . 
+PASS: div[role=&quot;landmark&quot;] -&gt; . 
+PASS: div[role=&quot;range&quot;] -&gt; . 
+PASS: div[role=&quot;roletype&quot;] -&gt; . 
+PASS: div[role=&quot;section&quot;] -&gt; . 
+PASS: div[role=&quot;sectionhead&quot;] -&gt; . 
+PASS: div[role=&quot;select&quot;] -&gt; . 
+PASS: div[role=&quot;structure&quot;] -&gt; . 
+PASS: div[role=&quot;widget&quot;] -&gt; . 
+PASS: div[role=&quot;window&quot;] -&gt; . 
+PASS: div[role=&quot;alert&quot;] -&gt; alert. 
+PASS: div[role=&quot;alertdialog&quot;] -&gt; alertdialog. 
+PASS: div[role=&quot;application&quot;] -&gt; application. 
+PASS: div[role=&quot;article&quot;] -&gt; article. 
+PASS: div[role=&quot;banner&quot;] -&gt; banner. 
+PASS: div[role=&quot;button&quot;] -&gt; button. 
+PASS: div[role=&quot;checkbox&quot;] -&gt; checkbox. 
+PASS: div[role=&quot;combobox&quot;] -&gt; combobox. 
+PASS: div[role=&quot;complementary&quot;] -&gt; complementary. 
+PASS: div[role=&quot;contentinfo&quot;] -&gt; contentinfo. 
+PASS: div[role=&quot;definition&quot;] -&gt; definition. 
+PASS: div[role=&quot;dialog&quot;] -&gt; dialog. 
+PASS: div[role=&quot;directory&quot;] -&gt; list. 
+PASS: div[role=&quot;document&quot;] -&gt; document. 
+PASS: div[role=&quot;form&quot;] -&gt; . 
+PASS: div[role=&quot;grid&quot;] -&gt; grid. 
+PASS: div[role=&quot;row&quot;] -&gt; row. 
+PASS: div[role=&quot;rowheader&quot;] -&gt; gridcell. 
+PASS: div[role=&quot;columnheader&quot;] -&gt; gridcell. 
+PASS: div[role=&quot;gridcell&quot;] -&gt; gridcell. 
+PASS: div[role=&quot;group&quot;] -&gt; group. 
+PASS: div[role=&quot;heading&quot;] -&gt; heading. 
+PASS: div[role=&quot;img&quot;] -&gt; img. 
+PASS: div[role=&quot;link&quot;] -&gt; link. 
+PASS: div[role=&quot;list&quot;] -&gt; list. 
+PASS: div[role=&quot;listitem&quot;] -&gt; listitem. 
+PASS: div[role=&quot;listbox&quot;] -&gt; listbox. 
+PASS: div[role=&quot;option&quot;] -&gt; option. 
+PASS: div[role=&quot;log&quot;] -&gt; log. 
+PASS: div[role=&quot;main&quot;] -&gt; main. 
+PASS: div[role=&quot;marquee&quot;] -&gt; marquee. 
+PASS: div[role=&quot;math&quot;] -&gt; math. 
+PASS: div[role=&quot;menu&quot;] -&gt; menu. 
+PASS: div[role=&quot;menuitem&quot;] -&gt; menuitem. 
+PASS: div[role=&quot;menuitemcheckbox&quot;] -&gt; menuitemcheckbox. 
+PASS: div[role=&quot;menuitemradio&quot;] -&gt; menuitemradio. 
+PASS: div[role=&quot;menubar&quot;] -&gt; menubar. 
+PASS: div[role=&quot;menuitem&quot;] -&gt; menuitem. 
+PASS: div[role=&quot;menuitemcheckbox&quot;] -&gt; menuitemcheckbox. 
+PASS: div[role=&quot;menuitemradio&quot;] -&gt; menuitemradio. 
+PASS: div[role=&quot;navigation&quot;] -&gt; navigation. 
+PASS: div[role=&quot;note&quot;] -&gt; note. 
+PASS: div[role=&quot;progressbar&quot;] -&gt; progressbar. 
+PASS: div[role=&quot;radiogroup&quot;] -&gt; radiogroup. 
+PASS: div[role=&quot;radio&quot;] -&gt; radio. 
+PASS: div[role=&quot;region&quot;] -&gt; region. 
+PASS: div[role=&quot;scrollbar&quot;] -&gt; scrollbar. 
+PASS: div[role=&quot;search&quot;] -&gt; search. 
+PASS: div[role=&quot;separator&quot;] -&gt; separator. 
+PASS: div[role=&quot;slider&quot;] -&gt; slider. 
+PASS: div[role=&quot;spinbutton&quot;] -&gt; spinbutton. 
+PASS: div[role=&quot;status&quot;] -&gt; status. 
+PASS: div[role=&quot;tablist&quot;] -&gt; tablist. 
+PASS: div[role=&quot;tab&quot;] -&gt; tab. 
+PASS: div[role=&quot;tabpanel&quot;] -&gt; tabpanel. 
+PASS: div[role=&quot;textbox&quot;] -&gt; . 
+PASS: div[role=&quot;timer&quot;] -&gt; timer. 
+PASS: div[role=&quot;toolbar&quot;] -&gt; toolbar. 
+PASS: div[role=&quot;tooltip&quot;] -&gt; tooltip. 
+PASS: div[role=&quot;tree&quot;] -&gt; tree. 
+PASS: div[role=&quot;treeitem&quot;] -&gt; treeitem. 
+PASS: div[role=&quot;treeitem&quot;] -&gt; treeitem. 
+PASS: div[role=&quot;treegrid&quot;] -&gt; grid. 
+PASS: div[role=&quot;row&quot;] -&gt; row. 
+PASS: div[role=&quot;rowheader&quot;] -&gt; gridcell. 
+PASS: div[role=&quot;columnheader&quot;] -&gt; gridcell. 
+PASS: div[role=&quot;gridcell&quot;] -&gt; gridcell. 
+PASS: div[role=&quot;button foo&quot;] -&gt; button. 
+PASS: div[role=&quot;foo button bar&quot;] -&gt; button. 
+PASS: div[role=&quot;foo  button  bar&quot;] -&gt; button. 
+PASS: div[role=&quot;foo        button        bar&quot;] -&gt; . 
+PASS: div[role=&quot;foo
+button
+bar&quot;] -&gt; . 
+PASS: img[role=&quot;foo&quot;] -&gt; img. 
+PASS: img[role=&quot;foo bar&quot;] -&gt; img. 
+PASS: img[role=&quot;foo  bar&quot;] -&gt; img. 
+PASS: img[role=&quot;foo        bar&quot;] -&gt; img. 
+PASS: img[role=&quot;foo        
+bar&quot;] -&gt; img. 
+PASS: img[role=&quot;text&quot;] -&gt; text. 
+PASS: img[role=&quot;text img&quot;] -&gt; text. 
+PASS: img[role=&quot;img text&quot;] -&gt; img. 
+PASS: img[role=&quot;presentation&quot;][aria-label] -&gt; img. 
+PASS: a[role=&quot;foo bar&quot;] -&gt; link. 
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsaccessibilityrolescomputedRoleStringhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/accessibility/roles-computedRoleString.html (0 => 163891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/accessibility/roles-computedRoleString.html                                (rev 0)
+++ trunk/LayoutTests/accessibility/roles-computedRoleString.html        2014-02-11 19:27:12 UTC (rev 163891)
</span><span class="lines">@@ -0,0 +1,311 @@
</span><ins>+&lt;!DOCTYPE HTML&gt;
+&lt;html&gt;
+&lt;body&gt;
+&lt;script src=&quot;../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+
+&lt;!-- ==================================================================================================== --&gt;
+&lt;!-- HTML elements in alphabetical order, excepting the need for nesting (e.g. &lt;li&gt; is with its &lt;ol&gt; and &lt;ul&gt; parents) --&gt;
+&lt;!-- This only tests elements that have an exact 1:1 ARIA role mapping, and computed role overrides. --&gt;
+&lt;!-- ==================================================================================================== --&gt;
+&lt;a data-role=&quot;link&quot; href=&quot;#&quot; data-note=&quot;[href]&quot; class=&quot;ex&quot;&gt;X&lt;/a&gt;
+&lt;article data-role=&quot;article&quot; class=&quot;ex&quot;&gt;X&lt;/article&gt;
+&lt;aside data-role=&quot;complementary&quot; class=&quot;ex&quot;&gt;X&lt;/aside&gt;
+&lt;button data-role=&quot;button&quot; class=&quot;ex&quot;&gt;X&lt;/button&gt;
+&lt;dfn data-role=&quot;definition&quot; class=&quot;ex&quot;&gt;X&lt;/dfn&gt;
+&lt;dl data-role=&quot;&quot; class=&quot;ex&quot;&gt;
+    &lt;dt&gt;X&lt;/dt&gt;
+    &lt;dd&gt;X&lt;/dd&gt;
+&lt;/dl&gt;
+&lt;footer data-role=&quot;&quot; class=&quot;ex&quot;&gt;X&lt;/footer&gt;
+&lt;form data-role=&quot;&quot; class=&quot;ex&quot;&gt;X&lt;/form&gt;&lt;!-- FIXME: should be form --&gt;
+&lt;header data-role=&quot;banner&quot; class=&quot;ex&quot;&gt;X&lt;/header&gt;
+&lt;h1 data-role=&quot;heading&quot; class=&quot;ex&quot;&gt;X&lt;/h1&gt;
+&lt;h2 data-role=&quot;heading&quot; class=&quot;ex&quot;&gt;X&lt;/h2&gt;
+&lt;h3 data-role=&quot;heading&quot; class=&quot;ex&quot;&gt;X&lt;/h3&gt;
+&lt;h4 data-role=&quot;heading&quot; class=&quot;ex&quot;&gt;X&lt;/h4&gt;
+&lt;h5 data-role=&quot;heading&quot; class=&quot;ex&quot;&gt;X&lt;/h5&gt;
+&lt;h5 data-role=&quot;heading&quot; class=&quot;ex&quot;&gt;X&lt;/h6&gt;
+&lt;hr data-role=&quot;separator&quot; class=&quot;ex&quot;&gt;
+&lt;img data-role=&quot;img&quot; class=&quot;ex&quot; data-note=&quot;:not([src]):not([alt])&quot;&gt;
+&lt;img data-role=&quot;&quot; class=&quot;ex&quot; alt=&quot;&quot; data-note=&quot;[alt='']&quot;&gt;
+&lt;img data-role=&quot;img&quot; class=&quot;ex&quot; src=&quot;foo.png&quot; data-note=&quot;[src]:not([alt])&quot;&gt;
+&lt;img data-role=&quot;img&quot; class=&quot;ex&quot; alt=&quot;X&quot; data-note=&quot;[alt='X']&quot;&gt;
+&lt;input type=&quot;button&quot; value=&quot;X&quot; data-role=&quot;button&quot; class=&quot;ex&quot; data-note=&quot;[type='button']&quot;&gt;
+&lt;input type=&quot;checkbox&quot; data-role=&quot;checkbox&quot; class=&quot;ex&quot; data-note=&quot;[type='checkbox']&quot;&gt;
+&lt;input type=&quot;date&quot; data-role=&quot;&quot;class=&quot;ex&quot; data-note=&quot;[type='date']&quot;&gt;
+&lt;input type=&quot;datetime&quot; value=&quot;X&quot; data-role=&quot;&quot; class=&quot;ex&quot; data-note=&quot;[type='datetime']&quot;&gt;
+&lt;input type=&quot;datetime-local&quot; value=&quot;X&quot; data-role=&quot;&quot; class=&quot;ex&quot; data-note=&quot;[type='datetime-local']&quot;&gt;
+&lt;input type=&quot;email&quot; value=&quot;X&quot; data-role=&quot;&quot; class=&quot;ex&quot; data-note=&quot;[type='email']&quot;&gt;
+&lt;input type=&quot;file&quot; data-role=&quot;button&quot; class=&quot;ex&quot; data-note=&quot;[type='file']&quot;&gt;
+&lt;input type=&quot;hidden&quot; data-role=&quot;&quot; class=&quot;ex&quot; data-note=&quot;[type='hidden']&quot;&gt;
+&lt;input type=&quot;image&quot; data-role=&quot;button&quot; class=&quot;ex&quot; data-note=&quot;[type='image']&quot;&gt;
+&lt;input type=&quot;month&quot; value=&quot;X&quot; data-role=&quot;&quot; class=&quot;ex&quot; data-note=&quot;[type='month']&quot;&gt;
+&lt;input type=&quot;number&quot; value=&quot;X&quot; data-role=&quot;&quot; class=&quot;ex&quot; data-note=&quot;[type='number']&quot;&gt;
+&lt;input type=&quot;password&quot; value=&quot;X&quot; data-role=&quot;&quot; class=&quot;ex&quot; data-note=&quot;[type='password']&quot;&gt;
+&lt;input type=&quot;radio&quot; data-role=&quot;radio&quot; class=&quot;ex&quot; data-note=&quot;[type='radio']&quot;&gt;
+&lt;input type=&quot;range&quot; data-role=&quot;slider&quot; class=&quot;ex&quot; data-note=&quot;[type='range']&quot;&gt;
+&lt;input type=&quot;reset&quot; data-role=&quot;button&quot; class=&quot;ex&quot; data-note=&quot;[type='reset']&quot;&gt;
+&lt;input type=&quot;search&quot; value=&quot;X&quot; data-role=&quot;&quot; class=&quot;ex&quot; data-note=&quot;[type='search']&quot;&gt;
+&lt;input type=&quot;submit&quot; data-role=&quot;button&quot; class=&quot;ex&quot; data-note=&quot;[type='submit']&quot;&gt;
+&lt;input type=&quot;tel&quot; value=&quot;X&quot; data-role=&quot;&quot; class=&quot;ex&quot; data-note=&quot;[type='tel']&quot;&gt;
+&lt;input type=&quot;text&quot; value=&quot;X&quot; data-role=&quot;&quot; class=&quot;ex&quot; data-note=&quot;[type='text']&quot;&gt;
+&lt;input type=&quot;time&quot; value=&quot;X&quot; data-role=&quot;&quot; class=&quot;ex&quot; data-note=&quot;[type='time']&quot;&gt;
+&lt;input type=&quot;url&quot; value=&quot;X&quot; data-role=&quot;&quot; class=&quot;ex&quot; data-note=&quot;[type='url']&quot;&gt;
+&lt;input type=&quot;week&quot; value=&quot;X&quot; data-role=&quot;&quot; class=&quot;ex&quot; data-note=&quot;[type='week']&quot;&gt;
+&lt;ins data-role=&quot;&quot; class=&quot;ex&quot;&gt;X&lt;/ins&gt;
+&lt;mark data-role=&quot;&quot; class=&quot;ex&quot;&gt;X&lt;/mark&gt;
+&lt;math data-role=&quot;math&quot; class=&quot;ex&quot;&gt;X&lt;/math&gt;
+&lt;!-- skipped &lt;menu&gt; --&gt;
+&lt;!-- skipped &lt;meta&gt; --&gt;
+&lt;meter data-role=&quot;progressbar&quot; class=&quot;ex&quot; value=&quot;0.75&quot;&gt;X&lt;/meter&gt;
+&lt;nav data-role=&quot;navigation&quot; class=&quot;ex&quot;&gt;X&lt;/nav&gt;
+&lt;!-- skipped &lt;noscript&gt; --&gt;
+&lt;!-- skipped &lt;object&gt; --&gt;
+&lt;ol data-role=&quot;list&quot; class=&quot;ex&quot;&gt;
+    &lt;li data-role=&quot;listitem&quot; class=&quot;ex&quot;&gt;X&lt;/li&gt;
+&lt;/ol&gt;
+&lt;!-- skipped &lt;optgroup&gt; --&gt;
+&lt;!-- skipped &lt;option&gt; --&gt;
+&lt;!-- skipped &lt;output&gt; --&gt;
+&lt;p data-role=&quot;&quot; class=&quot;ex&quot;&gt;X&lt;/p&gt;
+&lt;!-- skipped &lt;param&gt; --&gt;
+&lt;pre data-role=&quot;group&quot; class=&quot;ex&quot;&gt;X&lt;/pre&gt;
+&lt;progress data-role=&quot;progressbar&quot; class=&quot;ex&quot; value=&quot;0.75&quot;&gt;X&lt;/progress&gt;
+&lt;q data-role=&quot;&quot; class=&quot;ex&quot;&gt;X&lt;/q&gt;
+&lt;!-- skipped &lt;ruby/rp/rt&gt; --&gt;
+&lt;s data-role=&quot;&quot; class=&quot;ex&quot;&gt;X&lt;/s&gt;
+&lt;samp data-role=&quot;&quot; class=&quot;ex&quot;&gt;X&lt;/samp&gt;
+&lt;!-- skipped &lt;script&gt; --&gt;
+&lt;section data-role=&quot;region&quot; class=&quot;ex&quot;&gt;X&lt;/section&gt;
+&lt;select data-role=&quot;&quot; class=&quot;ex&quot; data-note=&quot;:not([multiple])&quot;&gt;
+    &lt;option data-role=&quot;&quot; class=&quot;ex&quot;&gt;X&lt;/option&gt;
+    &lt;optgroup data-role=&quot;&quot; class=&quot;ex&quot; label=&quot;more&quot;&gt;
+        &lt;option data-role=&quot;&quot; class=&quot;ex&quot;&gt;X&lt;/option&gt;
+    &lt;/optgroup&gt;
+&lt;/select&gt;
+&lt;select data-role=&quot;listbox&quot; class=&quot;ex&quot; multiple data-note=&quot;[multiple]&quot;&gt;
+    &lt;option data-role=&quot;option&quot; class=&quot;ex&quot;&gt;X&lt;/option&gt;
+    &lt;optgroup data-role=&quot;option&quot; class=&quot;ex&quot; label=&quot;more&quot;&gt;
+        &lt;option data-role=&quot;option&quot; class=&quot;ex&quot;&gt;Y&lt;/option&gt;
+        &lt;option data-role=&quot;option&quot; class=&quot;ex&quot;&gt;Z&lt;/option&gt;
+    &lt;/optgroup&gt;
+&lt;/select&gt;
+&lt;small data-role=&quot;&quot; class=&quot;ex&quot;&gt;X&lt;/small&gt;
+&lt;span data-role=&quot;&quot; class=&quot;ex&quot;&gt;X&lt;/span&gt;
+&lt;strong data-role=&quot;&quot; class=&quot;ex&quot;&gt;X&lt;/strong&gt;
+&lt;sub data-role=&quot;&quot; class=&quot;ex&quot;&gt;X&lt;/sub&gt;
+&lt;sup data-role=&quot;&quot; class=&quot;ex&quot;&gt;X&lt;/sup&gt;
+&lt;svg data-role=&quot;&quot; class=&quot;ex&quot;&gt;X&lt;/svg&gt;
+
+&lt;table data-role=&quot;grid&quot; class=&quot;ex&quot;&gt;
+    &lt;caption data-role=&quot;&quot; class=&quot;ex&quot;&gt;X&lt;/caption&gt;
+    &lt;thead data-role=&quot;rowgroup&quot; class=&quot;ex&quot;&gt;
+        &lt;tr data-role=&quot;row&quot; class=&quot;ex&quot;&gt;
+            &lt;th data-role=&quot;gridcell&quot; class=&quot;ex&quot;&gt;X&lt;/th&gt;&lt;!-- FIXME: should be columnheader --&gt;
+        &lt;/tr&gt;
+    &lt;/thead&gt;
+    &lt;tbody data-role=&quot;rowgroup&quot; class=&quot;ex&quot;&gt;
+        &lt;tr data-role=&quot;row&quot; class=&quot;ex&quot;&gt;
+            &lt;td data-role=&quot;gridcell&quot; class=&quot;ex&quot;&gt;X&lt;/td&gt;
+        &lt;/tr&gt;
+    &lt;/tbody&gt;
+    &lt;tfoot data-role=&quot;rowgroup&quot; class=&quot;ex&quot;&gt;
+        &lt;tr data-role=&quot;row&quot; class=&quot;ex&quot;&gt;
+            &lt;td data-role=&quot;gridcell&quot; class=&quot;ex&quot;&gt;X&lt;/td&gt;
+        &lt;/tr&gt;
+    &lt;/tfoot&gt;
+&lt;/table&gt;
+&lt;textarea data-role=&quot;textbox&quot; class=&quot;ex&quot;&gt;X&lt;/textarea&gt;
+&lt;time data-role=&quot;&quot; class=&quot;ex&quot;&gt;X&lt;/time&gt;
+&lt;ul data-role=&quot;list&quot; class=&quot;ex&quot;&gt;
+    &lt;li data-role=&quot;listitem&quot; class=&quot;ex&quot;&gt;X&lt;/li&gt;
+&lt;/ul&gt;
+&lt;var data-role=&quot;&quot; class=&quot;ex&quot;&gt;X&lt;/var&gt;
+&lt;wbr data-role=&quot;&quot; class=&quot;ex&quot;&gt;X&lt;/wbr&gt;
+
+&lt;!-- ==================================================================================================== --&gt;
+&lt;!-- Abstract ARIA roles in alphabetical order; only generic role should be exposed on abstract roles --&gt;
+&lt;!-- ==================================================================================================== --&gt;
+&lt;div role=&quot;command&quot;     data-role=&quot;&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;
+&lt;div role=&quot;composite&quot;   data-role=&quot;&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;
+&lt;div role=&quot;input&quot;       data-role=&quot;&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;
+&lt;div role=&quot;landmark&quot;    data-role=&quot;&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;
+&lt;div role=&quot;range&quot;       data-role=&quot;&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;
+&lt;div role=&quot;roletype&quot;    data-role=&quot;&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;
+&lt;div role=&quot;section&quot;     data-role=&quot;&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;
+&lt;div role=&quot;sectionhead&quot; data-role=&quot;&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;
+&lt;div role=&quot;select&quot;      data-role=&quot;&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;
+&lt;div role=&quot;structure&quot;   data-role=&quot;&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;
+&lt;div role=&quot;widget&quot;      data-role=&quot;&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;
+&lt;div role=&quot;window&quot;      data-role=&quot;&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;
+
+
+&lt;!-- ==================================================================================================== --&gt;
+&lt;!-- Non-abstract ARIA roles in alphabetical order, excepting the need for nesting (e.g. row is with its grid parent) --&gt;
+&lt;!-- ==================================================================================================== --&gt;
+&lt;div role=&quot;alert&quot;                    data-role=&quot;alert&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;
+&lt;div role=&quot;alertdialog&quot;              data-role=&quot;alertdialog&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;
+&lt;div role=&quot;application&quot;              data-role=&quot;application&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;
+&lt;div role=&quot;article&quot;                  data-role=&quot;article&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;
+&lt;div role=&quot;banner&quot;                   data-role=&quot;banner&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;
+&lt;div role=&quot;button&quot;                   data-role=&quot;button&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;
+&lt;div role=&quot;checkbox&quot;                 data-role=&quot;checkbox&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;
+&lt;div role=&quot;combobox&quot;                 data-role=&quot;combobox&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;
+&lt;div role=&quot;complementary&quot;            data-role=&quot;complementary&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;
+&lt;div role=&quot;contentinfo&quot;              data-role=&quot;contentinfo&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;
+&lt;div role=&quot;definition&quot;               data-role=&quot;definition&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;
+&lt;div role=&quot;dialog&quot;                   data-role=&quot;dialog&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;
+&lt;div role=&quot;directory&quot;                data-role=&quot;list&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;&lt;!-- FIXME: should be directory --&gt;
+&lt;div role=&quot;document&quot;                 data-role=&quot;document&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;
+&lt;div role=&quot;form&quot;                     data-role=&quot;&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;&lt;!-- FIXME: should be form --&gt;
+&lt;div role=&quot;grid&quot;                     data-role=&quot;grid&quot; class=&quot;ex&quot;&gt;
+    &lt;div role=&quot;rowgroup&quot;             data-role=&quot;rowgroup&quot; class=&quot;ex&quot;&gt;
+        &lt;div role=&quot;row&quot;              data-role=&quot;row&quot; class=&quot;ex&quot;&gt;
+            &lt;div role=&quot;rowheader&quot;    data-role=&quot;gridcell&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;&lt;!-- FIXME: should be rowheader --&gt;
+            &lt;div role=&quot;columnheader&quot; data-role=&quot;gridcell&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;&lt;!-- FIXME: should be columnheader --&gt;
+            &lt;div role=&quot;gridcell&quot;     data-role=&quot;gridcell&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;
+        &lt;/div&gt;
+    &lt;/div&gt;
+&lt;/div&gt;
+&lt;div role=&quot;group&quot;                    data-role=&quot;group&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;
+&lt;div role=&quot;heading&quot;                  data-role=&quot;heading&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;
+&lt;div role=&quot;img&quot;                      data-role=&quot;img&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;
+&lt;div role=&quot;link&quot;                     data-role=&quot;link&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;
+&lt;div role=&quot;list&quot;                     data-role=&quot;list&quot; class=&quot;ex&quot;&gt;
+    &lt;div role=&quot;listitem&quot;             data-role=&quot;listitem&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;
+&lt;/div&gt;
+&lt;div role=&quot;listbox&quot; data-role=&quot;listbox&quot; class=&quot;ex&quot;&gt;
+    &lt;div role=&quot;option&quot;               data-role=&quot;option&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;
+&lt;/div&gt;
+&lt;div role=&quot;log&quot;                      data-role=&quot;log&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;
+&lt;div role=&quot;main&quot;                     data-role=&quot;main&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;
+&lt;div role=&quot;marquee&quot;                  data-role=&quot;marquee&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;
+&lt;div role=&quot;math&quot;                     data-role=&quot;math&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;
+&lt;div role=&quot;menu&quot;                     data-role=&quot;menu&quot; class=&quot;ex&quot;&gt;
+    &lt;div role=&quot;menuitem&quot;             data-role=&quot;menuitem&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;
+    &lt;div role=&quot;menuitemcheckbox&quot;     data-role=&quot;menuitemcheckbox&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;
+    &lt;div role=&quot;menuitemradio&quot;        data-role=&quot;menuitemradio&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;
+&lt;/div&gt;
+&lt;div role=&quot;menubar&quot;                  data-role=&quot;menubar&quot; class=&quot;ex&quot;&gt;
+    &lt;div role=&quot;menuitem&quot;             data-role=&quot;menuitem&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;
+    &lt;div role=&quot;menuitemcheckbox&quot;     data-role=&quot;menuitemcheckbox&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;
+    &lt;div role=&quot;menuitemradio&quot;        data-role=&quot;menuitemradio&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;
+&lt;/div&gt;
+&lt;div role=&quot;navigation&quot;               data-role=&quot;navigation&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;
+&lt;div role=&quot;note&quot;                     data-role=&quot;note&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;
+&lt;div role=&quot;presentation&quot;             data-role=&quot;&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;
+&lt;div role=&quot;progressbar&quot;              data-role=&quot;progressbar&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;
+&lt;div role=&quot;radiogroup&quot;               data-role=&quot;radiogroup&quot; class=&quot;ex&quot;&gt;
+    &lt;div role=&quot;radio&quot;                data-role=&quot;radio&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;
+&lt;/div&gt;
+&lt;div role=&quot;region&quot;                   data-role=&quot;region&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;
+&lt;div role=&quot;scrollbar&quot;                data-role=&quot;scrollbar&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;
+&lt;div role=&quot;search&quot;                   data-role=&quot;search&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;
+&lt;div role=&quot;separator&quot;                data-role=&quot;separator&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;
+&lt;div role=&quot;slider&quot;                   data-role=&quot;slider&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;
+&lt;div role=&quot;spinbutton&quot;               data-role=&quot;spinbutton&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;
+&lt;div role=&quot;status&quot;                   data-role=&quot;status&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;
+&lt;div role=&quot;tablist&quot;                  data-role=&quot;tablist&quot; class=&quot;ex&quot;&gt;
+    &lt;div role=&quot;tab&quot;                  data-role=&quot;tab&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;
+&lt;/div&gt;
+&lt;div role=&quot;tabpanel&quot;                 data-role=&quot;tabpanel&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;
+&lt;div role=&quot;textbox&quot;                  data-role=&quot;&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;&lt;!-- FIXME: should be textbox --&gt;
+&lt;div role=&quot;timer&quot;                    data-role=&quot;timer&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;
+&lt;div role=&quot;toolbar&quot;                  data-role=&quot;toolbar&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;
+&lt;div role=&quot;tooltip&quot;                  data-role=&quot;tooltip&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;
+&lt;div role=&quot;tree&quot;                     data-role=&quot;tree&quot; class=&quot;ex&quot;&gt;
+    &lt;div role=&quot;treeitem&quot;             data-role=&quot;treeitem&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;
+    &lt;div role=&quot;group&quot;                data-role=&quot;group&quot; class=&quot;ex&quot;&gt;
+        &lt;div role=&quot;treeitem&quot;         data-role=&quot;treeitem&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;
+    &lt;/div&gt;
+&lt;/div&gt;
+&lt;div role=&quot;treegrid&quot;                 data-role=&quot;grid&quot; class=&quot;ex&quot;&gt;&lt;!-- FIXME: should be treegrid --&gt;
+    &lt;div role=&quot;rowgroup&quot;             data-role=&quot;rowgroup&quot; class=&quot;ex&quot;&gt;
+        &lt;div role=&quot;row&quot;              data-role=&quot;row&quot; class=&quot;ex&quot;&gt;
+            &lt;div role=&quot;rowheader&quot;    data-role=&quot;gridcell&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;&lt;!-- FIXME: should be rowheader --&gt;
+            &lt;div role=&quot;columnheader&quot; data-role=&quot;gridcell&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;&lt;!-- FIXME: should be columnheader --&gt;
+            &lt;div role=&quot;gridcell&quot;     data-role=&quot;gridcell&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;
+        &lt;/div&gt;
+    &lt;/div&gt;
+&lt;/div&gt;
+
+
+&lt;!-- ==================================================================================================== --&gt;
+&lt;!-- generic role attribute parsing tests --&gt;
+&lt;!-- ==================================================================================================== --&gt;
+&lt;div role=&quot;button foo&quot;               data-role=&quot;button&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;
+&lt;div role=&quot;foo button bar&quot;           data-role=&quot;button&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;
+&lt;div role=&quot;foo  button  bar&quot;         data-role=&quot;button&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;&lt;!-- [sic] Two spaces in role string --&gt;
+
+&lt;!-- FIXME: These two should be button but fail b/c of http://webkit.org/b/128400 --&gt;
+&lt;div role=&quot;foo        button        bar&quot;         data-role=&quot;&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;&lt;!-- [sic] Tab chars in role string --&gt;
+&lt;div role=&quot;foo
+button
+bar&quot;                                 data-role=&quot;&quot; class=&quot;ex&quot;&gt;X&lt;/div&gt;&lt;!-- [sic] Newlines in role string --&gt;
+
+
+&lt;!-- ==================================================================================================== --&gt;
+&lt;!-- implicit role parsing tests --&gt;
+&lt;!-- ==================================================================================================== --&gt;
+&lt;img role=&quot;foo&quot; src=&quot;foo.png&quot;        data-role=&quot;img&quot; alt=&quot;X&quot; class=&quot;ex&quot;&gt;
+&lt;img role=&quot;foo bar&quot; src=&quot;foo.png&quot;    data-role=&quot;img&quot; alt=&quot;X&quot; class=&quot;ex&quot;&gt;
+&lt;img role=&quot;foo  bar&quot; src=&quot;foo.png&quot;    data-role=&quot;img&quot; alt=&quot;X&quot; class=&quot;ex&quot;&gt;&lt;!-- [sic] Two spaces in role string --&gt;
+&lt;img role=&quot;foo        bar&quot; src=&quot;foo.png&quot;   data-role=&quot;img&quot; alt=&quot;X&quot; class=&quot;ex&quot;&gt;&lt;!-- [sic] Newline in role string --&gt;
+&lt;img role=&quot;foo        
+bar&quot; src=&quot;foo.png&quot;                   data-role=&quot;img&quot; alt=&quot;X&quot; class=&quot;ex&quot;&gt;&lt;!-- [sic] Tab char in role string --&gt;
+&lt;img role=&quot;text&quot; src=&quot;foo.png&quot;       data-role=&quot;text&quot; alt=&quot;X&quot; class=&quot;ex&quot;&gt;
+&lt;img role=&quot;text img&quot; src=&quot;foo.png&quot;   data-role=&quot;text&quot; alt=&quot;X&quot; class=&quot;ex&quot;&gt;
+&lt;img role=&quot;img text&quot; src=&quot;foo.png&quot;   data-role=&quot;img&quot; alt=&quot;X&quot; class=&quot;ex&quot;&gt;
+&lt;img role=&quot;presentation&quot;             data-role=&quot;img&quot; data-note=&quot;[aria-label]&quot; alt=&quot;X&quot; src=&quot;foo.png&quot; aria-label=&quot;X&quot; class=&quot;ex&quot;&gt;&lt;!-- presentation with global attr should fallback to implicit role --&gt;
+&lt;a href=&quot;#&quot; role=&quot;foo bar&quot;           data-role=&quot;link&quot; class=&quot;ex&quot;&gt;X&lt;/a&gt;
+
+&lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
+&lt;script&gt;
+if (window.testRunner &amp;&amp; window.accessibilityController) {
+    description(&quot;This tests that native elements and ARIA overrides result in the same ARIA computed role, regardless of platform.&quot;)
+    var examples = document.querySelectorAll(&quot;.ex&quot;);
+    var el, contentAttrRoleString, axElement, computedAriaRole, output, expectedRole, expectation, result, note;
+    for (var i = 0, c = examples.length; i &lt; c; i++) {
+        el = examples[i];
+                el.id = &quot;ex&quot; + i
+
+        axElement = accessibilityController.accessibleElementById(el.id);
+        if (!axElement)
+                continue;
+
+        computedAriaRole = axElement.computedRoleString;
+
+        contentAttrRoleString = el.getAttribute(&quot;role&quot;);
+        note = el.getAttribute(&quot;data-note&quot;)
+        output = el.tagName.toLowerCase() + (contentAttrRoleString ? (&quot;[role=\&quot;&quot;+contentAttrRoleString+&quot;\&quot;]&quot;) : &quot;&quot;) + (note ? note : &quot;&quot;);
+        output += &quot; -&gt; &quot;;
+        output += computedAriaRole;
+        output += &quot;. &quot;;
+
+        expectedRole = &quot;&quot;;
+        if (el.hasAttribute(&quot;data-role&quot;)) {
+            expectedRole = el.getAttribute(&quot;data-role&quot;);
+        }
+
+        expectation = expectedRole;
+        matchedResults = (computedAriaRole == expectedRole)
+
+        result = document.getElementById('console');
+        if (matchedResults) {
+            result.innerText += &quot;PASS: &quot; + output + &quot;\n&quot;;
+        } else {
+            result.innerText += &quot;FAIL: &quot; + output + &quot;Expected: &quot; + expectation + &quot;.\n&quot;;
+        }
+    }
+
+    // Once tests are complete, hide all the example markup.
+    examples = document.querySelectorAll(&quot;.ex&quot;);
+    for (var i = 0, c = examples.length; i &lt; c; i++) {
+        el = examples[i];
+        el.style.display = &quot;none&quot;;
+    }
+}
+&lt;/script&gt;
+&lt;script src=&quot;../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsplatformgtkTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/gtk/TestExpectations (163890 => 163891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/gtk/TestExpectations        2014-02-11 18:59:17 UTC (rev 163890)
+++ trunk/LayoutTests/platform/gtk/TestExpectations        2014-02-11 19:27:12 UTC (rev 163891)
</span><span class="lines">@@ -1316,6 +1316,8 @@
</span><span class="cx"> 
</span><span class="cx"> webkit.org/b/106316 accessibility/render-counter-text.html [ Failure ]
</span><span class="cx"> 
</span><ins>+webkit.org/b/128420 accessibility/roles-computedRoleString.html [ Skip ]
+
</ins><span class="cx"> webkit.org/b/103927 http/tests/w3c/webperf/submission/Intel/resource-timing/test_resource_timing_cross_origin_resource_request.html [ Failure ]
</span><span class="cx"> webkit.org/b/103927 http/tests/w3c/webperf/submission/Intel/resource-timing/test_resource_timing_timing_allow_cross_origin_resource_request.html [ Failure ]
</span><span class="cx"> webkit.org/b/103927 http/tests/w3c/webperf/submission/Google/resource-timing/html/test_resource_attribute_order.html [ Failure ]
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (163890 => 163891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-02-11 18:59:17 UTC (rev 163890)
+++ trunk/Source/WebCore/ChangeLog        2014-02-11 19:27:12 UTC (rev 163891)
</span><span class="lines">@@ -1,3 +1,32 @@
</span><ins>+2014-02-11  James Craig  &lt;jcraig@apple.com&gt;
+
+        Web Inspector: AX: Accessibility Node Inspection
+        https://bugs.webkit.org/show_bug.cgi?id=127447
+
+        Reviewed by Timothy Hatcher.
+
+        New methods supporting WebCore::AccessibilityObject::computedRoleString()
+        used for Accessibility section in WebInspector Node Inspector. Other updates 
+        support the JSON interface for the WebInspectorUI feature.
+
+        Test: accessibility/roles-computedRoleString.html
+
+        * accessibility/AccessibilityObject.cpp:
+        (WebCore::initializeRoleMap):
+        (WebCore::ariaRoleMap):
+        (WebCore::reverseAriaRoleMap):
+        (WebCore::AccessibilityObject::ariaRoleToWebCoreRole):
+        (WebCore::AccessibilityObject::computedRoleString):
+        * accessibility/AccessibilityObject.h:
+        * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
+        (-[WebAccessibilityObjectWrapper computedRoleString]):
+        (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
+        * inspector/InspectorDOMAgent.cpp:
+        (WebCore::InspectorDOMAgent::getAccessibilityPropertiesForNode):
+        (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
+        * inspector/InspectorDOMAgent.h:
+        * inspector/protocol/DOM.json:
+
</ins><span class="cx"> 2014-02-10  Oliver Hunt  &lt;oliver@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Stop throwing when attempting to read instance properties directly from the prototype
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityObject.cpp (163890 => 163891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityObject.cpp        2014-02-11 18:59:17 UTC (rev 163890)
+++ trunk/Source/WebCore/accessibility/AccessibilityObject.cpp        2014-02-11 19:27:12 UTC (rev 163891)
</span><span class="lines">@@ -1610,14 +1610,22 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> typedef HashMap&lt;String, AccessibilityRole, CaseFoldingHash&gt; ARIARoleMap;
</span><ins>+typedef HashMap&lt;AccessibilityRole, String, DefaultHash&lt;int&gt;::Hash, WTF::UnsignedWithZeroKeyHashTraits&lt;int&gt;&gt; ARIAReverseRoleMap;
</ins><span class="cx"> 
</span><ins>+static ARIARoleMap* gAriaRoleMap = nullptr;
+static ARIAReverseRoleMap* gAriaReverseRoleMap = nullptr;
+
</ins><span class="cx"> struct RoleEntry {
</span><span class="cx">     String ariaRole;
</span><span class="cx">     AccessibilityRole webcoreRole;
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-static ARIARoleMap* createARIARoleMap()
</del><ins>+static void initializeRoleMap()
</ins><span class="cx"> {
</span><ins>+    if (gAriaRoleMap)
+        return;
+    ASSERT(!gAriaReverseRoleMap);
+
</ins><span class="cx">     const RoleEntry roles[] = {
</span><span class="cx">         { &quot;alert&quot;, ApplicationAlertRole },
</span><span class="cx">         { &quot;alertdialog&quot;, ApplicationAlertDialogRole },
</span><span class="lines">@@ -1681,26 +1689,39 @@
</span><span class="cx">         { &quot;treegrid&quot;, TreeGridRole },
</span><span class="cx">         { &quot;treeitem&quot;, TreeItemRole }
</span><span class="cx">     };
</span><del>-    ARIARoleMap* roleMap = new ARIARoleMap;
</del><span class="cx"> 
</span><del>-    for (size_t i = 0; i &lt; WTF_ARRAY_LENGTH(roles); ++i)
-        roleMap-&gt;set(roles[i].ariaRole, roles[i].webcoreRole);
-    return roleMap;
</del><ins>+    gAriaRoleMap = new ARIARoleMap;
+    gAriaReverseRoleMap = new ARIAReverseRoleMap;
+    size_t roleLength = WTF_ARRAY_LENGTH(roles);
+    for (size_t i = 0; i &lt; roleLength; ++i) {
+        gAriaRoleMap-&gt;set(roles[i].ariaRole, roles[i].webcoreRole);
+        gAriaReverseRoleMap-&gt;set(roles[i].webcoreRole, roles[i].ariaRole);
+    }
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+static ARIARoleMap&amp; ariaRoleMap()
+{
+    initializeRoleMap();
+    return *gAriaRoleMap;
+}
+
+static ARIAReverseRoleMap&amp; reverseAriaRoleMap()
+{
+    initializeRoleMap();
+    return *gAriaReverseRoleMap;
+}
+
</ins><span class="cx"> AccessibilityRole AccessibilityObject::ariaRoleToWebCoreRole(const String&amp; value)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(!value.isEmpty());
</span><span class="cx">     
</span><del>-    static const ARIARoleMap* roleMap = createARIARoleMap();
-
</del><span class="cx">     Vector&lt;String&gt; roleVector;
</span><span class="cx">     value.split(' ', roleVector);
</span><span class="cx">     AccessibilityRole role = UnknownRole;
</span><span class="cx">     unsigned size = roleVector.size();
</span><span class="cx">     for (unsigned i = 0; i &lt; size; ++i) {
</span><span class="cx">         String roleName = roleVector[i];
</span><del>-        role = roleMap-&gt;get(roleName);
</del><ins>+        role = ariaRoleMap().get(roleName);
</ins><span class="cx">         if (role)
</span><span class="cx">             return role;
</span><span class="cx">     }
</span><span class="lines">@@ -1708,6 +1729,12 @@
</span><span class="cx">     return role;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+String AccessibilityObject::computedRoleString() const
+{
+    // FIXME: Need a few special cases that aren't in the RoleMap: option, etc. http://webkit.org/b/128296
+    return reverseAriaRoleMap().get(roleValue());
+}
+
</ins><span class="cx"> bool AccessibilityObject::hasHighlighting() const
</span><span class="cx"> {
</span><span class="cx">     for (Node* node = this-&gt;node(); node; node = node-&gt;parentNode()) {
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilityAccessibilityObjecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/AccessibilityObject.h (163890 => 163891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/AccessibilityObject.h        2014-02-11 18:59:17 UTC (rev 163890)
+++ trunk/Source/WebCore/accessibility/AccessibilityObject.h        2014-02-11 19:27:12 UTC (rev 163891)
</span><span class="lines">@@ -805,6 +805,8 @@
</span><span class="cx"> 
</span><span class="cx">     unsigned doAXLineForIndex(unsigned);
</span><span class="cx"> 
</span><ins>+    String computedRoleString() const;
+
</ins><span class="cx">     virtual String stringValueForMSAA() const { return String(); }
</span><span class="cx">     virtual String stringRoleForMSAA() const { return String(); }
</span><span class="cx">     virtual String nameForMSAA() const { return String(); }
</span></span></pre></div>
<a id="trunkSourceWebCoreaccessibilitymacWebAccessibilityObjectWrapperMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm (163890 => 163891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm        2014-02-11 18:59:17 UTC (rev 163890)
+++ trunk/Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm        2014-02-11 19:27:12 UTC (rev 163891)
</span><span class="lines">@@ -2123,6 +2123,13 @@
</span><span class="cx">     return NSAccessibilityRoleDescription(NSAccessibilityUnknownRole, nil);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+- (NSString *)computedRoleString
+{
+    if (!m_object)
+        return nil;
+    return m_object-&gt;computedRoleString();
+}
+
</ins><span class="cx"> - (id)scrollViewParent
</span><span class="cx"> {
</span><span class="cx">     if (!m_object || !m_object-&gt;isAccessibilityScrollView())
</span><span class="lines">@@ -2160,6 +2167,10 @@
</span><span class="cx">     
</span><span class="cx">     if ([attributeName isEqualToString: NSAccessibilityRoleDescriptionAttribute])
</span><span class="cx">         return [self roleDescription];
</span><ins>+
+    // AXARIARole is only used by DumpRenderTree (so far).
+    if ([attributeName isEqualToString:@&quot;AXARIARole&quot;])
+        return [self computedRoleString];
</ins><span class="cx">     
</span><span class="cx">     if ([attributeName isEqualToString: NSAccessibilityParentAttribute]) {
</span><span class="cx">         
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorDOMAgentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp (163890 => 163891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp        2014-02-11 18:59:17 UTC (rev 163890)
+++ trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp        2014-02-11 19:27:12 UTC (rev 163891)
</span><span class="lines">@@ -34,6 +34,7 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;InspectorDOMAgent.h&quot;
</span><span class="cx"> 
</span><ins>+#include &quot;AXObjectCache.h&quot;
</ins><span class="cx"> #include &quot;Attr.h&quot;
</span><span class="cx"> #include &quot;CSSComputedStyleDeclaration.h&quot;
</span><span class="cx"> #include &quot;CSSPropertyNames.h&quot;
</span><span class="lines">@@ -874,6 +875,12 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void InspectorDOMAgent::getAccessibilityPropertiesForNode(ErrorString* errorString, int nodeId, RefPtr&lt;Inspector::TypeBuilder::DOM::AccessibilityProperties&gt;&amp; axProperties)
+{
+    Node* node = assertNode(errorString, nodeId);
+    axProperties = buildObjectForAccessibilityProperties(node);
+}
+
</ins><span class="cx"> void InspectorDOMAgent::performSearch(ErrorString* errorString, const String&amp; whitespaceTrimmedQuery, const RefPtr&lt;InspectorArray&gt;* nodeIds, String* searchId, int* resultCount)
</span><span class="cx"> {
</span><span class="cx">     // FIXME: Search works with node granularity - number of matches within node is not calculated.
</span><span class="lines">@@ -1399,6 +1406,40 @@
</span><span class="cx">     return value.release();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+PassRefPtr&lt;TypeBuilder::DOM::AccessibilityProperties&gt; InspectorDOMAgent::buildObjectForAccessibilityProperties(Node* node)
+{
+    ASSERT(node);
+    if (!node)
+        return nullptr;
+
+    if (!WebCore::AXObjectCache::accessibilityEnabled())
+        WebCore::AXObjectCache::enableAccessibility();
+
+    bool ignored = true;
+
+    // Computed ARIA Role
+    String role;
+
+    // Computed Label
+    // FIXME: Waiting on http://webkit.org/b/121134
+    String label;
+
+    if (AXObjectCache* axObjectCache = node-&gt;document().axObjectCache()) {
+        if (AccessibilityObject* axObject = axObjectCache-&gt;getOrCreate(node)) {
+            ignored = axObject-&gt;accessibilityIsIgnored();
+            role = axObject-&gt;computedRoleString();
+        }
+    }
+    
+    RefPtr&lt;Inspector::TypeBuilder::DOM::AccessibilityProperties&gt; value = Inspector::TypeBuilder::DOM::AccessibilityProperties::create()
+        .setIgnored(ignored)
+        .setRole(role)
+        .setLabel(label)
+        .setNodeId(pushNodePathToFrontend(node));
+
+    return value.release();
+}
+
</ins><span class="cx"> Node* InspectorDOMAgent::innerFirstChild(Node* node)
</span><span class="cx"> {
</span><span class="cx">     node = node-&gt;firstChild();
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorDOMAgenth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorDOMAgent.h (163890 => 163891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorDOMAgent.h        2014-02-11 18:59:17 UTC (rev 163890)
+++ trunk/Source/WebCore/inspector/InspectorDOMAgent.h        2014-02-11 19:27:12 UTC (rev 163891)
</span><span class="lines">@@ -131,6 +131,7 @@
</span><span class="cx">     virtual void setOuterHTML(ErrorString*, int nodeId, const String&amp; outerHTML) override;
</span><span class="cx">     virtual void setNodeValue(ErrorString*, int nodeId, const String&amp; value) override;
</span><span class="cx">     virtual void getEventListenersForNode(ErrorString*, int nodeId, const WTF::String* objectGroup, RefPtr&lt;Inspector::TypeBuilder::Array&lt;Inspector::TypeBuilder::DOM::EventListener&gt;&gt;&amp; listenersArray) override;
</span><ins>+    virtual void getAccessibilityPropertiesForNode(ErrorString*, int nodeId, RefPtr&lt;Inspector::TypeBuilder::DOM::AccessibilityProperties&gt;&amp; axProperties) override;
</ins><span class="cx">     virtual void performSearch(ErrorString*, const String&amp; whitespaceTrimmedQuery, const RefPtr&lt;Inspector::InspectorArray&gt;* nodeIds, String* searchId, int* resultCount) override;
</span><span class="cx">     virtual void getSearchResults(ErrorString*, const String&amp; searchId, int fromIndex, int toIndex, RefPtr&lt;Inspector::TypeBuilder::Array&lt;int&gt;&gt;&amp;) override;
</span><span class="cx">     virtual void discardSearchResults(ErrorString*, const String&amp; searchId) override;
</span><span class="lines">@@ -233,6 +234,7 @@
</span><span class="cx">     PassRefPtr&lt;Inspector::TypeBuilder::Array&lt;String&gt;&gt; buildArrayForElementAttributes(Element*);
</span><span class="cx">     PassRefPtr&lt;Inspector::TypeBuilder::Array&lt;Inspector::TypeBuilder::DOM::Node&gt;&gt; buildArrayForContainerChildren(Node* container, int depth, NodeToIdMap* nodesMap);
</span><span class="cx">     PassRefPtr&lt;Inspector::TypeBuilder::DOM::EventListener&gt; buildObjectForEventListener(const RegisteredEventListener&amp;, const AtomicString&amp; eventType, Node*, const String* objectGroupId);
</span><ins>+    PassRefPtr&lt;Inspector::TypeBuilder::DOM::AccessibilityProperties&gt; buildObjectForAccessibilityProperties(Node*);
</ins><span class="cx"> 
</span><span class="cx">     Node* nodeForPath(const String&amp; path);
</span><span class="cx">     Node* nodeForObjectId(const String&amp; objectId);
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorprotocolDOMjson"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/protocol/DOM.json (163890 => 163891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/protocol/DOM.json        2014-02-11 18:59:17 UTC (rev 163890)
+++ trunk/Source/WebCore/inspector/protocol/DOM.json        2014-02-11 19:27:12 UTC (rev 163891)
</span><span class="lines">@@ -55,6 +55,17 @@
</span><span class="cx">             &quot;description&quot;: &quot;DOM interaction is implemented in terms of mirror objects that represent the actual DOM nodes. DOMNode is a base node mirror type.&quot;
</span><span class="cx">         },
</span><span class="cx">         {
</span><ins>+            &quot;id&quot;: &quot;AccessibilityProperties&quot;,
+            &quot;description&quot;: &quot;A structure holding accessibility properties.&quot;,
+            &quot;type&quot;: &quot;object&quot;,
+            &quot;properties&quot;: [
+                { &quot;name&quot;: &quot;ignored&quot;, &quot;type&quot;: &quot;boolean&quot;, &quot;description&quot;: &quot;Returns whether the accessibility of the DOM node is ignored, whether heuristically or explicitly.&quot; },
+                { &quot;name&quot;: &quot;role&quot;, &quot;type&quot;: &quot;string&quot;, &quot;description&quot;: &quot;Computed value for first recognized role token, default role per element, or overridden role.&quot; },
+                { &quot;name&quot;: &quot;label&quot;, &quot;type&quot;: &quot;string&quot;, &quot;description&quot;: &quot;Computed label value for the node, sometimes calculated by referencing other nodes.&quot; },
+                { &quot;name&quot;: &quot;nodeId&quot;, &quot;$ref&quot;: &quot;NodeId&quot;, &quot;description&quot;: &quot;Target &lt;code&gt;DOMNode&lt;/code&gt; id.&quot; }
+            ]
+        },
+        {
</ins><span class="cx">             &quot;id&quot;: &quot;RGBA&quot;,
</span><span class="cx">             &quot;type&quot;: &quot;object&quot;,
</span><span class="cx">             &quot;properties&quot;: [
</span><span class="lines">@@ -188,6 +199,16 @@
</span><span class="cx">             &quot;description&quot;: &quot;Returns event listeners relevant to the node.&quot;
</span><span class="cx">         },
</span><span class="cx">         {
</span><ins>+            &quot;name&quot;: &quot;getAccessibilityPropertiesForNode&quot;,
+            &quot;description&quot;: &quot;Returns a dictionary of accessibility properties for the node.&quot;,
+            &quot;parameters&quot;: [
+                { &quot;name&quot;: &quot;nodeId&quot;, &quot;$ref&quot;: &quot;NodeId&quot;, &quot;description&quot;: &quot;Id of the node for which to get accessibility properties.&quot; }
+            ],
+            &quot;returns&quot;: [
+                { &quot;name&quot;: &quot;properties&quot;, &quot;$ref&quot;: &quot;AccessibilityProperties&quot;, &quot;description&quot;: &quot;Dictionary of relevant accessibility properties.&quot; }
+            ]
+        },
+        {
</ins><span class="cx">             &quot;name&quot;: &quot;getOuterHTML&quot;,
</span><span class="cx">             &quot;parameters&quot;: [
</span><span class="cx">                 { &quot;name&quot;: &quot;nodeId&quot;, &quot;$ref&quot;: &quot;NodeId&quot;, &quot;description&quot;: &quot;Id of the node to get markup for.&quot; }
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/ChangeLog (163890 => 163891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/ChangeLog        2014-02-11 18:59:17 UTC (rev 163890)
+++ trunk/Source/WebInspectorUI/ChangeLog        2014-02-11 19:27:12 UTC (rev 163891)
</span><span class="lines">@@ -1,3 +1,21 @@
</span><ins>+2014-02-11  James Craig  &lt;jcraig@apple.com&gt;
+
+        Web Inspector: AX: Accessibility Node Inspection
+        https://bugs.webkit.org/show_bug.cgi?id=127447
+
+        Reviewed by Timothy Hatcher.
+
+        New Accessibility section in WebInspector Node Inspector.
+        Version 1.0 only shows computed role. Computed label should come soon.
+
+        Removed CSS fixed table layout b/c CSS bug: http://webkit.org/b/128294
+
+        * Localizations/en.lproj/localizedStrings.js:
+        * UserInterface/DOMNode.js:
+        * UserInterface/DOMNodeDetailsSidebarPanel.js:
+        * UserInterface/DetailsSection.css:
+        * UserInterface/InspectorWebBackendCommands.js:
+
</ins><span class="cx"> 2014-02-10  Joseph Pecoraro  &lt;pecoraro@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Web Inspector: Update License copyrights in minified JavaScript
</span></span></pre></div>
<a id="trunkSourceWebInspectorUILocalizationsenlprojlocalizedStringsjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js (163890 => 163891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js        2014-02-11 18:59:17 UTC (rev 163890)
+++ trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js        2014-02-11 19:27:12 UTC (rev 163891)
</span><span class="lines">@@ -23,10 +23,13 @@
</span><span class="cx"> localizedStrings[&quot;%fpx&quot;] = &quot;%fpx&quot;;
</span><span class="cx"> localizedStrings[&quot;%fpx\xB2&quot;] = &quot;%fpx\xB2&quot;;
</span><span class="cx"> localizedStrings[&quot;%s Event Dispatched&quot;] = &quot;%s Event Dispatched&quot;;
</span><ins>+localizedStrings[&quot;%s (computed)&quot;] = &quot;%s (computed)&quot;;
+localizedStrings[&quot;%s (default)&quot;] = &quot;%s (default)&quot;;
</ins><span class="cx"> localizedStrings[&quot;(anonymous function)&quot;] = &quot;(anonymous function)&quot;;
</span><span class="cx"> localizedStrings[&quot;(program)&quot;] = &quot;(program)&quot;;
</span><span class="cx"> localizedStrings[&quot;1 match&quot;] = &quot;1 match&quot;;
</span><span class="cx"> localizedStrings[&quot;999+&quot;] = &quot;999+&quot;;
</span><ins>+localizedStrings[&quot;Accessibility&quot;] = &quot;Accessibility&quot;;
</ins><span class="cx"> localizedStrings[&quot;Action&quot;] = &quot;Action&quot;;
</span><span class="cx"> localizedStrings[&quot;Activity Viewer&quot;] = &quot;Activity Viewer&quot;;
</span><span class="cx"> localizedStrings[&quot;Add Action&quot;] = &quot;Add Action&quot;;
</span><span class="lines">@@ -215,6 +218,7 @@
</span><span class="cx"> localizedStrings[&quot;JavaScript &amp; Events&quot;] = &quot;JavaScript &amp; Events&quot;;
</span><span class="cx"> localizedStrings[&quot;JavaScript profiles show where the execution time is spent in your page's JavaScript functions.&quot;] = &quot;JavaScript profiles show where the execution time is spent in your page's JavaScript functions.&quot;;
</span><span class="cx"> localizedStrings[&quot;Key&quot;] = &quot;Key&quot;;
</span><ins>+localizedStrings[&quot;Label&quot;] = &quot;Label&quot;;
</ins><span class="cx"> localizedStrings[&quot;Latency&quot;] = &quot;Latency&quot;;
</span><span class="cx"> localizedStrings[&quot;Layer&quot;] = &quot;Layer&quot;;
</span><span class="cx"> localizedStrings[&quot;Layer Info&quot;] = &quot;Layer Info&quot;;
</span><span class="lines">@@ -248,12 +252,14 @@
</span><span class="cx"> localizedStrings[&quot;Network Requests&quot;] = &quot;Network Requests&quot;;
</span><span class="cx"> localizedStrings[&quot;New Rule&quot;] = &quot;New Rule&quot;;
</span><span class="cx"> localizedStrings[&quot;No&quot;] = &quot;No&quot;;
</span><ins>+localizedStrings[&quot;No Accessibility Information&quot;] = &quot;No Accessibility Information&quot;;
</ins><span class="cx"> localizedStrings[&quot;No Application Cache information available&quot;] = &quot;No Application Cache information available&quot;;
</span><span class="cx"> localizedStrings[&quot;No Attributes&quot;] = &quot;No Attributes&quot;;
</span><span class="cx"> localizedStrings[&quot;No Box Model Information&quot;] = &quot;No Box Model Information&quot;;
</span><span class="cx"> localizedStrings[&quot;No Call Frames&quot;] = &quot;No Call Frames&quot;;
</span><span class="cx"> localizedStrings[&quot;No Child Layers&quot;] = &quot;No Child Layers&quot;;
</span><span class="cx"> localizedStrings[&quot;No Event Listeners&quot;] = &quot;No Event Listeners&quot;;
</span><ins>+localizedStrings[&quot;No exact ARIA role match.&quot;] = &quot;No exact ARIA role match.&quot;;
</ins><span class="cx"> localizedStrings[&quot;No Filter Results&quot;] = &quot;No Filter Results&quot;;
</span><span class="cx"> localizedStrings[&quot;No Layer Available&quot;] = &quot;No Layer Available&quot;;
</span><span class="cx"> localizedStrings[&quot;No Parameters&quot;] = &quot;No Parameters&quot;;
</span><span class="lines">@@ -313,6 +319,7 @@
</span><span class="cx"> localizedStrings[&quot;Reveal in DOM Tree&quot;] = &quot;Reveal in DOM Tree&quot;;
</span><span class="cx"> localizedStrings[&quot;Reveal in Debugger Navigation Sidebar&quot;] = &quot;Reveal in Debugger Navigation Sidebar&quot;;
</span><span class="cx"> localizedStrings[&quot;Reveal in Original Resource&quot;] = &quot;Reveal in Original Resource&quot;;
</span><ins>+localizedStrings[&quot;Role&quot;] = &quot;Role&quot;;
</ins><span class="cx"> localizedStrings[&quot;Rules&quot;] = &quot;Rules&quot;;
</span><span class="cx"> localizedStrings[&quot;Scheme&quot;] = &quot;Scheme&quot;;
</span><span class="cx"> localizedStrings[&quot;Scope Chain&quot;] = &quot;Scope Chain&quot;;
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceDOMNodejs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/DOMNode.js (163890 => 163891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/DOMNode.js        2014-02-11 18:59:17 UTC (rev 163890)
+++ trunk/Source/WebInspectorUI/UserInterface/DOMNode.js        2014-02-11 19:27:12 UTC (rev 163891)
</span><span class="lines">@@ -441,6 +441,21 @@
</span><span class="cx">         DOMAgent.getEventListenersForNode(this.id, callback);
</span><span class="cx">     },
</span><span class="cx"> 
</span><ins>+    accessibilityProperties: function(callback)
+    {
+        function accessibilityPropertiesCallback(error, accessibilityProperties)
+        {
+            if (!error &amp;&amp; callback) {
+                callback({
+                    ignored: accessibilityProperties.ignored,
+                    role: accessibilityProperties.role,
+                    label: accessibilityProperties.label
+                });
+            }
+        }
+        DOMAgent.getAccessibilityPropertiesForNode(this.id, accessibilityPropertiesCallback.bind(this));
+    },
+
</ins><span class="cx">     /**
</span><span class="cx">      * @return {string}
</span><span class="cx">      */
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceDOMNodeDetailsSidebarPaneljs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/DOMNodeDetailsSidebarPanel.js (163890 => 163891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/DOMNodeDetailsSidebarPanel.js        2014-02-11 18:59:17 UTC (rev 163890)
+++ trunk/Source/WebInspectorUI/UserInterface/DOMNodeDetailsSidebarPanel.js        2014-02-11 19:27:12 UTC (rev 163891)
</span><span class="lines">@@ -51,10 +51,18 @@
</span><span class="cx">     this._eventListenersSectionGroup = new WebInspector.DetailsSectionGroup;
</span><span class="cx">     var eventListenersSection = new WebInspector.DetailsSection(&quot;dom-node-event-listeners&quot;, WebInspector.UIString(&quot;Event Listeners&quot;), [this._eventListenersSectionGroup]);    
</span><span class="cx"> 
</span><ins>+    this._accessibilityEmptyRow = new WebInspector.DetailsSectionRow(WebInspector.UIString(&quot;No Accessibility Information&quot;));
+    this._accessibilityNodeComputedLabelRow = new WebInspector.DetailsSectionSimpleRow(WebInspector.UIString(&quot;Label&quot;));
+    this._accessibilityNodeComputedRoleRow = new WebInspector.DetailsSectionSimpleRow(WebInspector.UIString(&quot;Role&quot;));
+    
+    this._accessibilityGroup = new WebInspector.DetailsSectionGroup([this._accessibilityEmptyRow]);
+    var accessibilitySection = new WebInspector.DetailsSection(&quot;dom-node-accessibility&quot;, WebInspector.UIString(&quot;Accessibility&quot;), [this._accessibilityGroup]);    
+    
</ins><span class="cx">     this.element.appendChild(identitySection.element);
</span><span class="cx">     this.element.appendChild(attributesSection.element);
</span><span class="cx">     this.element.appendChild(propertiesSection.element);
</span><span class="cx">     this.element.appendChild(eventListenersSection.element);
</span><ins>+    this.element.appendChild(accessibilitySection.element);
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> WebInspector.DOMNodeDetailsSidebarPanel.StyleClassName = &quot;dom-node&quot;;
</span><span class="lines">@@ -78,6 +86,7 @@
</span><span class="cx">         this._refreshAttributes();
</span><span class="cx">         this._refreshProperties();
</span><span class="cx">         this._refreshEventListeners();
</span><ins>+        this._refreshAccessibility();
</ins><span class="cx">     },
</span><span class="cx"> 
</span><span class="cx">     // Private
</span><span class="lines">@@ -223,11 +232,53 @@
</span><span class="cx">         }
</span><span class="cx">     },
</span><span class="cx"> 
</span><ins>+    _refreshAccessibility: function()
+    {
+        var domNode = this.domNode;
+        if (!domNode)
+            return;
+
+        function accessibilityPropertiesCallback(accessibilityProperties)
+        {
+            if (this.domNode !== domNode)
+                return;
+
+            if (accessibilityProperties &amp;&amp; !accessibilityProperties.ignored) {
+                var role = accessibilityProperties.role;
+
+                if (role === &quot;&quot; || role === &quot;unknown&quot;)
+                    role = WebInspector.UIString(&quot;No exact ARIA role match.&quot;);
+                else if (role) {
+                    if (!domNode.getAttribute(&quot;role&quot;))
+                        role = WebInspector.UIString(&quot;%s (default)&quot;).format(role);
+                    else if (domNode.getAttribute(&quot;role&quot;) !== role)
+                        role = WebInspector.UIString(&quot;%s (computed)&quot;).format(role);
+                }
+                
+                // FIXME: label will always come back as empty. Blocked by http://webkit.org/b/121134
+                var label = accessibilityProperties.label;
+                if (label &amp;&amp; label !== domNode.getAttribute(&quot;aria-label&quot;))
+                    label = WebInspector.UIString(&quot;%s (computed)&quot;).format(label);
+
+                this._accessibilityNodeComputedLabelRow.value = label;
+                this._accessibilityNodeComputedRoleRow.value = role;
+
+                this._accessibilityGroup.rows = [this._accessibilityNodeComputedLabelRow, this._accessibilityNodeComputedRoleRow];
+                this._accessibilityEmptyRow.hideEmptyMessage();
+            } else {
+                this._accessibilityGroup.rows = [this._accessibilityEmptyRow];
+                this._accessibilityEmptyRow.showEmptyMessage();
+            }
+        }
+        domNode.accessibilityProperties(accessibilityPropertiesCallback.bind(this));
+    },
+
</ins><span class="cx">     _attributesChanged: function(event)
</span><span class="cx">     {
</span><span class="cx">         if (event.data.node !== this.domNode)
</span><span class="cx">             return;
</span><span class="cx">         this._refreshAttributes();
</span><ins>+        this._refreshAccessibility();
</ins><span class="cx">     },
</span><span class="cx"> 
</span><span class="cx">     _nodeTypeDisplayName: function()
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceDetailsSectioncss"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/DetailsSection.css (163890 => 163891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/DetailsSection.css        2014-02-11 18:59:17 UTC (rev 163890)
+++ trunk/Source/WebInspectorUI/UserInterface/DetailsSection.css        2014-02-11 19:27:12 UTC (rev 163891)
</span><span class="lines">@@ -123,7 +123,6 @@
</span><span class="cx"> 
</span><span class="cx"> .details-section &gt; .content {
</span><span class="cx">     display: table;
</span><del>-    table-layout: fixed;
</del><span class="cx">     width: 100%;
</span><span class="cx">     border-spacing: 0;
</span><span class="cx">     border-collapse: collapse;
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceInspectorWebBackendCommandsjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/InspectorWebBackendCommands.js (163890 => 163891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/InspectorWebBackendCommands.js        2014-02-11 18:59:17 UTC (rev 163890)
+++ trunk/Source/WebInspectorUI/UserInterface/InspectorWebBackendCommands.js        2014-02-11 19:27:12 UTC (rev 163891)
</span><span class="lines">@@ -87,6 +87,7 @@
</span><span class="cx"> InspectorBackend.registerCommand(&quot;DOM.setAttributesAsText&quot;, [{&quot;name&quot;: &quot;nodeId&quot;, &quot;type&quot;: &quot;number&quot;, &quot;optional&quot;: false}, {&quot;name&quot;: &quot;text&quot;, &quot;type&quot;: &quot;string&quot;, &quot;optional&quot;: false}, {&quot;name&quot;: &quot;name&quot;, &quot;type&quot;: &quot;string&quot;, &quot;optional&quot;: true}], []);
</span><span class="cx"> InspectorBackend.registerCommand(&quot;DOM.removeAttribute&quot;, [{&quot;name&quot;: &quot;nodeId&quot;, &quot;type&quot;: &quot;number&quot;, &quot;optional&quot;: false}, {&quot;name&quot;: &quot;name&quot;, &quot;type&quot;: &quot;string&quot;, &quot;optional&quot;: false}], []);
</span><span class="cx"> InspectorBackend.registerCommand(&quot;DOM.getEventListenersForNode&quot;, [{&quot;name&quot;: &quot;nodeId&quot;, &quot;type&quot;: &quot;number&quot;, &quot;optional&quot;: false}, {&quot;name&quot;: &quot;objectGroup&quot;, &quot;type&quot;: &quot;string&quot;, &quot;optional&quot;: true}], [&quot;listeners&quot;]);
</span><ins>+InspectorBackend.registerCommand(&quot;DOM.getAccessibilityPropertiesForNode&quot;, [{&quot;name&quot;: &quot;nodeId&quot;, &quot;type&quot;: &quot;number&quot;, &quot;optional&quot;: false}], [&quot;properties&quot;]);
</ins><span class="cx"> InspectorBackend.registerCommand(&quot;DOM.getOuterHTML&quot;, [{&quot;name&quot;: &quot;nodeId&quot;, &quot;type&quot;: &quot;number&quot;, &quot;optional&quot;: false}], [&quot;outerHTML&quot;]);
</span><span class="cx"> InspectorBackend.registerCommand(&quot;DOM.setOuterHTML&quot;, [{&quot;name&quot;: &quot;nodeId&quot;, &quot;type&quot;: &quot;number&quot;, &quot;optional&quot;: false}, {&quot;name&quot;: &quot;outerHTML&quot;, &quot;type&quot;: &quot;string&quot;, &quot;optional&quot;: false}], []);
</span><span class="cx"> InspectorBackend.registerCommand(&quot;DOM.performSearch&quot;, [{&quot;name&quot;: &quot;query&quot;, &quot;type&quot;: &quot;string&quot;, &quot;optional&quot;: false}, {&quot;name&quot;: &quot;nodeIds&quot;, &quot;type&quot;: &quot;object&quot;, &quot;optional&quot;: true}], [&quot;searchId&quot;, &quot;resultCount&quot;]);
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (163890 => 163891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2014-02-11 18:59:17 UTC (rev 163890)
+++ trunk/Tools/ChangeLog        2014-02-11 19:27:12 UTC (rev 163891)
</span><span class="lines">@@ -1,3 +1,25 @@
</span><ins>+2014-02-11  James Craig  &lt;jcraig@apple.com&gt;
+
+        Web Inspector: AX: Accessibility Node Inspection
+        https://bugs.webkit.org/show_bug.cgi?id=127447
+
+        Reviewed by Timothy Hatcher.
+
+        New computedRoleString interfaces in DumpRenderTree/WebKitTestRunner
+        to support LayoutTest coverage of AccessibilityObject::computedRoleString()
+
+        * DumpRenderTree/AccessibilityUIElement.cpp:
+        * DumpRenderTree/AccessibilityUIElement.h:
+        * DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:
+        * DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
+        * DumpRenderTree/mac/AccessibilityUIElementMac.mm:
+        * DumpRenderTree/win/AccessibilityUIElementWin.cpp:
+        * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
+        * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
+        * WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
+        * WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
+        * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
+
</ins><span class="cx"> 2014-02-11  Carlos Garcia Campos  &lt;cgarcia@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed. Fix /webkit2/WebKitWebExtension/isolated-world after r163797.
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreeAccessibilityUIElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/AccessibilityUIElement.cpp (163890 => 163891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/AccessibilityUIElement.cpp        2014-02-11 18:59:17 UTC (rev 163890)
+++ trunk/Tools/DumpRenderTree/AccessibilityUIElement.cpp        2014-02-11 19:27:12 UTC (rev 163891)
</span><span class="lines">@@ -882,6 +882,12 @@
</span><span class="cx">     return JSValueMakeString(context, roleDesc.get());
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+static JSValueRef getComputedRoleStringCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
+{
+    JSRetainPtr&lt;JSStringRef&gt; compRole(Adopt, toAXElement(thisObject)-&gt;computedRoleString());
+    return JSValueMakeString(context, compRole.get());
+}
+
</ins><span class="cx"> static JSValueRef getTitleCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
</span><span class="cx"> {
</span><span class="cx">     JSRetainPtr&lt;JSStringRef&gt; title(Adopt, toAXElement(thisObject)-&gt;title());
</span><span class="lines">@@ -1417,6 +1423,7 @@
</span><span class="cx">         { &quot;role&quot;, getRoleCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
</span><span class="cx">         { &quot;subrole&quot;, getSubroleCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
</span><span class="cx">         { &quot;roleDescription&quot;, getRoleDescriptionCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
</span><ins>+        { &quot;computedRoleString&quot;, getComputedRoleStringCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
</ins><span class="cx">         { &quot;title&quot;, getTitleCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
</span><span class="cx">         { &quot;description&quot;, getDescriptionCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
</span><span class="cx">         { &quot;language&quot;, getLanguageCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreeAccessibilityUIElementh"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/AccessibilityUIElement.h (163890 => 163891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/AccessibilityUIElement.h        2014-02-11 18:59:17 UTC (rev 163890)
+++ trunk/Tools/DumpRenderTree/AccessibilityUIElement.h        2014-02-11 19:27:12 UTC (rev 163891)
</span><span class="lines">@@ -117,6 +117,7 @@
</span><span class="cx">     JSStringRef role();
</span><span class="cx">     JSStringRef subrole();
</span><span class="cx">     JSStringRef roleDescription();
</span><ins>+    JSStringRef computedRoleString();
</ins><span class="cx">     JSStringRef title();
</span><span class="cx">     JSStringRef description();
</span><span class="cx">     JSStringRef language();
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreeatkAccessibilityUIElementAtkcpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/atk/AccessibilityUIElementAtk.cpp (163890 => 163891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/atk/AccessibilityUIElementAtk.cpp        2014-02-11 18:59:17 UTC (rev 163890)
+++ trunk/Tools/DumpRenderTree/atk/AccessibilityUIElementAtk.cpp        2014-02-11 19:27:12 UTC (rev 163891)
</span><span class="lines">@@ -751,6 +751,12 @@
</span><span class="cx">     return nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+JSStringRef AccessibilityUIElement::computedRoleString()
+{
+    // FIXME: implement http://webkit.org/b/128420
+    return nullptr;
+}
+
</ins><span class="cx"> JSStringRef AccessibilityUIElement::title()
</span><span class="cx"> {
</span><span class="cx">     if (!ATK_IS_OBJECT(m_element))
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreeiosAccessibilityUIElementIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/ios/AccessibilityUIElementIOS.mm (163890 => 163891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/ios/AccessibilityUIElementIOS.mm        2014-02-11 18:59:17 UTC (rev 163890)
+++ trunk/Tools/DumpRenderTree/ios/AccessibilityUIElementIOS.mm        2014-02-11 19:27:12 UTC (rev 163891)
</span><span class="lines">@@ -473,6 +473,12 @@
</span><span class="cx">     return JSStringCreateWithCharacters(0, 0);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+JSStringRef AccessibilityUIElement::computedRoleString()
+{
+    // FIXME: implement
+    return JSStringCreateWithCharacters(0, 0);
+}
+
</ins><span class="cx"> JSStringRef AccessibilityUIElement::title()
</span><span class="cx"> {
</span><span class="cx">     return JSStringCreateWithCharacters(0, 0);
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreemacAccessibilityUIElementMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm (163890 => 163891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm        2014-02-11 18:59:17 UTC (rev 163890)
+++ trunk/Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm        2014-02-11 19:27:12 UTC (rev 163891)
</span><span class="lines">@@ -627,6 +627,16 @@
</span><span class="cx">     return nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+JSStringRef AccessibilityUIElement::computedRoleString()
+{
+    BEGIN_AX_OBJC_EXCEPTIONS
+    NSString *computedRoleString = descriptionOfValue([m_element accessibilityAttributeValue:@&quot;AXARIARole&quot;], m_element);
+    return [computedRoleString createJSStringRef];
+    END_AX_OBJC_EXCEPTIONS
+    
+    return nullptr;
+}
+
</ins><span class="cx"> JSStringRef AccessibilityUIElement::title()
</span><span class="cx"> {
</span><span class="cx">     BEGIN_AX_OBJC_EXCEPTIONS
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreewinAccessibilityUIElementWincpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/win/AccessibilityUIElementWin.cpp (163890 => 163891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/win/AccessibilityUIElementWin.cpp        2014-02-11 18:59:17 UTC (rev 163890)
+++ trunk/Tools/DumpRenderTree/win/AccessibilityUIElementWin.cpp        2014-02-11 19:27:12 UTC (rev 163891)
</span><span class="lines">@@ -286,6 +286,11 @@
</span><span class="cx">     return 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+JSStringRef AccessibilityUIElement::computedRoleString()
+{
+    return 0;
+}
+
</ins><span class="cx"> JSStringRef AccessibilityUIElement::title()
</span><span class="cx"> {
</span><span class="cx">     if (!m_element)
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundleAccessibilityUIElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp (163890 => 163891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp        2014-02-11 18:59:17 UTC (rev 163890)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp        2014-02-11 19:27:12 UTC (rev 163891)
</span><span class="lines">@@ -99,6 +99,7 @@
</span><span class="cx"> JSRetainPtr&lt;JSStringRef&gt; AccessibilityUIElement::role() { return 0; }
</span><span class="cx"> JSRetainPtr&lt;JSStringRef&gt; AccessibilityUIElement::subrole() { return 0; }
</span><span class="cx"> JSRetainPtr&lt;JSStringRef&gt; AccessibilityUIElement::roleDescription() { return 0; }
</span><ins>+JSRetainPtr&lt;JSStringRef&gt; AccessibilityUIElement::computedRoleString() { return 0; }
</ins><span class="cx"> JSRetainPtr&lt;JSStringRef&gt; AccessibilityUIElement::title() { return 0; }
</span><span class="cx"> JSRetainPtr&lt;JSStringRef&gt; AccessibilityUIElement::description() { return 0; }
</span><span class="cx"> JSRetainPtr&lt;JSStringRef&gt; AccessibilityUIElement::language() { return 0; }
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundleAccessibilityUIElementh"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h (163890 => 163891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h        2014-02-11 18:59:17 UTC (rev 163890)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h        2014-02-11 19:27:12 UTC (rev 163891)
</span><span class="lines">@@ -113,6 +113,7 @@
</span><span class="cx">     JSRetainPtr&lt;JSStringRef&gt; role();
</span><span class="cx">     JSRetainPtr&lt;JSStringRef&gt; subrole();
</span><span class="cx">     JSRetainPtr&lt;JSStringRef&gt; roleDescription();
</span><ins>+    JSRetainPtr&lt;JSStringRef&gt; computedRoleString();
</ins><span class="cx">     JSRetainPtr&lt;JSStringRef&gt; title();
</span><span class="cx">     JSRetainPtr&lt;JSStringRef&gt; description();
</span><span class="cx">     JSRetainPtr&lt;JSStringRef&gt; language();
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundleBindingsAccessibilityUIElementidl"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl (163890 => 163891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl        2014-02-11 18:59:17 UTC (rev 163890)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl        2014-02-11 19:27:12 UTC (rev 163891)
</span><span class="lines">@@ -43,6 +43,7 @@
</span><span class="cx">     readonly attribute DOMString role;
</span><span class="cx">     readonly attribute DOMString subrole;
</span><span class="cx">     readonly attribute DOMString roleDescription;
</span><ins>+    readonly attribute DOMString computedRoleString;
</ins><span class="cx">     readonly attribute DOMString title;
</span><span class="cx">     readonly attribute DOMString description;
</span><span class="cx">     readonly attribute DOMString language;
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundleatkAccessibilityUIElementAtkcpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp (163890 => 163891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp        2014-02-11 18:59:17 UTC (rev 163890)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp        2014-02-11 19:27:12 UTC (rev 163891)
</span><span class="lines">@@ -913,6 +913,12 @@
</span><span class="cx">     return JSStringCreateWithCharacters(0, 0);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+JSRetainPtr&lt;JSStringRef&gt; AccessibilityUIElement::computedRoleString()
+{
+    // FIXME: implement http://webkit.org/b/128420
+    return JSStringCreateWithCharacters(0, 0);
+}
+
</ins><span class="cx"> JSRetainPtr&lt;JSStringRef&gt; AccessibilityUIElement::title()
</span><span class="cx"> {
</span><span class="cx">     if (!ATK_IS_OBJECT(m_element.get()))
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundleiosAccessibilityUIElementIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm (163890 => 163891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm        2014-02-11 18:59:17 UTC (rev 163890)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm        2014-02-11 19:27:12 UTC (rev 163891)
</span><span class="lines">@@ -253,6 +253,12 @@
</span><span class="cx">     return JSStringCreateWithCharacters(0, 0);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+JSStringRef AccessibilityUIElement::computedRoleString()
+{
+    // FIXME: implement
+    return JSStringCreateWithCharacters(0, 0);
+}
+
</ins><span class="cx"> JSRetainPtr&lt;JSStringRef&gt; AccessibilityUIElement::title()
</span><span class="cx"> {
</span><span class="cx">     return JSStringCreateWithCharacters(0, 0);
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundlemacAccessibilityUIElementMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm (163890 => 163891)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm        2014-02-11 18:59:17 UTC (rev 163890)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm        2014-02-11 19:27:12 UTC (rev 163891)
</span><span class="lines">@@ -671,6 +671,16 @@
</span><span class="cx">     return nullptr;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+JSRetainPtr&lt;JSStringRef&gt; AccessibilityUIElement::computedRoleString()
+{
+    BEGIN_AX_OBJC_EXCEPTIONS
+    NSString *computedRoleString = descriptionOfValue([m_element accessibilityAttributeValue:@&quot;AXARIARole&quot;], m_element);
+    return [computedRoleString createJSStringRef];
+    END_AX_OBJC_EXCEPTIONS
+    
+    return nullptr;
+}
+
</ins><span class="cx"> JSRetainPtr&lt;JSStringRef&gt; AccessibilityUIElement::title()
</span><span class="cx"> {
</span><span class="cx">     BEGIN_AX_OBJC_EXCEPTIONS
</span></span></pre>
</div>
</div>

</body>
</html>