RESOLVED FIXED61492
Safari's AXFocusedUIElement attribute returns WebArea object with AXSelectedTextMarkerRange of nil
https://bugs.webkit.org/show_bug.cgi?id=61492
Summary Safari's AXFocusedUIElement attribute returns WebArea object with AXSelectedT...
chris fleizach
Reported 2011-05-25 17:41:19 PDT
In WK2, the element returned as the AXFocusedUIElement from the WebProcess doesn't know which WKView it's being asked for. So, we iterate the WebPage's to try to find which is focused. This method was only checking m_page->focusController()->isActive(); However, that would return page's that were hidden or not foreground. Changing that to return m_windowIsVisible && m_page->focusController()->isFocused() && m_page->focusController()->isActive(); Gives much better results
Attachments
patch (1.43 KB, patch)
2011-05-25 17:48 PDT, chris fleizach
webkit-ews: commit-queue-
patch (1.63 KB, patch)
2011-05-25 18:35 PDT, chris fleizach
darin: review+
chris fleizach
Comment 1 2011-05-25 17:48:49 PDT
Early Warning System Bot
Comment 2 2011-05-25 18:29:13 PDT
chris fleizach
Comment 3 2011-05-25 18:35:50 PDT
Darin Adler
Comment 4 2011-05-26 11:52:06 PDT
Comment on attachment 94899 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=94899&action=review > Source/WebKit2/WebProcess/WebPage/WebPage.cpp:1969 > + bool windowIsVisible = true; > +#if PLATFORM(MAC) > + windowIsVisible = m_windowIsVisible; > +#endif > > + return windowIsVisible && m_page->focusController()->isFocused() && m_page->focusController()->isActive(); This could be done much cleaner: #if PLATFORM(MAC) if (!m_windowIsVisible) return false; #endif return m_page->focusController()->isFocused() && m_page->focusController()->isActive(); I’m also a bit surprised that we need to check isActive.
chris fleizach
Comment 5 2011-05-26 11:54:02 PDT
(In reply to comment #4) > (From update of attachment 94899 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=94899&action=review > > > Source/WebKit2/WebProcess/WebPage/WebPage.cpp:1969 > > + bool windowIsVisible = true; > > +#if PLATFORM(MAC) > > + windowIsVisible = m_windowIsVisible; > > +#endif > > > > + return windowIsVisible && m_page->focusController()->isFocused() && m_page->focusController()->isActive(); > > This could be done much cleaner: > > #if PLATFORM(MAC) > if (!m_windowIsVisible) > return false; > #endif > return m_page->focusController()->isFocused() && m_page->focusController()->isActive(); > > I’m also a bit surprised that we need to check isActive. Will double check if isActive() is necessary. Thanks
chris fleizach
Comment 6 2011-05-26 16:23:19 PDT
it looks like isActive is needed, otherwise we choose the wrong tab
chris fleizach
Comment 7 2011-06-01 15:02:15 PDT
Note You need to log in before you can comment on or make changes to this bug.