Title: [109826] trunk/Source/WebKit2
Revision
109826
Author
enr...@apple.com
Date
2012-03-05 17:35:47 -0800 (Mon, 05 Mar 2012)

Log Message

Can't type on some websites (plug-ins steal key events).
<rdar://problem/10892291>

When the plugin is disabled, it is necessary to reset _pluginComplexTextInputIdentifier
in order to return the correct input context. Failure to do so results in the inputContext
method to return the plugin input context instead of the context of the browser view.
        
Reviewed by Sam Weinig.

* UIProcess/API/mac/WKView.mm:
(-[WKView _setPluginComplexTextInputState:]):
(-[WKView _handlePluginComplexTextInputKeyDown:]):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (109825 => 109826)


--- trunk/Source/WebKit2/ChangeLog	2012-03-06 01:33:34 UTC (rev 109825)
+++ trunk/Source/WebKit2/ChangeLog	2012-03-06 01:35:47 UTC (rev 109826)
@@ -1,3 +1,18 @@
+2012-03-05  Enrica Casucci  <enr...@apple.com>
+
+        Can't type on some websites (plug-ins steal key events).
+        <rdar://problem/10892291>
+
+        When the plugin is disabled, it is necessary to reset _pluginComplexTextInputIdentifier
+        in order to return the correct input context. Failure to do so results in the inputContext
+        method to return the plugin input context instead of the context of the browser view.
+        
+        Reviewed by Sam Weinig.
+
+        * UIProcess/API/mac/WKView.mm:
+        (-[WKView _setPluginComplexTextInputState:]):
+        (-[WKView _handlePluginComplexTextInputKeyDown:]):
+
 2012-03-05  Anders Carlsson  <ander...@apple.com>
 
         Be more aggressive about repainting page overlays

Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm (109825 => 109826)


--- trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm	2012-03-06 01:33:34 UTC (rev 109825)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm	2012-03-06 01:35:47 UTC (rev 109826)
@@ -374,6 +374,7 @@
 
     // Send back an empty string to the plug-in. This will disable text input.
     _data->_page->sendComplexTextInputToPlugin(_data->_pluginComplexTextInputIdentifier, String());
+    _data->_pluginComplexTextInputIdentifier = 0;   // Always reset the identifier when the plugin is disabled.
 }
 
 typedef HashMap<SEL, String> SelectorNameMap;
@@ -1263,8 +1264,10 @@
     if (string) {
         _data->_page->sendComplexTextInputToPlugin(_data->_pluginComplexTextInputIdentifier, string);
 
-        if (!usingLegacyCocoaTextInput)
+        if (!usingLegacyCocoaTextInput) {
             _data->_pluginComplexTextInputState = PluginComplexTextInputDisabled;
+            _data->_pluginComplexTextInputIdentifier = 0;   // Always reset the identifier when the plugin is disabled.
+        }
     }
 
     return didHandleEvent;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to