https://bugs.webkit.org/show_bug.cgi?id=61492
Reviewed by Darin Adler.
The method for determining which WebPage is actually focused and foreground was faulty. More
extensive checks are required to check which WebPage should be returned as the focusable one.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::windowIsFocused):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@87458
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2011-05-26 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Safari's AXFocusedUIElement attribute returns WebArea object with AXSelectedTextMarkerRange of nil
+ https://bugs.webkit.org/show_bug.cgi?id=61492
+
+ The method for determining which WebPage is actually focused and foreground was faulty. More
+ extensive checks are required to check which WebPage should be returned as the focusable one.
+
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::windowIsFocused):
+
2011-05-26 Jon Lee <jonlee@apple.com>
Reviewed by Darin Adler.
}
#endif
-
+
bool WebPage::windowIsFocused() const
{
- return m_page->focusController()->isActive();
-}
-
+#if PLATFORM(MAC)
+ if (!m_windowIsVisible)
+ return false;
+#endif
+ return m_page->focusController()->isFocused() && m_page->focusController()->isActive();
+}
+
void WebPage::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments)
{
if (messageID.is<CoreIPC::MessageClassDrawingAreaLegacy>()) {