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

abecsi at webkit.org abecsi at webkit.org
Wed Dec 22 12:09:29 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 918f28787569210b0499c8c79342f7e4f23025a9
Author: abecsi at webkit.org <abecsi at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Aug 16 12:52:20 2010 +0000

    2010-08-16  Balazs Kelemen  <kb at inf.u-szeged.hu>
    
            Reviewed by Kenneth Rohde Christiansen.
    
            Handle content size change in WebKit2
    
            https://bugs.webkit.org/show_bug.cgi?id=43198
    
            * MiniBrowser/mac/BrowserWindowController.m:
            (-[BrowserWindowController awakeFromNib]): Initialize WKPageUICallback::contetsSizeChanged to 0.
            * MiniBrowser/win/BrowserView.cpp:
            (BrowserView::create): Initialize WKPageUICallback::contetsSizeChanged to 0.
    2010-08-16  Balazs Kelemen  <kb at inf.u-szeged.hu>
    
            Reviewed by Kenneth Rohde Christiansen.
    
            Handle content size change in WebKit2
    
            https://bugs.webkit.org/show_bug.cgi?id=43198
    
            Based on the work of Antti Koivisto.
            Send message to the UI client when the contents size has changed through the WebChromeClient
            and propagate it to the WKPageUIClient.
    
            * Shared/CoreIPCSupport/WebPageProxyMessageKinds.h:
            (WebPageProxyMessage::): Added ContentsSizeChanged message kind.
            * UIProcess/API/C/WKPage.h: Added WKPageContentsSizeChangedCallback callback to the WKPageUIClient.
            * UIProcess/API/qt/qwkpage.cpp:
            (QWKPage::QWKPage): Initialize the new callback to 0.
            * UIProcess/WebPageProxy.cpp:
            (WebKit::WebPageProxy::didReceiveMessage): Handle ContentsSizeChanged message. Calls contetsSizeChanged.
            (WebKit::WebPageProxy::contentsSizeChanged): Added. Propagate the event to the the UI client.
            * UIProcess/WebPageProxy.h:
            * UIProcess/WebUIClient.cpp:
            (WebKit::WebUIClient::contentsSizeChanged): Added. Propagate the event forward to the WKPageUIClient.
            * UIProcess/WebUIClient.h:
            * WebProcess/WebCoreSupport/WebChromeClient.cpp:
            (WebKit::WebChromeClient::contentsSizeChanged): Implemented.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65419 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index e4c4e6e..aab3034 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,5 +1,32 @@
 2010-08-16  Balazs Kelemen  <kb at inf.u-szeged.hu>
 
+        Reviewed by Kenneth Rohde Christiansen.
+
+        Handle content size change in WebKit2
+
+        https://bugs.webkit.org/show_bug.cgi?id=43198
+
+        Based on the work of Antti Koivisto.
+        Send message to the UI client when the contents size has changed through the WebChromeClient
+        and propagate it to the WKPageUIClient.
+
+        * Shared/CoreIPCSupport/WebPageProxyMessageKinds.h:
+        (WebPageProxyMessage::): Added ContentsSizeChanged message kind.
+        * UIProcess/API/C/WKPage.h: Added WKPageContentsSizeChangedCallback callback to the WKPageUIClient.
+        * UIProcess/API/qt/qwkpage.cpp:
+        (QWKPage::QWKPage): Initialize the new callback to 0.
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::didReceiveMessage): Handle ContentsSizeChanged message. Calls contetsSizeChanged.
+        (WebKit::WebPageProxy::contentsSizeChanged): Added. Propagate the event to the the UI client.
+        * UIProcess/WebPageProxy.h:
+        * UIProcess/WebUIClient.cpp:
+        (WebKit::WebUIClient::contentsSizeChanged): Added. Propagate the event forward to the WKPageUIClient.
+        * UIProcess/WebUIClient.h:
+        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
+        (WebKit::WebChromeClient::contentsSizeChanged): Implemented.
+
+2010-08-16  Balazs Kelemen  <kb at inf.u-szeged.hu>
+
         Unreviewed Qt WebKit2 build fix.
 
         * UIProcess/qt/WebContextQt.cpp:
diff --git a/WebKit2/Shared/CoreIPCSupport/WebPageProxyMessageKinds.h b/WebKit2/Shared/CoreIPCSupport/WebPageProxyMessageKinds.h
index 591249f..b552993 100644
--- a/WebKit2/Shared/CoreIPCSupport/WebPageProxyMessageKinds.h
+++ b/WebKit2/Shared/CoreIPCSupport/WebPageProxyMessageKinds.h
@@ -38,8 +38,9 @@ enum Kind {
     RunJavaScriptAlert,
     RunJavaScriptConfirm,
     RunJavaScriptPrompt,
-    
+
     ClosePage,
+    ContentsSizeChanged,
     DecidePolicyForMIMEType,
     DecidePolicyForNavigationAction,
     DecidePolicyForNewWindowAction,
diff --git a/WebKit2/UIProcess/API/C/WKPage.h b/WebKit2/UIProcess/API/C/WKPage.h
index b4d7b21..072ad61 100644
--- a/WebKit2/UIProcess/API/C/WKPage.h
+++ b/WebKit2/UIProcess/API/C/WKPage.h
@@ -130,6 +130,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 (*WKPageContentsSizeChangedCallback)(WKPageRef page, int width, int height, WKFrameRef frame, const void *clientInfo);
 
 struct WKPageUIClient {
     int                                                                 version;
@@ -140,6 +141,7 @@ struct WKPageUIClient {
     WKPageRunJavaScriptAlertCallback                                    runJavaScriptAlert;
     WKPageRunJavaScriptConfirmCallback                                  runJavaScriptConfirm;
     WKPageRunJavaScriptPromptCallback                                   runJavaScriptPrompt;
+    WKPageContentsSizeChangedCallback                                   contentsSizeChanged;
 };
 typedef struct WKPageUIClient WKPageUIClient;
 
diff --git a/WebKit2/UIProcess/API/qt/qwkpage.cpp b/WebKit2/UIProcess/API/qt/qwkpage.cpp
index 7052f57..b6d2916 100644
--- a/WebKit2/UIProcess/API/qt/qwkpage.cpp
+++ b/WebKit2/UIProcess/API/qt/qwkpage.cpp
@@ -227,7 +227,8 @@ QWKPage::QWKPage(WKPageNamespaceRef namespaceRef)
         qt_wk_close,
         qt_wk_runJavaScriptAlert,
         0,  /* runJavaScriptConfirm */
-        0   /* runJavaScriptPrompt */
+        0,  /* runJavaScriptPrompt */
+        0   /* contentsSizeChanged */
     };
     WKPageSetPageUIClient(pageRef(), &uiClient);
 }
diff --git a/WebKit2/UIProcess/WebPageProxy.cpp b/WebKit2/UIProcess/WebPageProxy.cpp
index d5d9878..5f49a92 100644
--- a/WebKit2/UIProcess/WebPageProxy.cpp
+++ b/WebKit2/UIProcess/WebPageProxy.cpp
@@ -605,6 +605,14 @@ void WebPageProxy::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::M
             goToItemInBackForwardList(process()->webBackForwardItem(itemID));
             break;
         }
+        case WebPageProxyMessage::ContentsSizeChanged: {
+            IntSize size;
+            uint64_t frameID;
+            if (!arguments->decode(CoreIPC::Out(frameID, size)))
+                return;
+            contentsSizeChanged(webFrame(frameID), size);
+            break;
+        }
         default:
             ASSERT_NOT_REACHED();
             break;
@@ -876,6 +884,11 @@ String WebPageProxy::runJavaScriptPrompt(WebFrameProxy* frame, const String& mes
     return m_uiClient.runJavaScriptPrompt(this, message, defaultValue, frame);
 }
 
+void WebPageProxy::contentsSizeChanged(WebFrameProxy* frame, const WebCore::IntSize& size)
+{
+    m_uiClient.contentsSizeChanged(this, size, frame);
+}
+
 // BackForwardList
 
 void WebPageProxy::addItemToBackForwardList(WebBackForwardListItem* item)
diff --git a/WebKit2/UIProcess/WebPageProxy.h b/WebKit2/UIProcess/WebPageProxy.h
index 5eb483b..d281688 100644
--- a/WebKit2/UIProcess/WebPageProxy.h
+++ b/WebKit2/UIProcess/WebPageProxy.h
@@ -200,6 +200,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 contentsSizeChanged(WebFrameProxy*, const WebCore::IntSize&);
 
     void addItemToBackForwardList(WebBackForwardListItem*);
     void goToItemInBackForwardList(WebBackForwardListItem*);
diff --git a/WebKit2/UIProcess/WebUIClient.cpp b/WebKit2/UIProcess/WebUIClient.cpp
index 8c3942d..b22e69c 100644
--- a/WebKit2/UIProcess/WebUIClient.cpp
+++ b/WebKit2/UIProcess/WebUIClient.cpp
@@ -27,6 +27,7 @@
 
 #include "WKAPICast.h"
 #include "WebPageProxy.h"
+#include <WebCore/IntSize.h>
 #include <WebCore/PlatformString.h>
 #include <string.h>
 
@@ -102,4 +103,12 @@ String WebUIClient::runJavaScriptPrompt(WebPageProxy* page, const String& messag
     return result;
 }
 
+void WebUIClient::contentsSizeChanged(WebPageProxy* page, const IntSize& size, WebFrameProxy* frame)
+{
+    if (!m_pageUIClient.contentsSizeChanged)
+        return;
+
+    m_pageUIClient.contentsSizeChanged(toRef(page), size.width(), size.height(), toRef(frame), m_pageUIClient.clientInfo);
+}
+
 } // namespace WebKit
diff --git a/WebKit2/UIProcess/WebUIClient.h b/WebKit2/UIProcess/WebUIClient.h
index 4f8ed8f..2957ca8 100644
--- a/WebKit2/UIProcess/WebUIClient.h
+++ b/WebKit2/UIProcess/WebUIClient.h
@@ -30,6 +30,11 @@
 #include <wtf/Forward.h>
 #include <wtf/PassRefPtr.h>
 
+namespace WebCore {
+class IntSize;
+class String;
+}
+
 namespace WebKit {
 
 class WebFrameProxy;
@@ -46,6 +51,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 contentsSizeChanged(WebPageProxy*, const WebCore::IntSize&, WebFrameProxy*);
 
 private:
     WKPageUIClient m_pageUIClient;
diff --git a/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp b/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
index 53b47c9..6c22c62 100644
--- a/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
+++ b/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
@@ -345,9 +345,11 @@ PlatformPageClient WebChromeClient::platformPageClient() const
     return 0;
 }
 
-void WebChromeClient::contentsSizeChanged(Frame*, const IntSize&) const
+void WebChromeClient::contentsSizeChanged(Frame* frame, const IntSize& size) const
 {
-    notImplemented();
+    WebFrame* webFrame =  static_cast<WebFrameLoaderClient*>(frame->loader()->client())->webFrame();
+    WebProcess::shared().connection()->send(WebPageProxyMessage::ContentsSizeChanged, m_page->pageID(),
+                                            CoreIPC::In(webFrame->frameID(), size));
 }
 
 void WebChromeClient::scrollRectIntoView(const IntRect&, const ScrollView*) const
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 173782c..4fc8dc9 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,16 @@
+2010-08-16  Balazs Kelemen  <kb at inf.u-szeged.hu>
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        Handle content size change in WebKit2
+
+        https://bugs.webkit.org/show_bug.cgi?id=43198
+
+        * MiniBrowser/mac/BrowserWindowController.m:
+        (-[BrowserWindowController awakeFromNib]): Initialize WKPageUICallback::contetsSizeChanged to 0.
+        * MiniBrowser/win/BrowserView.cpp:
+        (BrowserView::create): Initialize WKPageUICallback::contetsSizeChanged to 0.
+
 2010-08-16  Ariya Hidayat  <ariya at sencha.com>
 
         Add my new email address to committers.py.
diff --git a/WebKitTools/MiniBrowser/mac/BrowserWindowController.m b/WebKitTools/MiniBrowser/mac/BrowserWindowController.m
index 9a987d2..9842448 100644
--- a/WebKitTools/MiniBrowser/mac/BrowserWindowController.m
+++ b/WebKitTools/MiniBrowser/mac/BrowserWindowController.m
@@ -411,7 +411,8 @@ static WKStringRef runJavaScriptPrompt(WKPageRef page, WKStringRef message, WKSt
         closePage,
         runJavaScriptAlert,
         runJavaScriptConfirm,
-        runJavaScriptPrompt
+        runJavaScriptPrompt,
+        0           /* contentsSizeChanged */
     };
     WKPageSetPageUIClient(_webView.pageRef, &uiClient);
 }
diff --git a/WebKitTools/MiniBrowser/win/BrowserView.cpp b/WebKitTools/MiniBrowser/win/BrowserView.cpp
index 49e46bf..ee67a08 100644
--- a/WebKitTools/MiniBrowser/win/BrowserView.cpp
+++ b/WebKitTools/MiniBrowser/win/BrowserView.cpp
@@ -83,7 +83,8 @@ void BrowserView::create(RECT webViewRect, BrowserWindow* parentWindow)
         createNewPage,
         showPage,
         closePage,
-        runJavaScriptAlert
+        runJavaScriptAlert,
+        0               /* contentsSizeChanged */
     };
     WKPageSetPageUIClient(WKViewGetPage(m_webView), &uiClient);
 }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list