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

weinig at apple.com weinig at apple.com
Wed Dec 22 13:20:36 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 3195759f7c7b53aa9da4d3de020e637a2db9cd00
Author: weinig at apple.com <weinig at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sun Sep 12 01:50:30 2010 +0000

    Implement WebKit2 callback equivalent to - [WebUIDelegate webView:setStatusText:]
    <rdar://problem/8359252>
    https://bugs.webkit.org/show_bug.cgi?id=45605
    
    Reviewed by Dan Bernstein.
    
    WebKit2:
    
    * Shared/CoreIPCSupport/WebPageProxyMessageKinds.h:
    * UIProcess/API/C/WKPage.h:
    * UIProcess/API/qt/qwkpage.cpp:
    (QWKPage::QWKPage):
    * UIProcess/WebPageProxy.cpp:
    (WebKit::WebPageProxy::didReceiveMessage):
    (WebKit::WebPageProxy::setStatusText):
    * UIProcess/WebPageProxy.h:
    * UIProcess/WebUIClient.cpp:
    (WebKit::WebUIClient::setStatusText):
    * UIProcess/WebUIClient.h:
    * WebProcess/WebCoreSupport/WebChromeClient.cpp:
    (WebKit::WebChromeClient::setStatusbarText):
    
    WebKitTools:
    
    * MiniBrowser/mac/BrowserWindowController.m:
    (setStatusText):
    (contentsSizeChanged):
    (-[BrowserWindowController awakeFromNib]):
    * MiniBrowser/win/BrowserView.cpp:
    (runJavaScriptConfirm):
    (runJavaScriptPrompt):
    (setStatusText):
    (contentsSizeChanged):
    (BrowserView::create):
    * WebKitTestRunner/TestController.cpp:
    (WTR::createOtherPage):
    (WTR::TestController::initialize):
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@67312 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index b5a295c..98f63be 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -2,6 +2,28 @@
 
         Reviewed by Dan Bernstein.
 
+        Implement WebKit2 callback equivalent to - [WebUIDelegate webView:setStatusText:]
+        <rdar://problem/8359252>
+        https://bugs.webkit.org/show_bug.cgi?id=45605
+
+        * Shared/CoreIPCSupport/WebPageProxyMessageKinds.h:
+        * UIProcess/API/C/WKPage.h:
+        * UIProcess/API/qt/qwkpage.cpp:
+        (QWKPage::QWKPage):
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::didReceiveMessage):
+        (WebKit::WebPageProxy::setStatusText):
+        * UIProcess/WebPageProxy.h:
+        * UIProcess/WebUIClient.cpp:
+        (WebKit::WebUIClient::setStatusText):
+        * UIProcess/WebUIClient.h:
+        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
+        (WebKit::WebChromeClient::setStatusbarText):
+
+2010-09-11  Sam Weinig  <sam at webkit.org>
+
+        Reviewed by Dan Bernstein.
+
         Add callback mechanism for the getting the source of a frame
         <rdar://problem/8364681>
         https://bugs.webkit.org/show_bug.cgi?id=45604
diff --git a/WebKit2/Shared/CoreIPCSupport/WebPageProxyMessageKinds.h b/WebKit2/Shared/CoreIPCSupport/WebPageProxyMessageKinds.h
index 1cf49ce..138c569 100644
--- a/WebKit2/Shared/CoreIPCSupport/WebPageProxyMessageKinds.h
+++ b/WebKit2/Shared/CoreIPCSupport/WebPageProxyMessageKinds.h
@@ -65,6 +65,7 @@ enum Kind {
     DidStartProgress,
     DidStartProvisionalLoadForFrame,
     SetCursor,
+    SetStatusText,
     SetToolTip,
     TakeFocus,
     WillSubmitForm,
diff --git a/WebKit2/UIProcess/API/C/WKPage.h b/WebKit2/UIProcess/API/C/WKPage.h
index 78ac012..58f20d6 100644
--- a/WebKit2/UIProcess/API/C/WKPage.h
+++ b/WebKit2/UIProcess/API/C/WKPage.h
@@ -140,6 +140,7 @@ typedef void (*WKPageCloseCallback)(WKPageRef page, const void *clientInfo);
 typedef void (*WKPageRunJavaScriptAlertCallback)(WKPageRef page, WKStringRef alertText, WKFrameRef frame, const void *clientInfo);
 typedef bool (*WKPageRunJavaScriptConfirmCallback)(WKPageRef page, WKStringRef message, WKFrameRef frame, const void *clientInfo);
 typedef WKStringRef (*WKPageRunJavaScriptPromptCallback)(WKPageRef page, WKStringRef message, WKStringRef defaultValue, WKFrameRef frame, const void *clientInfo);
+typedef void (*WKPageSetStatusTextCallback)(WKPageRef page, WKStringRef text, const void *clientInfo);
 typedef void (*WKPageContentsSizeChangedCallback)(WKPageRef page, int width, int height, WKFrameRef frame, const void *clientInfo);
 
 struct WKPageUIClient {
@@ -151,6 +152,7 @@ struct WKPageUIClient {
     WKPageRunJavaScriptAlertCallback                                    runJavaScriptAlert;
     WKPageRunJavaScriptConfirmCallback                                  runJavaScriptConfirm;
     WKPageRunJavaScriptPromptCallback                                   runJavaScriptPrompt;
+    WKPageSetStatusTextCallback                                         setStatusText;
     WKPageContentsSizeChangedCallback                                   contentsSizeChanged;
 };
 typedef struct WKPageUIClient WKPageUIClient;
diff --git a/WebKit2/UIProcess/API/qt/qwkpage.cpp b/WebKit2/UIProcess/API/qt/qwkpage.cpp
index c72c267..7ace678 100644
--- a/WebKit2/UIProcess/API/qt/qwkpage.cpp
+++ b/WebKit2/UIProcess/API/qt/qwkpage.cpp
@@ -258,6 +258,7 @@ QWKPage::QWKPage(WKPageNamespaceRef namespaceRef)
         qt_wk_runJavaScriptAlert,
         0,  /* runJavaScriptConfirm */
         0,  /* runJavaScriptPrompt */
+        0   /* setStatusText */
         0   /* contentsSizeChanged */
     };
     WKPageSetPageUIClient(pageRef(), &uiClient);
diff --git a/WebKit2/UIProcess/WebPageProxy.cpp b/WebKit2/UIProcess/WebPageProxy.cpp
index 3ce65fb..1f608b2 100644
--- a/WebKit2/UIProcess/WebPageProxy.cpp
+++ b/WebKit2/UIProcess/WebPageProxy.cpp
@@ -476,7 +476,6 @@ void WebPageProxy::getStatistics(WKContextStatistics* statistics)
     statistics->numberOfWKFrames += process()->frameCountInPage(this);
 }
 
-
 void WebPageProxy::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments)
 {
     if (messageID.is<CoreIPC::MessageClassDrawingAreaProxy>()) {
@@ -716,6 +715,13 @@ void WebPageProxy::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::M
             contentsSizeChanged(process()->webFrame(frameID), size);
             break;
         }
+        case WebPageProxyMessage::SetStatusText: {
+            String text;
+            if (!arguments->decode(CoreIPC::Out(text)))
+                return;
+            setStatusText(text);
+            break;
+        }
         case WebPageProxyMessage::RegisterEditCommandForUndo: {
             uint64_t commandID;
             uint32_t editAction;
@@ -1000,6 +1006,11 @@ String WebPageProxy::runJavaScriptPrompt(WebFrameProxy* frame, const String& mes
     return m_uiClient.runJavaScriptPrompt(this, message, defaultValue, frame);
 }
 
+void WebPageProxy::setStatusText(const String& text)
+{
+    m_uiClient.setStatusText(this, text);
+}
+
 void WebPageProxy::contentsSizeChanged(WebFrameProxy* frame, const WebCore::IntSize& size)
 {
     m_uiClient.contentsSizeChanged(this, size, frame);
diff --git a/WebKit2/UIProcess/WebPageProxy.h b/WebKit2/UIProcess/WebPageProxy.h
index 3e52db5..abc5c3b 100644
--- a/WebKit2/UIProcess/WebPageProxy.h
+++ b/WebKit2/UIProcess/WebPageProxy.h
@@ -224,6 +224,7 @@ private:
     void runJavaScriptAlert(WebFrameProxy*, const WTF::String&);
     bool runJavaScriptConfirm(WebFrameProxy* frame, const WTF::String&);
     WTF::String runJavaScriptPrompt(WebFrameProxy* frame, const WTF::String&, const WTF::String&);
+    void setStatusText(const String&);
     void contentsSizeChanged(WebFrameProxy*, const WebCore::IntSize&);
 
     // Back/Forward list management
diff --git a/WebKit2/UIProcess/WebUIClient.cpp b/WebKit2/UIProcess/WebUIClient.cpp
index 094072c..6c86ceb 100644
--- a/WebKit2/UIProcess/WebUIClient.cpp
+++ b/WebKit2/UIProcess/WebUIClient.cpp
@@ -103,6 +103,14 @@ String WebUIClient::runJavaScriptPrompt(WebPageProxy* page, const String& messag
     return result;
 }
 
+void WebUIClient::setStatusText(WebPageProxy* page, const String& text)
+{
+    if (!m_pageUIClient.setStatusText)
+        return;
+
+    m_pageUIClient.setStatusText(toRef(page), toRef(text.impl()), m_pageUIClient.clientInfo);
+}
+
 void WebUIClient::contentsSizeChanged(WebPageProxy* page, const IntSize& size, WebFrameProxy* frame)
 {
     if (!m_pageUIClient.contentsSizeChanged)
diff --git a/WebKit2/UIProcess/WebUIClient.h b/WebKit2/UIProcess/WebUIClient.h
index ec530de..22cc87d 100644
--- a/WebKit2/UIProcess/WebUIClient.h
+++ b/WebKit2/UIProcess/WebUIClient.h
@@ -50,6 +50,7 @@ public:
     void runJavaScriptAlert(WebPageProxy*, const WTF::String&, WebFrameProxy*);
     bool runJavaScriptConfirm(WebPageProxy*, const WTF::String&, WebFrameProxy*);
     WTF::String runJavaScriptPrompt(WebPageProxy*, const WTF::String&, const WTF::String&, WebFrameProxy*);
+    void setStatusText(WebPageProxy*, const String&);
     void contentsSizeChanged(WebPageProxy*, const WebCore::IntSize&, WebFrameProxy*);
 
 private:
diff --git a/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp b/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
index 1281a66..1abe1b0 100644
--- a/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
+++ b/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
@@ -282,7 +282,7 @@ void WebChromeClient::setStatusbarText(const String& statusbarText)
     // Notify the bundle client.
     m_page->injectedBundleUIClient().willSetStatusbarText(m_page, statusbarText);
 
-    notImplemented();
+    WebProcess::shared().connection()->send(WebPageProxyMessage::SetStatusText, m_page->pageID(), statusbarText);
 }
 
 bool WebChromeClient::shouldInterruptJavaScript()
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 3cbe0bb..558022c 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -2,6 +2,28 @@
 
         Reviewed by Dan Bernstein.
 
+        Implement WebKit2 callback equivalent to - [WebUIDelegate webView:setStatusText:]
+        <rdar://problem/8359252>
+        https://bugs.webkit.org/show_bug.cgi?id=45605
+
+        * MiniBrowser/mac/BrowserWindowController.m:
+        (setStatusText):
+        (contentsSizeChanged):
+        (-[BrowserWindowController awakeFromNib]):
+        * MiniBrowser/win/BrowserView.cpp:
+        (runJavaScriptConfirm):
+        (runJavaScriptPrompt):
+        (setStatusText):
+        (contentsSizeChanged):
+        (BrowserView::create):
+        * WebKitTestRunner/TestController.cpp:
+        (WTR::createOtherPage):
+        (WTR::TestController::initialize):
+
+2010-09-11  Sam Weinig  <sam at webkit.org>
+
+        Reviewed by Dan Bernstein.
+
         Add callback mechanism for the getting the source of a frame
         <rdar://problem/8364681>
         https://bugs.webkit.org/show_bug.cgi?id=45604
diff --git a/WebKitTools/MiniBrowser/mac/BrowserWindowController.m b/WebKitTools/MiniBrowser/mac/BrowserWindowController.m
index eb7784f..43351e5 100644
--- a/WebKitTools/MiniBrowser/mac/BrowserWindowController.m
+++ b/WebKitTools/MiniBrowser/mac/BrowserWindowController.m
@@ -461,6 +461,16 @@ static WKStringRef runJavaScriptPrompt(WKPageRef page, WKStringRef message, WKSt
     return WKStringCreateWithCFString((CFStringRef)result);
 }
 
+static void setStatusText(WKPageRef page, WKStringRef text, const void* clientInfo)
+{
+    LOG(@"setStatusText");
+}
+
+static void contentsSizeChanged(WKPageRef page, int width, int height, WKFrameRef frame, const void *clientInfo)
+{
+    LOG(@"contentsSizeChanged");
+}
+
 - (void)awakeFromNib
 {
     _webView = [[WKView alloc] initWithFrame:[containerView frame] pageNamespaceRef:_pageNamespace];
@@ -511,7 +521,8 @@ static WKStringRef runJavaScriptPrompt(WKPageRef page, WKStringRef message, WKSt
         runJavaScriptAlert,
         runJavaScriptConfirm,
         runJavaScriptPrompt,
-        0           /* contentsSizeChanged */
+        setStatusText,
+        contentsSizeChanged
     };
     WKPageSetPageUIClient(_webView.pageRef, &uiClient);
 }
diff --git a/WebKitTools/MiniBrowser/win/BrowserView.cpp b/WebKitTools/MiniBrowser/win/BrowserView.cpp
index d3d5e72..919451d 100644
--- a/WebKitTools/MiniBrowser/win/BrowserView.cpp
+++ b/WebKitTools/MiniBrowser/win/BrowserView.cpp
@@ -60,6 +60,21 @@ static void runJavaScriptAlert(WKPageRef page, WKStringRef alertText, WKFrameRef
 {
 }
 
+static bool runJavaScriptConfirm(WKPageRef page, WKStringRef message, WKFrameRef frame, const void* clientInfo)
+{
+}
+
+static WKStringRef runJavaScriptPrompt(WKPageRef page, WKStringRef message, WKStringRef defaultValue, WKFrameRef frame, const void* clientInfo)
+{
+}
+
+static void setStatusText(WKPageRef page, WKStringRef text, const void* clientInfo)
+{
+}
+
+static void contentsSizeChanged(WKPageRef page, int width, int height, WKFrameRef frame, const void *clientInfo)
+{
+}
 
 void BrowserView::create(RECT webViewRect, BrowserWindow* parentWindow)
 {
@@ -84,8 +99,12 @@ void BrowserView::create(RECT webViewRect, BrowserWindow* parentWindow)
         showPage,
         closePage,
         runJavaScriptAlert,
-        0               /* contentsSizeChanged */
+        runJavaScriptConfirm,
+        runJavaScriptPrompt,
+        setStatusText,
+        contentsSizeChanged
     };
+
     WKPageSetPageUIClient(WKViewGetPage(m_webView), &uiClient);
 }
 
diff --git a/WebKitTools/WebKitTestRunner/TestController.cpp b/WebKitTools/WebKitTestRunner/TestController.cpp
index 6f97b9f..0cea616 100644
--- a/WebKitTools/WebKitTestRunner/TestController.cpp
+++ b/WebKitTools/WebKitTestRunner/TestController.cpp
@@ -83,6 +83,7 @@ static WKPageRef createOtherPage(WKPageRef oldPage, const void*)
         0,
         0,
         0,
+        0,
         0
     };
     WKPageSetPageUIClient(newPage, &otherPageUIClient);
@@ -160,6 +161,7 @@ void TestController::initialize(int argc, const char* argv[])
         0,
         0,
         0,
+        0,
         0
     };
     WKPageSetPageUIClient(m_mainWebView->page(), &pageUIClient);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list