Changeset 73956 in webkit
- Timestamp:
- Dec 13, 2010 1:53:11 PM (13 years ago)
- Location:
- trunk/WebKit2
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit2/ChangeLog
r73952 r73956 1 2010-12-13 Anders Carlsson <andersca@apple.com> 2 3 Reviewed by Sam Weinig. 4 5 Add the ability for plug-ins to toggle complex text input 6 https://bugs.webkit.org/show_bug.cgi?id=50966 7 8 * PluginProcess/PluginControllerProxy.cpp: 9 (WebKit::PluginControllerProxy::PluginControllerProxy): 10 Initialize m_isComplexTextInputEnabled. 11 12 (WebKit::PluginControllerProxy::setComplexTextInputEnabled): 13 Update m_isComplexTextInputEnabled. 14 15 * PluginProcess/PluginControllerProxy.h: 16 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: 17 (WebKit::NetscapePlugin::NetscapePlugin): 18 Initialize m_pluginHasFocus and m_windowHasFocus. 19 20 * WebProcess/Plugins/Netscape/NetscapePlugin.h: 21 (WebKit::NetscapePlugin::isWindowActive): 22 Return m_windowHasFocus. 23 24 * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm: 25 (WebKit::NetscapePlugin::platformSetFocus): 26 Update m_pluginHasFocus and call setComplexTextInputEnabled. 27 28 (WebKit::NetscapePlugin::windowFocusChanged): 29 Update m_windowHasFocus and call setComplexTextInputEnabled. 30 31 * WebProcess/Plugins/PluginController.h: 32 Add setComplexTextInputEnabled. 33 34 * WebProcess/Plugins/PluginView.cpp: 35 (WebKit::PluginView::setComplexTextInputEnabled): 36 * WebProcess/Plugins/PluginView.h: 37 Add setComplexTextInputEnabled 38 1 39 2010-12-13 David Hyatt <hyatt@apple.com> 2 40 -
trunk/WebKit2/PluginProcess/PluginControllerProxy.cpp
r73419 r73956 58 58 , m_paintTimer(RunLoop::main(), this, &PluginControllerProxy::paint) 59 59 , m_waitingForDidUpdate(false) 60 #if PLATFORM(MAC) 61 , m_isComplexTextInputEnabled(false) 62 #endif 60 63 { 61 64 } … … 233 236 } 234 237 238 void PluginControllerProxy::setComplexTextInputEnabled(bool complexTextInputEnabled) 239 { 240 if (m_isComplexTextInputEnabled == complexTextInputEnabled) 241 return; 242 243 m_isComplexTextInputEnabled = complexTextInputEnabled; 244 // FIXME: Let the web process know that this plug-in wants complex text input enabled. 245 } 246 235 247 String PluginControllerProxy::proxiesForURL(const String& urlString) 236 248 { -
trunk/WebKit2/PluginProcess/PluginControllerProxy.h
r73090 r73956 88 88 virtual bool isAcceleratedCompositingEnabled(); 89 89 virtual void pluginProcessCrashed(); 90 91 #if PLATFORM(MAC) 92 virtual void setComplexTextInputEnabled(bool); 93 #endif 94 90 95 virtual String proxiesForURL(const String&); 91 96 virtual String cookiesForURL(const String&); … … 149 154 bool m_waitingForDidUpdate; 150 155 151 // The backing store that this plug-in draws into. 152 RefPtr<BackingStore> m_backingStore; 156 #if PLATFORM(MAC) 157 // Whether complex text input is enabled for this plug-in. 158 bool m_isComplexTextInputEnabled; 153 159 154 #if PLATFORM(MAC)155 160 // For CA plug-ins, this holds the information needed to export the layer hierarchy to the UI process. 156 161 RetainPtr<WKCARemoteLayerClientRef> m_remoteLayerClient; 157 162 #endif 163 164 // The backing store that this plug-in draws into. 165 RefPtr<BackingStore> m_backingStore; 158 166 }; 159 167 -
trunk/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp
r73419 r73956 68 68 , m_drawingModel(static_cast<NPDrawingModel>(-1)) 69 69 , m_eventModel(static_cast<NPEventModel>(-1)) 70 , m_pluginHasFocus(false) 71 , m_windowHasFocus(false) 70 72 #ifndef NP_NO_CARBON 71 73 , m_nullEventTimer(RunLoop::main(), this, &NetscapePlugin::nullEventTimerFired) 72 74 , m_npCGContext() 73 , m_isWindowActive(false)74 75 #endif 75 76 #endif -
trunk/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.h
r73419 r73956 56 56 #ifndef NP_NO_CARBON 57 57 WindowRef windowRef() const; 58 bool isWindowActive() const { return m_ isWindowActive; }58 bool isWindowActive() const { return m_windowHasFocus; } 59 59 60 60 static NetscapePlugin* netscapePluginFromWindow(WindowRef); … … 196 196 NPEventModel m_eventModel; 197 197 RetainPtr<PlatformLayer> m_pluginLayer; 198 199 bool m_pluginHasFocus; 200 bool m_windowHasFocus; 201 198 202 #ifndef NP_NO_CARBON 199 203 void nullEventTimerFired(); … … 203 207 RunLoop::Timer<NetscapePlugin> m_nullEventTimer; 204 208 NP_CGContext m_npCGContext; 205 bool m_isWindowActive;206 209 #endif 207 210 #elif PLATFORM(WIN) -
trunk/WebKit2/WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm
r73393 r73956 26 26 #include "NetscapePlugin.h" 27 27 28 #include "PluginController.h" 28 29 #include "WebEvent.h" 29 30 #include <WebCore/GraphicsContext.h> … … 603 604 void NetscapePlugin::platformSetFocus(bool hasFocus) 604 605 { 606 m_pluginHasFocus = hasFocus; 607 m_pluginController->setComplexTextInputEnabled(m_pluginHasFocus && m_windowHasFocus); 608 605 609 switch (m_eventModel) { 606 610 case NPEventModelCocoa: { … … 628 632 void NetscapePlugin::windowFocusChanged(bool hasFocus) 629 633 { 634 m_windowHasFocus = hasFocus; 635 m_pluginController->setComplexTextInputEnabled(m_pluginHasFocus && m_windowHasFocus); 636 630 637 switch (m_eventModel) { 631 638 case NPEventModelCocoa: { … … 639 646 #ifndef NP_NO_CARBON 640 647 case NPEventModelCarbon: { 641 m_isWindowActive = hasFocus;642 643 648 HiliteWindow(windowRef(), hasFocus); 644 649 if (hasFocus) -
trunk/WebKit2/WebProcess/Plugins/PluginController.h
r68962 r73956 89 89 #endif 90 90 91 #if PLATFORM(MAC) 92 // Tells the controller that complex text input be enabled or disabled for the plug-in. 93 virtual void setComplexTextInputEnabled(bool) = 0; 94 #endif 95 91 96 // Returns the proxies for the given URL or null on failure. 92 97 virtual String proxiesForURL(const String&) = 0; -
trunk/WebKit2/WebProcess/Plugins/PluginView.cpp
r73444 r73956 870 870 #endif 871 871 872 #if PLATFORM(MAC) 873 void PluginView::setComplexTextInputEnabled(bool) 874 { 875 // This should never be called. 876 ASSERT_NOT_REACHED(); 877 } 878 #endif 879 872 880 String PluginView::proxiesForURL(const String& urlString) 873 881 { -
trunk/WebKit2/WebProcess/Plugins/PluginView.h
r73090 r73956 126 126 virtual HWND nativeParentWindow(); 127 127 #endif 128 #if PLATFORM(MAC) 129 virtual void setComplexTextInputEnabled(bool); 130 #endif 128 131 virtual String proxiesForURL(const String&); 129 132 virtual String cookiesForURL(const String&);
Note: See TracChangeset
for help on using the changeset viewer.