Changeset 93447 in webkit
- Timestamp:
- Aug 19, 2011 3:50:47 PM (13 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 2 added
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r93427 r93447 1 2011-08-19 Anders Carlsson <andersca@apple.com> 2 3 Make the complex text input state a tri-state enum instead of a boolean 4 https://bugs.webkit.org/show_bug.cgi?id=62245 5 6 Reviewed by Sam Weinig. 7 8 This is to prepare the infrastructure for supporting the updated Cocoa text input model for plug-ins. 9 10 * PluginProcess/PluginControllerProxy.cpp: 11 * PluginProcess/PluginControllerProxy.h: 12 * PluginProcess/mac/PluginControllerProxyMac.mm: 13 (WebKit::PluginControllerProxy::setComplexTextInputState): 14 (WebKit::PluginControllerProxy::compositingRenderServerPort): 15 * Shared/Plugins/mac: Added. 16 * Shared/Plugins/mac/PluginComplexTextInputState.h: Added. 17 (WebKit::isValidPluginComplexTextInputState): 18 * UIProcess/API/mac/PageClientImpl.h: 19 * UIProcess/API/mac/PageClientImpl.mm: 20 (WebKit::PageClientImpl::setPluginComplexTextInputState): 21 * UIProcess/API/mac/WKView.mm: 22 (-[WKView _setPluginComplexTextInputState:WebKit::pluginComplexTextInputIdentifier:]): 23 * UIProcess/API/mac/WKViewInternal.h: 24 * UIProcess/PageClient.h: 25 * UIProcess/WebPageProxy.h: 26 * UIProcess/WebPageProxy.messages.in: 27 * UIProcess/mac/WebPageProxyMac.mm: 28 (WebKit::WebPageProxy::setPluginComplexTextInputState): 29 * WebKit2.xcodeproj/project.pbxproj: 30 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: 31 (WebKit::NetscapePlugin::NetscapePlugin): 32 * WebProcess/Plugins/Netscape/NetscapePlugin.h: 33 * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm: 34 (WebKit::NetscapePlugin::platformSetFocus): 35 (WebKit::NetscapePlugin::windowFocusChanged): 36 (WebKit::NetscapePlugin::setComplexTextInputEnabled): 37 * WebProcess/Plugins/Netscape/mac/PluginProxyMac.mm: 38 (WebKit::PluginProxy::setComplexTextInputState): 39 * WebProcess/Plugins/PluginController.h: 40 * WebProcess/Plugins/PluginProxy.cpp: 41 * WebProcess/Plugins/PluginProxy.h: 42 * WebProcess/Plugins/PluginProxy.messages.in: 43 * WebProcess/Plugins/PluginView.cpp: 44 (WebKit::PluginView::~PluginView): 45 (WebKit::PluginView::setComplexTextInputState): 46 (WebKit::PluginView::compositingRenderServerPort): 47 * WebProcess/Plugins/PluginView.h: 48 1 49 2011-08-19 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> 2 50 -
trunk/Source/WebKit2/PluginProcess/PluginControllerProxy.cpp
r90764 r93447 362 362 } 363 363 364 #if PLATFORM(MAC)365 void PluginControllerProxy::setComplexTextInputEnabled(bool complexTextInputEnabled)366 {367 if (m_isComplexTextInputEnabled == complexTextInputEnabled)368 return;369 370 m_isComplexTextInputEnabled = complexTextInputEnabled;371 372 m_connection->connection()->send(Messages::PluginProxy::SetComplexTextInputEnabled(complexTextInputEnabled), m_pluginInstanceID);373 }374 375 mach_port_t PluginControllerProxy::compositingRenderServerPort()376 {377 return PluginProcess::shared().compositingRenderServerPort();378 }379 #endif380 381 364 String PluginControllerProxy::proxiesForURL(const String& urlString) 382 365 { -
trunk/Source/WebKit2/PluginProcess/PluginControllerProxy.h
r90764 r93447 97 97 98 98 #if PLATFORM(MAC) 99 virtual void setComplexTextInput Enabled(bool);99 virtual void setComplexTextInputState(PluginComplexTextInputState); 100 100 virtual mach_port_t compositingRenderServerPort(); 101 101 #endif -
trunk/Source/WebKit2/PluginProcess/mac/PluginControllerProxyMac.mm
r83624 r93447 29 29 #if ENABLE(PLUGIN_PROCESS) 30 30 31 #import "PluginProcess.h" 32 #import "PluginProxyMessages.h" 33 #import "WebKitSystemInterface.h" 34 #import "WebProcessConnection.h" 31 35 #import <QuartzCore/QuartzCore.h> 32 #import "PluginProcess.h"33 #import "WebKitSystemInterface.h"34 36 35 37 using namespace WebCore; 36 38 37 39 namespace WebKit { 40 41 void PluginControllerProxy::setComplexTextInputState(PluginComplexTextInputState pluginComplexTextInputState) 42 { 43 m_connection->connection()->send(Messages::PluginProxy::SetComplexTextInputState(pluginComplexTextInputState), m_pluginInstanceID); 44 } 45 46 mach_port_t PluginControllerProxy::compositingRenderServerPort() 47 { 48 return PluginProcess::shared().compositingRenderServerPort(); 49 } 38 50 39 51 void PluginControllerProxy::platformInitialize() -
trunk/Source/WebKit2/UIProcess/API/mac/PageClientImpl.h
r93314 r93447 95 95 96 96 virtual void accessibilityWebProcessTokenReceived(const CoreIPC::DataReference&); 97 virtual void set ComplexTextInputEnabled(uint64_t pluginComplexTextInputIdentifier, bool complexTextInputEnabled);97 virtual void setPluginComplexTextInputState(uint64_t pluginComplexTextInputIdentifier, PluginComplexTextInputState); 98 98 99 99 virtual void makeFirstResponder(); -
trunk/Source/WebKit2/UIProcess/API/mac/PageClientImpl.mm
r93314 r93447 343 343 #endif // USE(ACCELERATED_COMPOSITING) 344 344 345 void PageClientImpl::set ComplexTextInputEnabled(uint64_t pluginComplexTextInputIdentifier, bool complexTextInputEnabled)346 { 347 [m_wkView _set ComplexTextInputEnabled:complexTextInputEnabledpluginComplexTextInputIdentifier:pluginComplexTextInputIdentifier];345 void PageClientImpl::setPluginComplexTextInputState(uint64_t pluginComplexTextInputIdentifier, PluginComplexTextInputState pluginComplexTextInputState) 346 { 347 [m_wkView _setPluginComplexTextInputState:pluginComplexTextInputState pluginComplexTextInputIdentifier:pluginComplexTextInputIdentifier]; 348 348 } 349 349 -
trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm
r93337 r93447 2286 2286 } 2287 2287 2288 - (void)_set ComplexTextInputEnabled:(BOOL)complexTextInputEnabledpluginComplexTextInputIdentifier:(uint64_t)pluginComplexTextInputIdentifier2288 - (void)_setPluginComplexTextInputState:(WebKit::PluginComplexTextInputState)pluginComplexTextInputState pluginComplexTextInputIdentifier:(uint64_t)pluginComplexTextInputIdentifier 2289 2289 { 2290 2290 BOOL inputSourceChanged = _data->_pluginComplexTextInputIdentifier; 2291 BOOL complexTextInputEnabled = (pluginComplexTextInputState == PluginComplexTextInputEnabledLegacy); 2291 2292 2292 2293 if (complexTextInputEnabled) { -
trunk/Source/WebKit2/UIProcess/API/mac/WKViewInternal.h
r93337 r93447 24 24 */ 25 25 26 #import "PluginComplexTextInputState.h" 26 27 #import "WKView.h" 27 28 #import "WebFindOptions.h" … … 66 67 67 68 - (void)_setAccessibilityWebProcessToken:(NSData *)data; 68 - (void)_set ComplexTextInputEnabled:(BOOL)complexTextInputEnabledpluginComplexTextInputIdentifier:(uint64_t)pluginComplexTextInputIdentifier;69 - (void)_setPluginComplexTextInputState:(WebKit::PluginComplexTextInputState)pluginComplexTextInputState pluginComplexTextInputIdentifier:(uint64_t)pluginComplexTextInputIdentifier; 69 70 70 71 - (void)_setPageHasCustomRepresentation:(BOOL)pageHasCustomRepresentation; -
trunk/Source/WebKit2/UIProcess/PageClient.h
r93314 r93447 27 27 #define PageClient_h 28 28 29 #include "PluginComplexTextInputState.h" 29 30 #include "ShareableBitmap.h" 30 31 #include "WebPageProxy.h" … … 163 164 164 165 #if PLATFORM(MAC) 165 virtual void set ComplexTextInputEnabled(uint64_t pluginComplexTextInputIdentifier, bool complexTextInputEnabled) = 0;166 virtual void setPluginComplexTextInputState(uint64_t pluginComplexTextInputIdentifier, PluginComplexTextInputState) = 0; 166 167 virtual CGContextRef containingWindowGraphicsContext() = 0; 167 168 virtual void didPerformDictionaryLookup(const String&, double scaleFactor, const DictionaryPopupInfo&) = 0; -
trunk/Source/WebKit2/UIProcess/WebPageProxy.h
r93314 r93447 767 767 768 768 #if PLATFORM(MAC) 769 void set ComplexTextInputEnabled(uint64_t pluginComplexTextInputIdentifier, bool complexTextInputEnabled);769 void setPluginComplexTextInputState(uint64_t pluginComplexTextInputIdentifier, uint64_t complexTextInputState); 770 770 #endif 771 771 -
trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in
r93040 r93447 230 230 231 231 # Plug-in complex text input support messages 232 Set ComplexTextInputEnabled(uint64_t pluginComplexTextInputIdentifier, bool complexTextInputEnabled)232 SetPluginComplexTextInputState(uint64_t pluginComplexTextInputIdentifier, uint64_t complexTextInputState) 233 233 234 234 # Speech messages -
trunk/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm
r93040 r93447 32 32 #import "EditorState.h" 33 33 #import "NativeWebKeyboardEvent.h" 34 #import "PluginComplexTextInputState.h" 34 35 #import "PageClient.h" 35 36 #import "PageClientImpl.h" … … 42 43 - (void)speakString:(NSString *)string; 43 44 @end 45 46 #define MESSAGE_CHECK(assertion) MESSAGE_CHECK_BASE(assertion, process()->connection()) 44 47 45 48 using namespace WebCore; … … 340 343 } 341 344 342 void WebPageProxy::setComplexTextInputEnabled(uint64_t pluginComplexTextInputIdentifier, bool complexTextInputEnabled) 343 { 344 m_pageClient->setComplexTextInputEnabled(pluginComplexTextInputIdentifier, complexTextInputEnabled); 345 void WebPageProxy::setPluginComplexTextInputState(uint64_t pluginComplexTextInputIdentifier, uint64_t pluginComplexTextInputState) 346 { 347 MESSAGE_CHECK(isValidPluginComplexTextInputState(pluginComplexTextInputState)); 348 349 m_pageClient->setPluginComplexTextInputState(pluginComplexTextInputIdentifier, static_cast<PluginComplexTextInputState>(pluginComplexTextInputState)); 345 350 } 346 351 -
trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
r93233 r93447 175 175 1A92DC1112F8BA460017AF65 /* LayerTreeContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A92DC1012F8BA460017AF65 /* LayerTreeContext.h */; }; 176 176 1A92DC1312F8BAB90017AF65 /* LayerTreeContextMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A92DC1212F8BAB90017AF65 /* LayerTreeContextMac.mm */; }; 177 1A9FBA8D13FF04E600DEED67 /* PluginComplexTextInputState.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A9FBA8C13FF04E600DEED67 /* PluginComplexTextInputState.h */; }; 177 178 1AA1CC5D100FA1A10078DEBC /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AA1CC5C100FA1A10078DEBC /* QuartzCore.framework */; }; 178 179 1AA1CD07100FA1BA0078DEBC /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AA1CD06100FA1BA0078DEBC /* Carbon.framework */; }; … … 1087 1088 1A92DC1012F8BA460017AF65 /* LayerTreeContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LayerTreeContext.h; sourceTree = "<group>"; }; 1088 1089 1A92DC1212F8BAB90017AF65 /* LayerTreeContextMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = LayerTreeContextMac.mm; sourceTree = "<group>"; }; 1090 1A9FBA8C13FF04E600DEED67 /* PluginComplexTextInputState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PluginComplexTextInputState.h; sourceTree = "<group>"; }; 1089 1091 1AA1C79A100E7FC50078DEBC /* WebCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = WebCore.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 1090 1092 1AA1C7DE100E846E0078DEBC /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = JavaScriptCore.framework; sourceTree = BUILT_PRODUCTS_DIR; }; … … 2108 2110 sourceTree = "<group>"; 2109 2111 }; 2112 1A9FBA8B13FF04E600DEED67 /* mac */ = { 2113 isa = PBXGroup; 2114 children = ( 2115 1A9FBA8C13FF04E600DEED67 /* PluginComplexTextInputState.h */, 2116 ); 2117 path = mac; 2118 sourceTree = "<group>"; 2119 }; 2110 2120 1AA2E51A12E4C05600BC4966 /* cg */ = { 2111 2121 isa = PBXGroup; … … 2242 2252 isa = PBXGroup; 2243 2253 children = ( 2254 1A9FBA8B13FF04E600DEED67 /* mac */, 2244 2255 1A4A9C5212B816CF008FE984 /* Netscape */, 2245 2256 1A3D60FF13A7CC2A00F95D4E /* PluginModuleInfo.cpp */, … … 3811 3822 1A3D610213A7CC2A00F95D4E /* PluginModuleInfo.h in Headers */, 3812 3823 5D51845613BCF9CC00C7FF4A /* APIClientTraits.h in Headers */, 3824 1A9FBA8D13FF04E600DEED67 /* PluginComplexTextInputState.h in Headers */, 3813 3825 ); 3814 3826 runOnlyForDeploymentPostprocessing = 0; -
trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp
r91793 r93447 76 76 , m_pluginHasFocus(false) 77 77 , m_windowHasFocus(false) 78 , m_isComplexTextInputEnabled(false) 78 79 #ifndef NP_NO_CARBON 79 80 , m_nullEventTimer(RunLoop::main(), this, &NetscapePlugin::nullEventTimerFired) -
trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.h
r90764 r93447 191 191 virtual uint64_t pluginComplexTextInputIdentifier() const; 192 192 virtual void sendComplexTextInput(const String& textInput); 193 194 void setComplexTextInputEnabled(bool); 193 195 #endif 194 196 … … 240 242 bool m_windowHasFocus; 241 243 244 // Whether complex text input is enabled. 245 bool m_isComplexTextInputEnabled; 246 242 247 WebCore::IntRect m_windowFrameInScreenCoordinates; 243 248 WebCore::IntRect m_viewFrameInWindowCoordinates; -
trunk/Source/WebKit2/WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm
r90326 r93447 788 788 { 789 789 m_pluginHasFocus = hasFocus; 790 controller()->setComplexTextInputEnabled(m_pluginHasFocus && m_windowHasFocus);790 setComplexTextInputEnabled(m_pluginHasFocus && m_windowHasFocus); 791 791 792 792 switch (m_eventModel) { … … 816 816 { 817 817 m_windowHasFocus = hasFocus; 818 controller()->setComplexTextInputEnabled(m_pluginHasFocus && m_windowHasFocus);818 setComplexTextInputEnabled(m_pluginHasFocus && m_windowHasFocus); 819 819 820 820 switch (m_eventModel) { … … 976 976 } 977 977 978 void NetscapePlugin::setComplexTextInputEnabled(bool complexTextInputEnabled) 979 { 980 if (m_isComplexTextInputEnabled == complexTextInputEnabled) 981 return; 982 983 m_isComplexTextInputEnabled = complexTextInputEnabled; 984 controller()->setComplexTextInputState(complexTextInputEnabled ? PluginComplexTextInputEnabledLegacy : PluginComplexTextInputDisabled); 985 } 986 978 987 PlatformLayer* NetscapePlugin::pluginLayer() 979 988 { -
trunk/Source/WebKit2/WebProcess/Plugins/Netscape/mac/PluginProxyMac.mm
r82997 r93447 29 29 #if ENABLE(PLUGIN_PROCESS) 30 30 31 #import "PluginController.h" 31 32 #import <WebKitSystemInterface.h> 32 33 … … 55 56 } 56 57 58 void PluginProxy::setComplexTextInputState(uint64_t complexTextInputState) 59 { 60 controller()->setComplexTextInputState(static_cast<PluginComplexTextInputState>(complexTextInputState)); 61 } 62 57 63 } // namespace WebKit 58 64 -
trunk/Source/WebKit2/WebProcess/Plugins/PluginController.h
r86577 r93447 27 27 #define PluginController_h 28 28 29 #include "PluginComplexTextInputState.h" 29 30 #include <wtf/Forward.h> 30 31 … … 110 111 #if PLATFORM(MAC) 111 112 // Tells the controller that complex text input be enabled or disabled for the plug-in. 112 virtual void setComplexTextInput Enabled(bool) = 0;113 virtual void setComplexTextInputState(PluginComplexTextInputState) = 0; 113 114 114 115 // Returns the mach port of the compositing render server. -
trunk/Source/WebKit2/WebProcess/Plugins/PluginProxy.cpp
r90764 r93447 471 471 } 472 472 473 #if PLATFORM(MAC)474 void PluginProxy::setComplexTextInputEnabled(bool complexTextInputEnabled)475 {476 controller()->setComplexTextInputEnabled(complexTextInputEnabled);477 }478 #endif479 480 473 void PluginProxy::update(const IntRect& paintedRect) 481 474 { -
trunk/Source/WebKit2/WebProcess/Plugins/PluginProxy.h
r90764 r93447 120 120 void setStatusbarText(const String& statusbarText); 121 121 #if PLATFORM(MAC) 122 void setComplexTextInput Enabled(bool);122 void setComplexTextInputState(uint64_t); 123 123 #endif 124 124 -
trunk/Source/WebKit2/WebProcess/Plugins/PluginProxy.messages.in
r86522 r93447 59 59 #if PLATFORM(MAC) 60 60 # Change whether complext text input is enabled for this plug-in. 61 SetComplexTextInput Enabled(bool complexTextInputEnabled)61 SetComplexTextInputState(uint64_t complexTextInputState) 62 62 #endif 63 63 } -
trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp
r92491 r93447 288 288 m_isBeingDestroyed = false; 289 289 #if PLATFORM(MAC) 290 setComplexTextInput Enabled(false);290 setComplexTextInputState(PluginComplexTextInputDisabled); 291 291 #endif 292 292 } … … 1068 1068 1069 1069 #if PLATFORM(MAC) 1070 void PluginView::setComplexTextInput Enabled(bool complexTextInputEnabled)1071 { 1072 m_webPage->send(Messages::WebPageProxy::Set ComplexTextInputEnabled(m_plugin->pluginComplexTextInputIdentifier(), complexTextInputEnabled));1070 void PluginView::setComplexTextInputState(PluginComplexTextInputState pluginComplexTextInputState) 1071 { 1072 m_webPage->send(Messages::WebPageProxy::SetPluginComplexTextInputState(m_plugin->pluginComplexTextInputIdentifier(), pluginComplexTextInputState)); 1073 1073 } 1074 1074 … … 1077 1077 return WebProcess::shared().compositingRenderServerPort(); 1078 1078 } 1079 1080 1079 #endif 1081 1080 -
trunk/Source/WebKit2/WebProcess/Plugins/PluginView.h
r90764 r93447 142 142 #endif 143 143 #if PLATFORM(MAC) 144 virtual void setComplexTextInput Enabled(bool);144 virtual void setComplexTextInputState(PluginComplexTextInputState); 145 145 virtual mach_port_t compositingRenderServerPort(); 146 146 #endif
Note: See TracChangeset
for help on using the changeset viewer.