<!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>[207553] 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/207553">207553</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2016-10-19 11:59:23 -0700 (Wed, 19 Oct 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>Web Inspector: AXI: expose computed tree node and heading level
https://bugs.webkit.org/show_bug.cgi?id=130825
<rdar://problem/16442349>
Patch by Aaron Chu <aaron_chu@apple.com> on 2016-10-19
Reviewed by Joseph Pecoraro.
Source/JavaScriptCore:
Exposing two new accessibility properties: Heading Level and Hierarchical Level.
* inspector/protocol/DOM.json:
Source/WebCore:
Exposing two new accessibility properties: Heading Level and Hierarchical Level.
Updated Test: LayoutTest/inspector/dom/getAccessibilityPropertiesForNode.html
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
Source/WebInspectorUI:
Updating the Web Accessibility Inspector to display Heading Level and Hierarchical Level.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Models/DOMNode.js:
(WebInspector.DOMNode.prototype.accessibilityProperties.accessibilityPropertiesCallback):
(WebInspector.DOMNode.prototype.accessibilityProperties):
* UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
(WebInspector.DOMNodeDetailsSidebarPanel):
(WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshAccessibility.accessibilityPropertiesCallback):
(WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshAccessibility):
LayoutTests:
Included logging of the two newly exposed accessibility properties:
Heading Level and Hierarchical Level.
* inspector/dom/getAccessibilityPropertiesForNode-expected.txt:
* inspector/dom/getAccessibilityPropertiesForNode.html:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsinspectordomgetAccessibilityPropertiesForNodeexpectedtxt">trunk/LayoutTests/inspector/dom/getAccessibilityPropertiesForNode-expected.txt</a></li>
<li><a href="#trunkLayoutTestsinspectordomgetAccessibilityPropertiesForNodehtml">trunk/LayoutTests/inspector/dom/getAccessibilityPropertiesForNode.html</a></li>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorprotocolDOMjson">trunk/Source/JavaScriptCore/inspector/protocol/DOM.json</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorDOMAgentcpp">trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp</a></li>
<li><a href="#trunkSourceWebInspectorUIChangeLog">trunk/Source/WebInspectorUI/ChangeLog</a></li>
<li><a href="#trunkSourceWebInspectorUILocalizationsenlprojlocalizedStringsjs">trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceModelsDOMNodejs">trunk/Source/WebInspectorUI/UserInterface/Models/DOMNode.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsDOMNodeDetailsSidebarPaneljs">trunk/Source/WebInspectorUI/UserInterface/Views/DOMNodeDetailsSidebarPanel.js</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (207552 => 207553)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-10-19 18:56:43 UTC (rev 207552)
+++ trunk/LayoutTests/ChangeLog        2016-10-19 18:59:23 UTC (rev 207553)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2016-10-19 Aaron Chu <aaron_chu@apple.com>
+
+ Web Inspector: AXI: expose computed tree node and heading level
+ https://bugs.webkit.org/show_bug.cgi?id=130825
+ <rdar://problem/16442349>
+
+ Reviewed by Joseph Pecoraro.
+
+ Included logging of the two newly exposed accessibility properties:
+ Heading Level and Hierarchical Level.
+
+ * inspector/dom/getAccessibilityPropertiesForNode-expected.txt:
+ * inspector/dom/getAccessibilityPropertiesForNode.html:
+
</ins><span class="cx"> 2016-10-19 Zalan Bujtas <zalan@apple.com>
</span><span class="cx">
</span><span class="cx"> Use anonymous table row for new child at RenderTableRow::addChild() if available.
</span></span></pre></div>
<a id="trunkLayoutTestsinspectordomgetAccessibilityPropertiesForNodeexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/dom/getAccessibilityPropertiesForNode-expected.txt (207552 => 207553)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/dom/getAccessibilityPropertiesForNode-expected.txt        2016-10-19 18:56:43 UTC (rev 207552)
+++ trunk/LayoutTests/inspector/dom/getAccessibilityPropertiesForNode-expected.txt        2016-10-19 18:59:23 UTC (rev 207553)
</span><span class="lines">@@ -4,10 +4,10 @@
</span><span class="cx"> exists: true
</span><span class="cx"> label:
</span><span class="cx"> role:
</span><del>- childNodeIds.length: 43
</del><ins>+ childNodeIds.length: 52
</ins><span class="cx">
</span><span class="cx">
</span><del>-Total elements to be tested: 65.
</del><ins>+Total elements to be tested: 81.
</ins><span class="cx">
</span><span class="cx"> <div onclick="void(0);">click</div>
</span><span class="cx"> exists: true
</span><span class="lines">@@ -17,6 +17,159 @@
</span><span class="cx"> mouseEventNodeId: exists
</span><span class="cx"> parentNodeId: exists
</span><span class="cx">
</span><ins>+<li role="treeitem">Tree Item Level 2</li>
+ exists: true
+ label:
+ role: treeitem
+ childNodeIds.length: 1
+ parentNodeId: exists
+ hierarchyLevel: 2
+
+<ul>
+ <li role="treeitem">Tree Item Level 2</li>
+ </ul>
+ exists: true
+ label:
+ role: group
+ childNodeIds.length: 1
+ parentNodeId: exists
+
+<li role="treeitem">
+ <span>Tree Item Level 1</span>
+ <ul>
+ <li role="treeitem">Tree Item Level 2</li>
+ </ul>
+ </li>
+ exists: true
+ label:
+ role: treeitem
+ childNodeIds.length: 2
+ parentNodeId: exists
+ hierarchyLevel: 1
+
+<ul role="tree">
+ <li role="treeitem">
+ <span>Tree Item Level 1</span>
+ <ul>
+ <li role="treeitem">Tree Item Level 2</li>
+ </ul>
+ </li>
+</ul>
+ exists: true
+ label:
+ role: tree
+ childNodeIds.length: 1
+ parentNodeId: exists
+
+<li aria-level="1">List Item Level 1</li>
+ exists: true
+ label:
+ role: listitem
+ childNodeIds.length: 1
+ parentNodeId: exists
+ hierarchyLevel: 1
+
+<li aria-level="2">List Item Level 2</li>
+ exists: true
+ label:
+ role: listitem
+ childNodeIds.length: 1
+ parentNodeId: exists
+ hierarchyLevel: 2
+
+<ol>
+ <li aria-level="2">List Item Level 2</li>
+ </ol>
+ exists: true
+ label:
+ role: list
+ childNodeIds.length: 1
+ parentNodeId: exists
+
+<li aria-level="1">
+ <span>List Item Level 1</span>
+ <ol>
+ <li aria-level="2">List Item Level 2</li>
+ </ol>
+ </li>
+ exists: true
+ label:
+ role: listitem
+ childNodeIds.length: 2
+ parentNodeId: exists
+ hierarchyLevel: 1
+
+<ul>
+ <li aria-level="1">
+ <span>List Item Level 1</span>
+ <ol>
+ <li aria-level="2">List Item Level 2</li>
+ </ol>
+ </li>
+ <li aria-level="1">List Item Level 1</li>
+</ul>
+ exists: true
+ label:
+ role: list
+ childNodeIds.length: 2
+ parentNodeId: exists
+
+<h1 style="color: red;" aria-level="8">H1</h1>
+ exists: true
+ label: H1
+ role: heading
+ childNodeIds.length: 1
+ parentNodeId: exists
+ headingLevel: 8
+
+<h6>H6</h6>
+ exists: true
+ label: H6
+ role: heading
+ childNodeIds.length: 1
+ parentNodeId: exists
+ headingLevel: 6
+
+<h5>H5</h5>
+ exists: true
+ label: H5
+ role: heading
+ childNodeIds.length: 1
+ parentNodeId: exists
+ headingLevel: 5
+
+<h4>H4</h4>
+ exists: true
+ label: H4
+ role: heading
+ childNodeIds.length: 1
+ parentNodeId: exists
+ headingLevel: 4
+
+<h3>H3</h3>
+ exists: true
+ label: H3
+ role: heading
+ childNodeIds.length: 1
+ parentNodeId: exists
+ headingLevel: 3
+
+<h2>H2</h2>
+ exists: true
+ label: H2
+ role: heading
+ childNodeIds.length: 1
+ parentNodeId: exists
+ headingLevel: 2
+
+<h1>H1</h1>
+ exists: true
+ label: H1
+ role: heading
+ childNodeIds.length: 1
+ parentNodeId: exists
+ headingLevel: 1
+
</ins><span class="cx"> <li role="treeitem" aria-expanded="undefined">expanded</li>
</span><span class="cx"> exists: true
</span><span class="cx"> label:
</span><span class="lines">@@ -23,6 +176,7 @@
</span><span class="cx"> role: treeitem
</span><span class="cx"> childNodeIds.length: 1
</span><span class="cx"> parentNodeId: exists
</span><ins>+ hierarchyLevel: 1
</ins><span class="cx">
</span><span class="cx"> <li role="treeitem" aria-expanded="false" id="activedescendant" aria-selected="true">collapsed</li>
</span><span class="cx"> exists: true
</span><span class="lines">@@ -32,6 +186,7 @@
</span><span class="cx"> expanded: false
</span><span class="cx"> parentNodeId: exists
</span><span class="cx"> selected: true
</span><ins>+ hierarchyLevel: 1
</ins><span class="cx">
</span><span class="cx"> <li role="treeitem" aria-expanded="true">expanded</li>
</span><span class="cx"> exists: true
</span><span class="lines">@@ -40,6 +195,7 @@
</span><span class="cx"> childNodeIds.length: 1
</span><span class="cx"> expanded: true
</span><span class="cx"> parentNodeId: exists
</span><ins>+ hierarchyLevel: 1
</ins><span class="cx">
</span><span class="cx"> <ul role="tree" id="flowedTo1" aria-activedescendant="activedescendant">
</span><span class="cx"> <li role="treeitem" aria-expanded="true">expanded</li>
</span></span></pre></div>
<a id="trunkLayoutTestsinspectordomgetAccessibilityPropertiesForNodehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/inspector/dom/getAccessibilityPropertiesForNode.html (207552 => 207553)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/inspector/dom/getAccessibilityPropertiesForNode.html        2016-10-19 18:56:43 UTC (rev 207552)
+++ trunk/LayoutTests/inspector/dom/getAccessibilityPropertiesForNode.html        2016-10-19 18:59:23 UTC (rev 207553)
</span><span class="lines">@@ -118,6 +118,37 @@
</span><span class="cx"> <li class="ex" role="treeitem" aria-expanded="undefined">expanded</li>
</span><span class="cx"> </ul>
</span><span class="cx">
</span><ins>+<div>
+<h1 class="ex">H1</h1>
+<h2 class="ex">H2</h2>
+<h3 class="ex">H3</h3>
+<h4 class="ex">H4</h4>
+<h5 class="ex">H5</h5>
+<h6 class="ex">H6</h6>
+
+<h1 class="ex" style="color: red;" aria-level="8">H1</h1>
+
+<ul class="ex">
+ <li class="ex" aria-level="1">
+ <span>List Item Level 1</span>
+ <ol class="ex">
+ <li class="ex" aria-level="2">List Item Level 2</li>
+ </ol>
+ </li>
+ <li class="ex" aria-level="1">List Item Level 1</li>
+</ul>
+
+<ul class="ex" role="tree">
+ <li class="ex" role="treeitem">
+ <span>Tree Item Level 1</span>
+ <ul class="ex">
+ <li class="ex" role="treeitem">Tree Item Level 2</li>
+ </ul>
+ </li>
+</ul>
+
+</div>
+
</ins><span class="cx"> <!-- Full test of mouseEventNodeId in getAccessibilityPropertiesForNode_mouseEventNodeId.html. -->
</span><span class="cx"> <div class="ex" onclick="void(0);">click</div>
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (207552 => 207553)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2016-10-19 18:56:43 UTC (rev 207552)
+++ trunk/Source/JavaScriptCore/ChangeLog        2016-10-19 18:59:23 UTC (rev 207553)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2016-10-19 Aaron Chu <aaron_chu@apple.com>
+
+ Web Inspector: AXI: expose computed tree node and heading level
+ https://bugs.webkit.org/show_bug.cgi?id=130825
+ <rdar://problem/16442349>
+
+ Reviewed by Joseph Pecoraro.
+
+ Exposing two new accessibility properties: Heading Level and Hierarchical Level.
+
+ * inspector/protocol/DOM.json:
+
</ins><span class="cx"> 2016-10-18 Filip Pizlo <fpizlo@apple.com>
</span><span class="cx">
</span><span class="cx"> DFG worklist should use AutomaticThread
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorprotocolDOMjson"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/protocol/DOM.json (207552 => 207553)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/protocol/DOM.json        2016-10-19 18:56:43 UTC (rev 207552)
+++ trunk/Source/JavaScriptCore/inspector/protocol/DOM.json        2016-10-19 18:59:23 UTC (rev 207553)
</span><span class="lines">@@ -89,6 +89,8 @@
</span><span class="cx"> { "name": "controlledNodeIds", "type": "array", "items": { "$ref": "NodeId" }, "optional": true, "description": "Array of <code>DOMNode</code> ids of any nodes referenced via @aria-controls." },
</span><span class="cx"> { "name": "current", "type": "string", "optional": true, "enum": ["true", "false", "page", "step", "location", "date", "time"], "description": "Current item within a container or set of related elements." },
</span><span class="cx"> { "name": "disabled", "type": "boolean", "optional": true, "description": "Disabled state of form controls." },
</span><ins>+ { "name": "headingLevel", "type": "number", "optional": true, "description": "Heading level of a heading element." },
+ { "name": "hierarchyLevel", "type": "number", "optional": true, "description": "The hierarchical level of an element." },
</ins><span class="cx"> { "name": "exists", "type": "boolean", "description": "Indicates whether there is an existing AX object for the DOM node. If this is false, all the other properties will be default values." },
</span><span class="cx"> { "name": "expanded", "type": "boolean", "optional": true, "description": "Expanded state." },
</span><span class="cx"> { "name": "flowedNodeIds", "type": "array", "items": { "$ref": "NodeId" }, "optional": true, "description": "Array of <code>DOMNode</code> ids of any nodes referenced via @aria-flowto." },
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (207552 => 207553)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-10-19 18:56:43 UTC (rev 207552)
+++ trunk/Source/WebCore/ChangeLog        2016-10-19 18:59:23 UTC (rev 207553)
</span><span class="lines">@@ -1,3 +1,18 @@
</span><ins>+2016-10-19 Aaron Chu <aaron_chu@apple.com>
+
+ Web Inspector: AXI: expose computed tree node and heading level
+ https://bugs.webkit.org/show_bug.cgi?id=130825
+ <rdar://problem/16442349>
+
+ Reviewed by Joseph Pecoraro.
+
+ Exposing two new accessibility properties: Heading Level and Hierarchical Level.
+
+ Updated Test: LayoutTest/inspector/dom/getAccessibilityPropertiesForNode.html
+
+ * inspector/InspectorDOMAgent.cpp:
+ (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
+
</ins><span class="cx"> 2016-10-19 Adam Bergkvist <adam.bergkvist@ericsson.com>
</span><span class="cx">
</span><span class="cx"> WebRTC: Implement MediaEndpointPeerConnection::stop()
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorDOMAgentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp (207552 => 207553)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp        2016-10-19 18:56:43 UTC (rev 207552)
+++ trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp        2016-10-19 18:59:23 UTC (rev 207553)
</span><span class="lines">@@ -1599,6 +1599,9 @@
</span><span class="cx"> bool supportsPressed = false;
</span><span class="cx"> bool supportsRequired = false;
</span><span class="cx"> bool supportsFocused = false;
</span><ins>+ int headingLevel = 0;
+ unsigned hierarchicalLevel = 0;
+ unsigned level = 0;
</ins><span class="cx">
</span><span class="cx"> if (AXObjectCache* axObjectCache = node->document().axObjectCache()) {
</span><span class="cx"> if (AccessibilityObject* axObject = axObjectCache->getOrCreate(node)) {
</span><span class="lines">@@ -1772,6 +1775,11 @@
</span><span class="cx"> selectedChildNodeIds->addItem(pushNodePathToFrontend(selectedChildNode));
</span><span class="cx"> }
</span><span class="cx"> }
</span><ins>+
+ headingLevel = axObject->headingLevel();
+ hierarchicalLevel = axObject->hierarchicalLevel();
+
+ level = hierarchicalLevel ? hierarchicalLevel : headingLevel;
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1833,6 +1841,15 @@
</span><span class="cx"> value->setSelected(selected);
</span><span class="cx"> if (selectedChildNodeIds)
</span><span class="cx"> value->setSelectedChildNodeIds(selectedChildNodeIds);
</span><ins>+
+ // H1 -- H6 always have a headingLevel property that can be complimented by a hierarchicalLevel
+ // property when aria-level is set on the element, in which case we want to remain calling
+ // this value the "Heading Level" in the inspector.
+ // Also, we do not want it to say Hierarchy Level: 0
+ if (headingLevel)
+ value->setHeadingLevel(level);
+ else if (level)
+ value->setHierarchyLevel(level);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> return WTFMove(value);
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/ChangeLog (207552 => 207553)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/ChangeLog        2016-10-19 18:56:43 UTC (rev 207552)
+++ trunk/Source/WebInspectorUI/ChangeLog        2016-10-19 18:59:23 UTC (rev 207553)
</span><span class="lines">@@ -1,3 +1,22 @@
</span><ins>+2016-10-19 Aaron Chu <aaron_chu@apple.com>
+
+ Web Inspector: AXI: expose computed tree node and heading level
+ https://bugs.webkit.org/show_bug.cgi?id=130825
+ <rdar://problem/16442349>
+
+ Reviewed by Joseph Pecoraro.
+
+ Updating the Web Accessibility Inspector to display Heading Level and Hierarchical Level.
+
+ * Localizations/en.lproj/localizedStrings.js:
+ * UserInterface/Models/DOMNode.js:
+ (WebInspector.DOMNode.prototype.accessibilityProperties.accessibilityPropertiesCallback):
+ (WebInspector.DOMNode.prototype.accessibilityProperties):
+ * UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
+ (WebInspector.DOMNodeDetailsSidebarPanel):
+ (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshAccessibility.accessibilityPropertiesCallback):
+ (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshAccessibility):
+
</ins><span class="cx"> 2016-10-18 Joseph Pecoraro <pecoraro@apple.com>
</span><span class="cx">
</span><span class="cx"> Web Inspector: Styles Sidebar highlights "translate" but not "translateX"
</span></span></pre></div>
<a id="trunkSourceWebInspectorUILocalizationsenlprojlocalizedStringsjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js (207552 => 207553)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js        2016-10-19 18:56:43 UTC (rev 207552)
+++ trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js        2016-10-19 18:59:23 UTC (rev 207553)
</span><span class="lines">@@ -393,6 +393,8 @@
</span><span class="cx"> localizedStrings["HTTP"] = "HTTP";
</span><span class="cx"> localizedStrings["Heap Snapshot Object (@%d)"] = "Heap Snapshot Object (@%d)";
</span><span class="cx"> localizedStrings["Height"] = "Height";
</span><ins>+localizedStrings["Heading Level"] = "Heading Level";
+localizedStrings["Hierarchy Level"] = "Hierarchy Level";
</ins><span class="cx"> localizedStrings["Hide compositing borders"] = "Hide compositing borders";
</span><span class="cx"> localizedStrings["Hide shadow DOM nodes"] = "Hide shadow DOM nodes";
</span><span class="cx"> localizedStrings["Hide the details sidebar (%s)"] = "Hide the details sidebar (%s)";
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceModelsDOMNodejs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Models/DOMNode.js (207552 => 207553)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Models/DOMNode.js        2016-10-19 18:56:43 UTC (rev 207552)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/DOMNode.js        2016-10-19 18:59:23 UTC (rev 207553)
</span><span class="lines">@@ -517,6 +517,8 @@
</span><span class="cx"> ignored: accessibilityProperties.ignored,
</span><span class="cx"> ignoredByDefault: accessibilityProperties.ignoredByDefault,
</span><span class="cx"> invalid: accessibilityProperties.invalid,
</span><ins>+ headingLevel: accessibilityProperties.headingLevel,
+ hierarchyLevel: accessibilityProperties.hierarchyLevel,
</ins><span class="cx"> hidden: accessibilityProperties.hidden,
</span><span class="cx"> label: accessibilityProperties.label,
</span><span class="cx"> liveRegionAtomic: accessibilityProperties.liveRegionAtomic,
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsDOMNodeDetailsSidebarPaneljs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DOMNodeDetailsSidebarPanel.js (207552 => 207553)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/DOMNodeDetailsSidebarPanel.js        2016-10-19 18:56:43 UTC (rev 207552)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DOMNodeDetailsSidebarPanel.js        2016-10-19 18:59:23 UTC (rev 207553)
</span><span class="lines">@@ -73,6 +73,8 @@
</span><span class="cx"> this._accessibilityNodeExpandedRow = new WebInspector.DetailsSectionSimpleRow(WebInspector.UIString("Expanded"));
</span><span class="cx"> this._accessibilityNodeFlowsRow = new WebInspector.DetailsSectionSimpleRow(WebInspector.UIString("Flows"));
</span><span class="cx"> this._accessibilityNodeFocusedRow = new WebInspector.DetailsSectionSimpleRow(WebInspector.UIString("Focused"));
</span><ins>+ this._accessibilityNodeHeadingLevelRow = new WebInspector.DetailsSectionSimpleRow(WebInspector.UIString("Heading Level"));
+ this._accessibilityNodehierarchyLevelRow = new WebInspector.DetailsSectionSimpleRow(WebInspector.UIString("Hierarchy Level"));
</ins><span class="cx"> this._accessibilityNodeIgnoredRow = new WebInspector.DetailsSectionSimpleRow(WebInspector.UIString("Ignored"));
</span><span class="cx"> this._accessibilityNodeInvalidRow = new WebInspector.DetailsSectionSimpleRow(WebInspector.UIString("Invalid"));
</span><span class="cx"> this._accessibilityNodeLiveRegionStatusRow = new WebInspector.DetailsSectionSimpleRow(WebInspector.UIString("Live"));
</span><span class="lines">@@ -501,6 +503,8 @@
</span><span class="cx"> var selected = booleanValueToLocalizedStringIfTrue("selected");
</span><span class="cx"> var selectedChildNodeLinkList = linkListForNodeIds(accessibilityProperties.selectedChildNodeIds);
</span><span class="cx">
</span><ins>+ var headingLevel = accessibilityProperties.headingLevel;
+ var hierarchyLevel = accessibilityProperties.hierarchyLevel;
</ins><span class="cx"> // Assign all the properties to their respective views.
</span><span class="cx"> this._accessibilityNodeActiveDescendantRow.value = activeDescendantLink || "";
</span><span class="cx"> this._accessibilityNodeBusyRow.value = busy;
</span><span class="lines">@@ -512,6 +516,8 @@
</span><span class="cx"> this._accessibilityNodeExpandedRow.value = expanded;
</span><span class="cx"> this._accessibilityNodeFlowsRow.value = flowedNodeLinkList || "";
</span><span class="cx"> this._accessibilityNodeFocusedRow.value = focused;
</span><ins>+ this._accessibilityNodeHeadingLevelRow.value = headingLevel || "";
+ this._accessibilityNodehierarchyLevelRow.value = hierarchyLevel || "";
</ins><span class="cx"> this._accessibilityNodeIgnoredRow.value = ignored;
</span><span class="cx"> this._accessibilityNodeInvalidRow.value = invalid;
</span><span class="cx"> this._accessibilityNodeLabelRow.value = label;
</span><span class="lines">@@ -549,6 +555,8 @@
</span><span class="cx"> this._accessibilityNodeFlowsRow,
</span><span class="cx"> this._accessibilityNodeMouseEventRow,
</span><span class="cx"> this._accessibilityNodeFocusedRow,
</span><ins>+ this._accessibilityNodeHeadingLevelRow,
+ this._accessibilityNodehierarchyLevelRow,
</ins><span class="cx"> this._accessibilityNodeBusyRow,
</span><span class="cx"> this._accessibilityNodeLiveRegionStatusRow,
</span><span class="cx"> this._accessibilityNodeCurrentRow,
</span></span></pre>
</div>
</div>
</body>
</html>