Title: [113261] trunk/Source/WebKit2
- Revision
- 113261
- Author
- [email protected]
- Date
- 2012-04-04 16:28:25 -0700 (Wed, 04 Apr 2012)
Log Message
Text input doesn't work for some Flash forms
https://bugs.webkit.org/show_bug.cgi?id=83232
<rdar://problem/11186162>
Reviewed by Alexey Proskuryakov.
If a plug-in is instantiated when the WKView is not focused, text input wouldn't work. The reason for this
is that WebPage::windowIsFocused() would only return true if the window and the WKView are both focused. Rename
this member function to windowAndWebPageAreFocused, add a new windowIsFocused member function that does the right thing
and change WebPage::focusedWebPage to use windowAndWebPageAreFocused.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::windowIsFocused):
(WebKit):
(WebKit::WebPage::windowAndWebPageAreFocused):
* WebProcess/WebPage/WebPage.h:
(WebPage):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::focusedWebPage):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (113260 => 113261)
--- trunk/Source/WebKit2/ChangeLog 2012-04-04 23:23:28 UTC (rev 113260)
+++ trunk/Source/WebKit2/ChangeLog 2012-04-04 23:28:25 UTC (rev 113261)
@@ -1,3 +1,25 @@
+2012-04-04 Anders Carlsson <[email protected]>
+
+ Text input doesn't work for some Flash forms
+ https://bugs.webkit.org/show_bug.cgi?id=83232
+ <rdar://problem/11186162>
+
+ Reviewed by Alexey Proskuryakov.
+
+ If a plug-in is instantiated when the WKView is not focused, text input wouldn't work. The reason for this
+ is that WebPage::windowIsFocused() would only return true if the window and the WKView are both focused. Rename
+ this member function to windowAndWebPageAreFocused, add a new windowIsFocused member function that does the right thing
+ and change WebPage::focusedWebPage to use windowAndWebPageAreFocused.
+
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::windowIsFocused):
+ (WebKit):
+ (WebKit::WebPage::windowAndWebPageAreFocused):
+ * WebProcess/WebPage/WebPage.h:
+ (WebPage):
+ * WebProcess/WebProcess.cpp:
+ (WebKit::WebProcess::focusedWebPage):
+
2012-03-15 Jer Noble <[email protected]>
Full Screen mode should cancel before navigation.
Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (113260 => 113261)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2012-04-04 23:23:28 UTC (rev 113260)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2012-04-04 23:28:25 UTC (rev 113261)
@@ -2465,12 +2465,17 @@
bool WebPage::windowIsFocused() const
{
+ return m_page->focusController()->isActive();
+}
+
+bool WebPage::windowAndWebPageAreFocused() const
+{
#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)
{
Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h (113260 => 113261)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h 2012-04-04 23:23:28 UTC (rev 113260)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h 2012-04-04 23:28:25 UTC (rev 113261)
@@ -304,6 +304,7 @@
void setLayerHostingMode(LayerHostingMode);
bool windowIsVisible() const { return m_windowIsVisible; }
+ void updatePluginsActiveAndFocusedState();
const WebCore::IntRect& windowFrameInScreenCoordinates() const { return m_windowFrameInScreenCoordinates; }
const WebCore::IntRect& viewFrameInWindowCoordinates() const { return m_viewFrameInWindowCoordinates; }
#elif PLATFORM(WIN)
@@ -311,6 +312,7 @@
#endif
bool windowIsFocused() const;
+ bool windowAndWebPageAreFocused() const;
void installPageOverlay(PassRefPtr<PageOverlay>);
void uninstallPageOverlay(PageOverlay*, bool fadeOut);
bool hasPageOverlay() const { return m_pageOverlay; }
Modified: trunk/Source/WebKit2/WebProcess/WebProcess.cpp (113260 => 113261)
--- trunk/Source/WebKit2/WebProcess/WebProcess.cpp 2012-04-04 23:23:28 UTC (rev 113260)
+++ trunk/Source/WebKit2/WebProcess/WebProcess.cpp 2012-04-04 23:28:25 UTC (rev 113261)
@@ -503,7 +503,7 @@
HashMap<uint64_t, RefPtr<WebPage> >::const_iterator end = m_pageMap.end();
for (HashMap<uint64_t, RefPtr<WebPage> >::const_iterator it = m_pageMap.begin(); it != end; ++it) {
WebPage* page = (*it).second.get();
- if (page->windowIsFocused())
+ if (page->windowAndWebPageAreFocused())
return page;
}
return 0;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes