Web Inspector: AXI: focused/focusable state should be based on Accessibility Object...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Oct 2016 23:04:13 +0000 (23:04 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Oct 2016 23:04:13 +0000 (23:04 +0000)
https://bugs.webkit.org/show_bug.cgi?id=163088
<rdar://problem/16421985>

Patch by Aaron Chu <aaron_chu@apple.com> on 2016-10-18
Reviewed by Darin Adler.

Changed code in InspectDOMAgent so that it determines the focusability of a Node based
on the AccessibilityNodeObject and not the Element class.

Covered by existing tests:
LayoutTests/inspector/dom/getAccessibilityPropertiesForNode.html

* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@207496 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/inspector/InspectorDOMAgent.cpp

index c1a010c..cc863aa 100644 (file)
@@ -1,3 +1,20 @@
+2016-10-18  Aaron Chu  <aaron_chu@apple.com>
+
+        Web Inspector: AXI: focused/focusable state should be based on Accessibility Object instead of Element
+        https://bugs.webkit.org/show_bug.cgi?id=163088
+        <rdar://problem/16421985>
+
+        Reviewed by Darin Adler.
+
+        Changed code in InspectDOMAgent so that it determines the focusability of a Node based
+        on the AccessibilityNodeObject and not the Element class.
+
+        Covered by existing tests: 
+        LayoutTests/inspector/dom/getAccessibilityPropertiesForNode.html
+
+        * inspector/InspectorDOMAgent.cpp:
+        (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
+
 2016-10-18  Anders Carlsson  <andersca@apple.com>
 
         Get rid of more WebHistoryItem cruft
index 167e5fb..59bc5a3 100644 (file)
@@ -1675,7 +1675,7 @@ RefPtr<Inspector::Protocol::DOM::AccessibilityProperties> InspectorDOMAgent::bui
             }
             
             if (is<Element>(*node)) {
-                supportsFocused = downcast<Element>(*node).isFocusable();
+                supportsFocused = axObject->canSetFocusAttribute();
                 if (supportsFocused)
                     focused = axObject->isFocused();
             }