Title: [154083] trunk/Source/WebCore
Revision
154083
Author
[email protected]
Date
2013-08-14 17:00:08 -0700 (Wed, 14 Aug 2013)

Log Message

<https://webkit.org/b/119824> AX: WKView does not become first responder when the voiceover cursor lands on it

Reviewed by Tim Horton.

VoiceOver lands on Scroll views by default. It expects that the scroll view will be able to handle the focus calls. 
We should forward scroll view focus requests to the web area to handle, which will trigger a becomeFirstResponder on WKView.

There's not a great way to test this unfortunately, since it requires having focus comes from outside the webview into the webview.

* accessibility/AccessibilityScrollView.cpp:
(WebCore::AccessibilityScrollView::canSetFocusAttribute):
(WebCore::AccessibilityScrollView::isFocused):
(WebCore::AccessibilityScrollView::setFocused):
* accessibility/AccessibilityScrollView.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (154082 => 154083)


--- trunk/Source/WebCore/ChangeLog	2013-08-14 23:59:01 UTC (rev 154082)
+++ trunk/Source/WebCore/ChangeLog	2013-08-15 00:00:08 UTC (rev 154083)
@@ -1,3 +1,20 @@
+2013-08-14  Chris Fleizach  <[email protected]>
+
+        <https://webkit.org/b/119824> AX: WKView does not become first responder when the voiceover cursor lands on it
+
+        Reviewed by Tim Horton.
+
+        VoiceOver lands on Scroll views by default. It expects that the scroll view will be able to handle the focus calls. 
+        We should forward scroll view focus requests to the web area to handle, which will trigger a becomeFirstResponder on WKView.
+
+        There's not a great way to test this unfortunately, since it requires having focus comes from outside the webview into the webview.
+
+        * accessibility/AccessibilityScrollView.cpp:
+        (WebCore::AccessibilityScrollView::canSetFocusAttribute):
+        (WebCore::AccessibilityScrollView::isFocused):
+        (WebCore::AccessibilityScrollView::setFocused):
+        * accessibility/AccessibilityScrollView.h:
+
 2013-08-14  Hans Muller  <[email protected]>
 
         [CSS Exclusions] Minimal support for using an image to define a shape

Modified: trunk/Source/WebCore/accessibility/AccessibilityScrollView.cpp (154082 => 154083)


--- trunk/Source/WebCore/accessibility/AccessibilityScrollView.cpp	2013-08-14 23:59:01 UTC (rev 154082)
+++ trunk/Source/WebCore/accessibility/AccessibilityScrollView.cpp	2013-08-15 00:00:08 UTC (rev 154083)
@@ -86,6 +86,26 @@
     return m_scrollView;
 }
     
+bool AccessibilityScrollView::canSetFocusAttribute() const
+{
+    if (AccessibilityObject* webArea = webAreaObject())
+        return webArea->canSetFocusAttribute();
+    return false;
+}
+    
+bool AccessibilityScrollView::isFocused() const
+{
+    if (AccessibilityObject* webArea = webAreaObject())
+        return webArea->isFocused();
+    return false;
+}
+    
+void AccessibilityScrollView::setFocused(bool focused)
+{
+    if (AccessibilityObject* webArea = webAreaObject())
+        webArea->setFocused(focused);
+}
+
 void AccessibilityScrollView::updateChildrenIfNecessary()
 {
     if (m_childrenDirty)

Modified: trunk/Source/WebCore/accessibility/AccessibilityScrollView.h (154082 => 154083)


--- trunk/Source/WebCore/accessibility/AccessibilityScrollView.h	2013-08-14 23:59:01 UTC (rev 154082)
+++ trunk/Source/WebCore/accessibility/AccessibilityScrollView.h	2013-08-15 00:00:08 UTC (rev 154083)
@@ -64,6 +64,9 @@
     virtual void updateChildrenIfNecessary();
     virtual void setNeedsToUpdateChildren() { m_childrenDirty = true; }
     void updateScrollbars();
+    virtual void setFocused(bool);
+    virtual bool canSetFocusAttribute() const;
+    virtual bool isFocused() const;
     
     virtual FrameView* documentFrameView() const;
     virtual LayoutRect elementRect() const;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to