[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-10851-g50815da

andersca at apple.com andersca at apple.com
Wed Dec 22 18:36:55 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 68adef16d9c8b5aa85bb92289775d0ba3d5ee5bf
Author: andersca at apple.com <andersca at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Dec 14 17:54:39 2010 +0000

    Pass the complex text input status to the WKView
    https://bugs.webkit.org/show_bug.cgi?id=50993
    
    Reviewed by Kevin Decker.
    
    * UIProcess/API/mac/PageClientImpl.h:
    * UIProcess/API/mac/PageClientImpl.mm:
    (WebKit::PageClientImpl::setComplexTextInputEnabled):
    * UIProcess/API/mac/WKView.mm:
    (-[WKView _setComplexTextInputEnabled:pluginComplexTextInputIdentifier:]):
    * UIProcess/API/mac/WKViewInternal.h:
    * UIProcess/PageClient.h:
    * UIProcess/WebPageProxy.cpp:
    (WebKit::WebPageProxy::setComplexTextInputEnabled):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74037 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index b6d1967..b3a490d 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,20 @@
+2010-12-13  Anders Carlsson  <andersca at apple.com>
+
+        Reviewed by Kevin Decker.
+
+        Pass the complex text input status to the WKView
+        https://bugs.webkit.org/show_bug.cgi?id=50993
+
+        * UIProcess/API/mac/PageClientImpl.h:
+        * UIProcess/API/mac/PageClientImpl.mm:
+        (WebKit::PageClientImpl::setComplexTextInputEnabled):
+        * UIProcess/API/mac/WKView.mm:
+        (-[WKView _setComplexTextInputEnabled:pluginComplexTextInputIdentifier:]):
+        * UIProcess/API/mac/WKViewInternal.h:
+        * UIProcess/PageClient.h:
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::setComplexTextInputEnabled):
+
 2010-12-14  Benjamin Poulain  <benjamin.poulain at nokia.com>
 
         Reviewed by Kenneth Rohde Christiansen.
diff --git a/WebKit2/UIProcess/API/mac/PageClientImpl.h b/WebKit2/UIProcess/API/mac/PageClientImpl.h
index cddb96a..76d0e84 100644
--- a/WebKit2/UIProcess/API/mac/PageClientImpl.h
+++ b/WebKit2/UIProcess/API/mac/PageClientImpl.h
@@ -76,6 +76,8 @@ private:
     virtual void pageDidLeaveAcceleratedCompositing();
 #endif
 
+    virtual void setComplexTextInputEnabled(uint64_t pluginComplexTextInputIdentifier, bool complexTextInputEnabled);
+
     virtual void didCommitLoadForMainFrame(bool useCustomRepresentation);
     virtual void didFinishLoadingDataForCustomRepresentation(const CoreIPC::DataReference&);
 
diff --git a/WebKit2/UIProcess/API/mac/PageClientImpl.mm b/WebKit2/UIProcess/API/mac/PageClientImpl.mm
index 68f1838..850c71a 100644
--- a/WebKit2/UIProcess/API/mac/PageClientImpl.mm
+++ b/WebKit2/UIProcess/API/mac/PageClientImpl.mm
@@ -274,6 +274,11 @@ void PageClientImpl::pageDidLeaveAcceleratedCompositing()
 }
 #endif // USE(ACCELERATED_COMPOSITING)
 
+void PageClientImpl::setComplexTextInputEnabled(uint64_t pluginComplexTextInputIdentifier, bool complexTextInputEnabled)
+{
+    [m_wkView _setComplexTextInputEnabled:complexTextInputEnabled pluginComplexTextInputIdentifier:pluginComplexTextInputIdentifier];
+}
+
 void PageClientImpl::didCommitLoadForMainFrame(bool useCustomRepresentation)
 {
     [m_wkView _setPageHasCustomRepresentation:useCustomRepresentation];
diff --git a/WebKit2/UIProcess/API/mac/WKView.mm b/WebKit2/UIProcess/API/mac/WKView.mm
index 42439ed..88be06b 100644
--- a/WebKit2/UIProcess/API/mac/WKView.mm
+++ b/WebKit2/UIProcess/API/mac/WKView.mm
@@ -107,6 +107,9 @@ struct EditCommandState {
     NSEvent *_keyDownEventBeingResent;
     Vector<KeypressCommand> _commandsList;
 
+    // The identifier of the plug-in we want to send complex text input to, or 0 if there is none.
+    uint64_t _pluginComplexTextInputIdentifier;
+
     BOOL _isSelectionNone;
     BOOL _isSelectionEditable;
     BOOL _isSelectionInPasswordField;
@@ -1149,6 +1152,30 @@ static bool isViewVisible(NSView *view)
 }
 #endif // USE(ACCELERATED_COMPOSITING)
 
+- (void)_setComplexTextInputEnabled:(BOOL)complexTextInputEnabled pluginComplexTextInputIdentifier:(uint64_t)pluginComplexTextInputIdentifier
+{
+    BOOL inputSourceChanged = _data->_pluginComplexTextInputIdentifier;
+
+    if (complexTextInputEnabled) {
+        // Check if we're already allowing text input for this plug-in.
+        if (pluginComplexTextInputIdentifier == _data->_pluginComplexTextInputIdentifier)
+            return;
+
+        _data->_pluginComplexTextInputIdentifier = pluginComplexTextInputIdentifier;
+
+    } else {
+        // Check if we got a request to disable complex text input for a plug-in that is not the current plug-in.
+        if (pluginComplexTextInputIdentifier != _data->_pluginComplexTextInputIdentifier)
+            return;
+
+        _data->_pluginComplexTextInputIdentifier = 0;
+    }
+
+    if (inputSourceChanged) {
+        // Inform the out of line window that the input source changed.
+    }
+}
+
 - (void)_setPageHasCustomRepresentation:(BOOL)pageHasCustomRepresentation
 {
     _data->_pdfViewController = nullptr;
diff --git a/WebKit2/UIProcess/API/mac/WKViewInternal.h b/WebKit2/UIProcess/API/mac/WKViewInternal.h
index 8c8b64e..c348e0a 100644
--- a/WebKit2/UIProcess/API/mac/WKViewInternal.h
+++ b/WebKit2/UIProcess/API/mac/WKViewInternal.h
@@ -54,6 +54,8 @@ namespace WebKit {
 - (void)_pageDidLeaveAcceleratedCompositing;
 #endif
 
+- (void)_setComplexTextInputEnabled:(BOOL)complexTextInputEnabled pluginComplexTextInputIdentifier:(uint64_t)pluginComplexTextInputIdentifier;
+
 - (void)_setPageHasCustomRepresentation:(BOOL)pageHasCustomRepresentation;
 - (void)_didFinishLoadingDataForCustomRepresentation:(const CoreIPC::DataReference&)dataReference;
 
diff --git a/WebKit2/UIProcess/PageClient.h b/WebKit2/UIProcess/PageClient.h
index 460d194..a111648 100644
--- a/WebKit2/UIProcess/PageClient.h
+++ b/WebKit2/UIProcess/PageClient.h
@@ -93,6 +93,10 @@ public:
     virtual HWND nativeWindow() = 0;
 #endif
 
+#if PLATFORM(MAC)
+    virtual void setComplexTextInputEnabled(uint64_t pluginComplexTextInputIdentifier, bool complexTextInputEnabled) = 0;
+#endif
+
     // Custom representations.
     virtual void didCommitLoadForMainFrame(bool useCustomRepresentation) = 0;
     virtual void didFinishLoadingDataForCustomRepresentation(const CoreIPC::DataReference&) = 0;
diff --git a/WebKit2/UIProcess/WebPageProxy.cpp b/WebKit2/UIProcess/WebPageProxy.cpp
index cddda13..23da8a7 100644
--- a/WebKit2/UIProcess/WebPageProxy.cpp
+++ b/WebKit2/UIProcess/WebPageProxy.cpp
@@ -1697,7 +1697,7 @@ void WebPageProxy::didFinishLoadingDataForCustomRepresentation(const CoreIPC::Da
 #if PLATFORM(MAC)
 void WebPageProxy::setComplexTextInputEnabled(uint64_t pluginComplexTextInputIdentifier, bool complexTextInputEnabled)
 {
-    // FIXME: Call the page client.
+    m_pageClient->setComplexTextInputEnabled(pluginComplexTextInputIdentifier, complexTextInputEnabled);
 }
 #endif
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list