<!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
&lt;rdar://problem/16442349&gt;

Patch by Aaron Chu &lt;aaron_chu@apple.com&gt; 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  &lt;aaron_chu@apple.com&gt;
+
+        Web Inspector: AXI: expose computed tree node and heading level
+        https://bugs.webkit.org/show_bug.cgi?id=130825
+        &lt;rdar://problem/16442349&gt;
+
+        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  &lt;zalan@apple.com&gt;
</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"> &lt;div onclick=&quot;void(0);&quot;&gt;click&lt;/div&gt;
</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>+&lt;li role=&quot;treeitem&quot;&gt;Tree Item Level 2&lt;/li&gt;
+    exists: true
+    label: 
+    role: treeitem
+    childNodeIds.length: 1
+    parentNodeId: exists
+    hierarchyLevel: 2
+
+&lt;ul&gt;
+            &lt;li role=&quot;treeitem&quot;&gt;Tree Item Level 2&lt;/li&gt;
+        &lt;/ul&gt;
+    exists: true
+    label: 
+    role: group
+    childNodeIds.length: 1
+    parentNodeId: exists
+
+&lt;li role=&quot;treeitem&quot;&gt;
+        &lt;span&gt;Tree Item Level 1&lt;/span&gt;
+        &lt;ul&gt;
+            &lt;li role=&quot;treeitem&quot;&gt;Tree Item Level 2&lt;/li&gt;
+        &lt;/ul&gt;
+    &lt;/li&gt;
+    exists: true
+    label: 
+    role: treeitem
+    childNodeIds.length: 2
+    parentNodeId: exists
+    hierarchyLevel: 1
+
+&lt;ul role=&quot;tree&quot;&gt;
+    &lt;li role=&quot;treeitem&quot;&gt;
+        &lt;span&gt;Tree Item Level 1&lt;/span&gt;
+        &lt;ul&gt;
+            &lt;li role=&quot;treeitem&quot;&gt;Tree Item Level 2&lt;/li&gt;
+        &lt;/ul&gt;
+    &lt;/li&gt;
+&lt;/ul&gt;
+    exists: true
+    label: 
+    role: tree
+    childNodeIds.length: 1
+    parentNodeId: exists
+
+&lt;li aria-level=&quot;1&quot;&gt;List Item Level 1&lt;/li&gt;
+    exists: true
+    label: 
+    role: listitem
+    childNodeIds.length: 1
+    parentNodeId: exists
+    hierarchyLevel: 1
+
+&lt;li aria-level=&quot;2&quot;&gt;List Item Level 2&lt;/li&gt;
+    exists: true
+    label: 
+    role: listitem
+    childNodeIds.length: 1
+    parentNodeId: exists
+    hierarchyLevel: 2
+
+&lt;ol&gt;
+            &lt;li aria-level=&quot;2&quot;&gt;List Item Level 2&lt;/li&gt;
+        &lt;/ol&gt;
+    exists: true
+    label: 
+    role: list
+    childNodeIds.length: 1
+    parentNodeId: exists
+
+&lt;li aria-level=&quot;1&quot;&gt;
+        &lt;span&gt;List Item Level 1&lt;/span&gt;
+        &lt;ol&gt;
+            &lt;li aria-level=&quot;2&quot;&gt;List Item Level 2&lt;/li&gt;
+        &lt;/ol&gt;
+    &lt;/li&gt;
+    exists: true
+    label: 
+    role: listitem
+    childNodeIds.length: 2
+    parentNodeId: exists
+    hierarchyLevel: 1
+
+&lt;ul&gt;
+    &lt;li aria-level=&quot;1&quot;&gt;
+        &lt;span&gt;List Item Level 1&lt;/span&gt;
+        &lt;ol&gt;
+            &lt;li aria-level=&quot;2&quot;&gt;List Item Level 2&lt;/li&gt;
+        &lt;/ol&gt;
+    &lt;/li&gt;
+    &lt;li aria-level=&quot;1&quot;&gt;List Item Level 1&lt;/li&gt;
+&lt;/ul&gt;
+    exists: true
+    label: 
+    role: list
+    childNodeIds.length: 2
+    parentNodeId: exists
+
+&lt;h1 style=&quot;color: red;&quot; aria-level=&quot;8&quot;&gt;H1&lt;/h1&gt;
+    exists: true
+    label: H1
+    role: heading
+    childNodeIds.length: 1
+    parentNodeId: exists
+    headingLevel: 8
+
+&lt;h6&gt;H6&lt;/h6&gt;
+    exists: true
+    label: H6
+    role: heading
+    childNodeIds.length: 1
+    parentNodeId: exists
+    headingLevel: 6
+
+&lt;h5&gt;H5&lt;/h5&gt;
+    exists: true
+    label: H5
+    role: heading
+    childNodeIds.length: 1
+    parentNodeId: exists
+    headingLevel: 5
+
+&lt;h4&gt;H4&lt;/h4&gt;
+    exists: true
+    label: H4
+    role: heading
+    childNodeIds.length: 1
+    parentNodeId: exists
+    headingLevel: 4
+
+&lt;h3&gt;H3&lt;/h3&gt;
+    exists: true
+    label: H3
+    role: heading
+    childNodeIds.length: 1
+    parentNodeId: exists
+    headingLevel: 3
+
+&lt;h2&gt;H2&lt;/h2&gt;
+    exists: true
+    label: H2
+    role: heading
+    childNodeIds.length: 1
+    parentNodeId: exists
+    headingLevel: 2
+
+&lt;h1&gt;H1&lt;/h1&gt;
+    exists: true
+    label: H1
+    role: heading
+    childNodeIds.length: 1
+    parentNodeId: exists
+    headingLevel: 1
+
</ins><span class="cx"> &lt;li role=&quot;treeitem&quot; aria-expanded=&quot;undefined&quot;&gt;expanded&lt;/li&gt;
</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"> &lt;li role=&quot;treeitem&quot; aria-expanded=&quot;false&quot; id=&quot;activedescendant&quot; aria-selected=&quot;true&quot;&gt;collapsed&lt;/li&gt;
</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"> &lt;li role=&quot;treeitem&quot; aria-expanded=&quot;true&quot;&gt;expanded&lt;/li&gt;
</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"> &lt;ul role=&quot;tree&quot; id=&quot;flowedTo1&quot; aria-activedescendant=&quot;activedescendant&quot;&gt;
</span><span class="cx">     &lt;li role=&quot;treeitem&quot; aria-expanded=&quot;true&quot;&gt;expanded&lt;/li&gt;
</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">     &lt;li class=&quot;ex&quot; role=&quot;treeitem&quot; aria-expanded=&quot;undefined&quot;&gt;expanded&lt;/li&gt;
</span><span class="cx"> &lt;/ul&gt;
</span><span class="cx"> 
</span><ins>+&lt;div&gt;
+&lt;h1 class=&quot;ex&quot;&gt;H1&lt;/h1&gt;
+&lt;h2 class=&quot;ex&quot;&gt;H2&lt;/h2&gt;
+&lt;h3 class=&quot;ex&quot;&gt;H3&lt;/h3&gt;
+&lt;h4 class=&quot;ex&quot;&gt;H4&lt;/h4&gt;
+&lt;h5 class=&quot;ex&quot;&gt;H5&lt;/h5&gt;
+&lt;h6 class=&quot;ex&quot;&gt;H6&lt;/h6&gt;
+
+&lt;h1  class=&quot;ex&quot; style=&quot;color: red;&quot; aria-level=&quot;8&quot;&gt;H1&lt;/h1&gt;
+
+&lt;ul class=&quot;ex&quot;&gt;
+    &lt;li class=&quot;ex&quot; aria-level=&quot;1&quot;&gt;
+        &lt;span&gt;List Item Level 1&lt;/span&gt;
+        &lt;ol class=&quot;ex&quot;&gt;
+            &lt;li class=&quot;ex&quot; aria-level=&quot;2&quot;&gt;List Item Level 2&lt;/li&gt;
+        &lt;/ol&gt;
+    &lt;/li&gt;
+    &lt;li class=&quot;ex&quot; aria-level=&quot;1&quot;&gt;List Item Level 1&lt;/li&gt;
+&lt;/ul&gt;
+
+&lt;ul class=&quot;ex&quot; role=&quot;tree&quot;&gt;
+    &lt;li class=&quot;ex&quot; role=&quot;treeitem&quot;&gt;
+        &lt;span&gt;Tree Item Level 1&lt;/span&gt;
+        &lt;ul class=&quot;ex&quot;&gt;
+            &lt;li class=&quot;ex&quot; role=&quot;treeitem&quot;&gt;Tree Item Level 2&lt;/li&gt;
+        &lt;/ul&gt;
+    &lt;/li&gt;
+&lt;/ul&gt;
+
+&lt;/div&gt;
+
</ins><span class="cx"> &lt;!-- Full test of mouseEventNodeId in getAccessibilityPropertiesForNode_mouseEventNodeId.html. --&gt;
</span><span class="cx"> &lt;div class=&quot;ex&quot; onclick=&quot;void(0);&quot;&gt;click&lt;/div&gt;
</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  &lt;aaron_chu@apple.com&gt;
+
+        Web Inspector: AXI: expose computed tree node and heading level
+        https://bugs.webkit.org/show_bug.cgi?id=130825
+        &lt;rdar://problem/16442349&gt;
+
+        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  &lt;fpizlo@apple.com&gt;
</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">                 { &quot;name&quot;: &quot;controlledNodeIds&quot;, &quot;type&quot;: &quot;array&quot;, &quot;items&quot;: { &quot;$ref&quot;: &quot;NodeId&quot; }, &quot;optional&quot;: true, &quot;description&quot;: &quot;Array of &lt;code&gt;DOMNode&lt;/code&gt; ids of any nodes referenced via @aria-controls.&quot; },
</span><span class="cx">                 { &quot;name&quot;: &quot;current&quot;, &quot;type&quot;: &quot;string&quot;, &quot;optional&quot;: true, &quot;enum&quot;: [&quot;true&quot;, &quot;false&quot;, &quot;page&quot;, &quot;step&quot;, &quot;location&quot;, &quot;date&quot;, &quot;time&quot;], &quot;description&quot;: &quot;Current item within a container or set of related elements.&quot; },
</span><span class="cx">                 { &quot;name&quot;: &quot;disabled&quot;, &quot;type&quot;: &quot;boolean&quot;, &quot;optional&quot;: true, &quot;description&quot;: &quot;Disabled state of form controls.&quot; },
</span><ins>+                { &quot;name&quot;: &quot;headingLevel&quot;, &quot;type&quot;: &quot;number&quot;, &quot;optional&quot;: true, &quot;description&quot;: &quot;Heading level of a heading element.&quot; },
+                { &quot;name&quot;: &quot;hierarchyLevel&quot;, &quot;type&quot;: &quot;number&quot;, &quot;optional&quot;: true, &quot;description&quot;: &quot;The hierarchical level of an element.&quot; },
</ins><span class="cx">                 { &quot;name&quot;: &quot;exists&quot;, &quot;type&quot;: &quot;boolean&quot;, &quot;description&quot;: &quot;Indicates whether there is an existing AX object for the DOM node. If this is false, all the other properties will be default values.&quot; },
</span><span class="cx">                 { &quot;name&quot;: &quot;expanded&quot;, &quot;type&quot;: &quot;boolean&quot;, &quot;optional&quot;: true, &quot;description&quot;: &quot;Expanded state.&quot; },
</span><span class="cx">                 { &quot;name&quot;: &quot;flowedNodeIds&quot;, &quot;type&quot;: &quot;array&quot;, &quot;items&quot;: { &quot;$ref&quot;: &quot;NodeId&quot; }, &quot;optional&quot;: true, &quot;description&quot;: &quot;Array of &lt;code&gt;DOMNode&lt;/code&gt; ids of any nodes referenced via @aria-flowto.&quot; },
</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  &lt;aaron_chu@apple.com&gt;
+
+        Web Inspector: AXI: expose computed tree node and heading level
+        https://bugs.webkit.org/show_bug.cgi?id=130825
+        &lt;rdar://problem/16442349&gt;
+
+        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  &lt;adam.bergkvist@ericsson.com&gt;
</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-&gt;document().axObjectCache()) {
</span><span class="cx">         if (AccessibilityObject* axObject = axObjectCache-&gt;getOrCreate(node)) {
</span><span class="lines">@@ -1772,6 +1775,11 @@
</span><span class="cx">                         selectedChildNodeIds-&gt;addItem(pushNodePathToFrontend(selectedChildNode));
</span><span class="cx">                 }
</span><span class="cx">             }
</span><ins>+            
+            headingLevel = axObject-&gt;headingLevel();
+            hierarchicalLevel = axObject-&gt;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-&gt;setSelected(selected);
</span><span class="cx">         if (selectedChildNodeIds)
</span><span class="cx">             value-&gt;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 &quot;Heading Level&quot; in the inspector.
+        // Also, we do not want it to say Hierarchy Level: 0
+        if (headingLevel)
+            value-&gt;setHeadingLevel(level);
+        else if (level)
+            value-&gt;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  &lt;aaron_chu@apple.com&gt;
+
+        Web Inspector: AXI: expose computed tree node and heading level
+        https://bugs.webkit.org/show_bug.cgi?id=130825
+        &lt;rdar://problem/16442349&gt;
+
+        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  &lt;pecoraro@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Web Inspector: Styles Sidebar highlights &quot;translate&quot; but not &quot;translateX&quot;
</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[&quot;HTTP&quot;] = &quot;HTTP&quot;;
</span><span class="cx"> localizedStrings[&quot;Heap Snapshot Object (@%d)&quot;] = &quot;Heap Snapshot Object (@%d)&quot;;
</span><span class="cx"> localizedStrings[&quot;Height&quot;] = &quot;Height&quot;;
</span><ins>+localizedStrings[&quot;Heading Level&quot;] = &quot;Heading Level&quot;;
+localizedStrings[&quot;Hierarchy Level&quot;] = &quot;Hierarchy Level&quot;;
</ins><span class="cx"> localizedStrings[&quot;Hide compositing borders&quot;] = &quot;Hide compositing borders&quot;;
</span><span class="cx"> localizedStrings[&quot;Hide shadow DOM nodes&quot;] = &quot;Hide shadow DOM nodes&quot;;
</span><span class="cx"> localizedStrings[&quot;Hide the details sidebar (%s)&quot;] = &quot;Hide the details sidebar (%s)&quot;;
</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(&quot;Expanded&quot;));
</span><span class="cx">             this._accessibilityNodeFlowsRow = new WebInspector.DetailsSectionSimpleRow(WebInspector.UIString(&quot;Flows&quot;));
</span><span class="cx">             this._accessibilityNodeFocusedRow = new WebInspector.DetailsSectionSimpleRow(WebInspector.UIString(&quot;Focused&quot;));
</span><ins>+            this._accessibilityNodeHeadingLevelRow = new WebInspector.DetailsSectionSimpleRow(WebInspector.UIString(&quot;Heading Level&quot;));
+            this._accessibilityNodehierarchyLevelRow = new WebInspector.DetailsSectionSimpleRow(WebInspector.UIString(&quot;Hierarchy Level&quot;));
</ins><span class="cx">             this._accessibilityNodeIgnoredRow = new WebInspector.DetailsSectionSimpleRow(WebInspector.UIString(&quot;Ignored&quot;));
</span><span class="cx">             this._accessibilityNodeInvalidRow = new WebInspector.DetailsSectionSimpleRow(WebInspector.UIString(&quot;Invalid&quot;));
</span><span class="cx">             this._accessibilityNodeLiveRegionStatusRow = new WebInspector.DetailsSectionSimpleRow(WebInspector.UIString(&quot;Live&quot;));
</span><span class="lines">@@ -501,6 +503,8 @@
</span><span class="cx">                 var selected = booleanValueToLocalizedStringIfTrue(&quot;selected&quot;);
</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 || &quot;&quot;;
</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 || &quot;&quot;;
</span><span class="cx">                 this._accessibilityNodeFocusedRow.value = focused;
</span><ins>+                this._accessibilityNodeHeadingLevelRow.value = headingLevel || &quot;&quot;;
+                this._accessibilityNodehierarchyLevelRow.value = hierarchyLevel || &quot;&quot;;
</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>