[GTK][WK2] Fix build after r160104
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Dec 2013 22:18:40 +0000 (22:18 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Dec 2013 22:18:40 +0000 (22:18 +0000)
https://bugs.webkit.org/show_bug.cgi?id=125240

Patch by Nick Diego Yamane <nick.yamane@openbossa.org> on 2013-12-04
Reviewed by Anders Carlsson.

Using specific version of API client when instantiating them.
Applied that same change to the following files:

* UIProcess/API/gtk/WebKitContextMenuClient.cpp:
* UIProcess/API/gtk/WebKitCookieManager.cpp:
* UIProcess/API/gtk/WebKitDownloadClient.cpp:
* UIProcess/API/gtk/WebKitFaviconDatabase.cpp:
* UIProcess/API/gtk/WebKitFindController.cpp:
* UIProcess/API/gtk/WebKitFormClient.cpp:
* UIProcess/API/gtk/WebKitGeolocationProvider.cpp:
* UIProcess/API/gtk/WebKitInjectedBundleClient.cpp:
* UIProcess/API/gtk/WebKitLoaderClient.cpp:
* UIProcess/API/gtk/WebKitPolicyClient.cpp:
* UIProcess/API/gtk/WebKitUIClient.cpp:
* WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp:
* WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@160125 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 files changed:
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/gtk/WebKitContextMenuClient.cpp
Source/WebKit2/UIProcess/API/gtk/WebKitCookieManager.cpp
Source/WebKit2/UIProcess/API/gtk/WebKitDownloadClient.cpp
Source/WebKit2/UIProcess/API/gtk/WebKitFaviconDatabase.cpp
Source/WebKit2/UIProcess/API/gtk/WebKitFindController.cpp
Source/WebKit2/UIProcess/API/gtk/WebKitFormClient.cpp
Source/WebKit2/UIProcess/API/gtk/WebKitGeolocationProvider.cpp
Source/WebKit2/UIProcess/API/gtk/WebKitInjectedBundleClient.cpp
Source/WebKit2/UIProcess/API/gtk/WebKitLoaderClient.cpp
Source/WebKit2/UIProcess/API/gtk/WebKitPolicyClient.cpp
Source/WebKit2/UIProcess/API/gtk/WebKitUIClient.cpp
Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp
Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp

index 549f88e44abdef4a2e1aaff6c3bed8c5bce4ba6b..07d5ab94a6719a50517c3eea5247bb4e75e1144f 100644 (file)
@@ -1,3 +1,27 @@
+2013-12-04  Nick Diego Yamane  <nick.yamane@openbossa.org>
+
+        [GTK][WK2] Fix build after r160104
+        https://bugs.webkit.org/show_bug.cgi?id=125240
+
+        Reviewed by Anders Carlsson.
+
+        Using specific version of API client when instantiating them.
+        Applied that same change to the following files:
+
+        * UIProcess/API/gtk/WebKitContextMenuClient.cpp:
+        * UIProcess/API/gtk/WebKitCookieManager.cpp:
+        * UIProcess/API/gtk/WebKitDownloadClient.cpp:
+        * UIProcess/API/gtk/WebKitFaviconDatabase.cpp:
+        * UIProcess/API/gtk/WebKitFindController.cpp:
+        * UIProcess/API/gtk/WebKitFormClient.cpp:
+        * UIProcess/API/gtk/WebKitGeolocationProvider.cpp:
+        * UIProcess/API/gtk/WebKitInjectedBundleClient.cpp:
+        * UIProcess/API/gtk/WebKitLoaderClient.cpp:
+        * UIProcess/API/gtk/WebKitPolicyClient.cpp:
+        * UIProcess/API/gtk/WebKitUIClient.cpp:
+        * WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp:
+        * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
+
 2013-12-04  Dan Bernstein  <mitz@apple.com>
 
         Fixed the 32-bit Mac build.
index f50c52aea0f260758fd14a771d6fd3c933b74f82..ea5e427577985af7842dd4090a235e49bd8a6944 100644 (file)
@@ -33,9 +33,11 @@ static void getContextMenuFromProposedMenu(WKPageRef, WKArrayRef proposedMenu, W
 
 void attachContextMenuClientToView(WebKitWebView* webView)
 {
-    WKPageContextMenuClient wkContextMenuClient = {
-        kWKPageContextMenuClientCurrentVersion,
-        webView, // clientInfo
+    WKPageContextMenuClientV3 wkContextMenuClient = {
+        {
+            3, // version
+            webView, // clientInfo
+        },
         0, // getContextMenuFromProposedMenu_deprecatedForUseWithV0
         0, // customContextMenuItemSelected
         0, // contextMenuDismissed
@@ -44,6 +46,6 @@ void attachContextMenuClientToView(WebKitWebView* webView)
         0, // hideContextMenu
     };
     WKPageRef wkPage = toAPI(webkitWebViewBaseGetPage(WEBKIT_WEB_VIEW_BASE(webView)));
-    WKPageSetPageContextMenuClient(wkPage, &wkContextMenuClient);
+    WKPageSetPageContextMenuClient(wkPage, &wkContextMenuClient.base);
 }
 
index cd539bcc7b218e4bedc38fdbc618a8d7f21a5c6c..28e3284d3da211f661293ad816b87912baa37cea 100644 (file)
@@ -100,12 +100,14 @@ WebKitCookieManager* webkitCookieManagerCreate(WebCookieManagerProxy* webCookieM
     WebKitCookieManager* manager = WEBKIT_COOKIE_MANAGER(g_object_new(WEBKIT_TYPE_COOKIE_MANAGER, NULL));
     manager->priv->webCookieManager = webCookieManager;
 
-    WKCookieManagerClient wkCookieManagerClient = {
-        kWKCookieManagerClientCurrentVersion,
-        manager, // clientInfo
+    WKCookieManagerClientV0 wkCookieManagerClient = {
+        {
+            0, // version
+            manager, // clientInfo
+        },
         cookiesDidChange
     };
-    WKCookieManagerSetClient(toAPI(webCookieManager), &wkCookieManagerClient);
+    WKCookieManagerSetClient(toAPI(webCookieManager), &wkCookieManagerClient.base);
     manager->priv->webCookieManager->startObservingCookieChanges();
 
     return manager;
index 79c1c3e2add49dfce882eb799b3670d5ee479415..1a4eba68b017e11080a10212945ff0c1b461867a 100644 (file)
@@ -95,9 +95,11 @@ static void didFinish(WKContextRef wkContext, WKDownloadRef wkDownload, const vo
 
 void attachDownloadClientToContext(WebKitWebContext* webContext)
 {
-    WKContextDownloadClient wkDownloadClient = {
-        kWKContextDownloadClientCurrentVersion,
-        webContext, // ClientInfo
+    WKContextDownloadClientV0 wkDownloadClient = {
+        {
+            0, // version
+            webContext, // ClientInfo
+        },
         didStart,
         0, // didReceiveAuthenticationChallenge
         didReceiveResponse,
@@ -110,6 +112,6 @@ void attachDownloadClientToContext(WebKitWebContext* webContext)
         didCancel,
         0, // processDidCrash
     };
-    WKContextSetDownloadClient(toAPI(webkitWebContextGetContext(webContext)), &wkDownloadClient);
+    WKContextSetDownloadClient(toAPI(webkitWebContextGetContext(webContext)), &wkDownloadClient.base);
 }
 
index 67c8fd430492e21d18a8d7a1376d52633a30c19b..c02a834db9d5296cb0d8f7adfb3d7b4c648342fd 100644 (file)
@@ -214,14 +214,16 @@ WebKitFaviconDatabase* webkitFaviconDatabaseCreate(WebIconDatabase* iconDatabase
     WebKitFaviconDatabase* faviconDatabase = WEBKIT_FAVICON_DATABASE(g_object_new(WEBKIT_TYPE_FAVICON_DATABASE, NULL));
     faviconDatabase->priv->iconDatabase = iconDatabase;
 
-    WKIconDatabaseClient wkIconDatabaseClient = {
-        kWKIconDatabaseClientCurrentVersion,
-        faviconDatabase, // clientInfo
+    WKIconDatabaseClientV1 wkIconDatabaseClient = {
+        {
+            1, // version
+            faviconDatabase, // clientInfo
+        },
         didChangeIconForPageURLCallback,
         0, // didRemoveAllIconsCallback
         iconDataReadyForPageURLCallback,
     };
-    WKIconDatabaseSetIconDatabaseClient(toAPI(iconDatabase), &wkIconDatabaseClient);
+    WKIconDatabaseSetIconDatabaseClient(toAPI(iconDatabase), &wkIconDatabaseClient.base);
     return faviconDatabase;
 }
 
index 516c58237a446420b81f5d293a3b008e75f2dee7..8759306e2bcf1f961e57841cb146b60fc26d59f6 100644 (file)
@@ -111,15 +111,17 @@ static inline WebPageProxy* getPage(WebKitFindController* findController)
 static void webkitFindControllerConstructed(GObject* object)
 {
     WebKitFindController* findController = WEBKIT_FIND_CONTROLLER(object);
-    WKPageFindClient wkFindClient = {
-        kWKPageFindClientCurrentVersion,
-        findController, // clientInfo
+    WKPageFindClientV0 wkFindClient = {
+        {
+            0, // version
+            findController, // clientInfo
+        },
         didFindString,
         didFailToFindString,
         didCountStringMatches
     };
 
-    WKPageSetPageFindClient(toAPI(getPage(findController)), &wkFindClient);
+    WKPageSetPageFindClient(toAPI(getPage(findController)), &wkFindClient.base);
 }
 
 static void webkitFindControllerGetProperty(GObject* object, guint propId, GValue* value, GParamSpec* paramSpec)
index 75978cf1320b0bb9bf9df1a4220166ad0ecb9724..a07f0494879e7711d9480a174c9609769fe6550a 100644 (file)
@@ -36,11 +36,13 @@ static void willSubmitForm(WKPageRef page, WKFrameRef frame, WKFrameRef sourceFr
 
 void attachFormClientToView(WebKitWebView* webView)
 {
-    WKPageFormClient wkFormClient = {
-        kWKPageFormClientCurrentVersion,
-        webView, // clientInfo
+    WKPageFormClientV0 wkFormClient = {
+        {
+            0, // version
+            webView, // clientInfo
+        },
         willSubmitForm
     };
     WKPageRef wkPage = toAPI(webkitWebViewBaseGetPage(WEBKIT_WEB_VIEW_BASE(webView)));
-    WKPageSetPageFormClient(wkPage, &wkFormClient);
+    WKPageSetPageFormClient(wkPage, &wkFormClient.base);
 }
index cdeac917dbffa1350493a0050b7a39ad5157f935..261abf81a794375c5505d4061cba8447621e2304 100644 (file)
@@ -64,13 +64,16 @@ WebKitGeolocationProvider::WebKitGeolocationProvider(WebGeolocationManagerProxy*
 {
     ASSERT(geolocationManager);
 
-    WKGeolocationProvider wkGeolocationProvider = {
-        kWKGeolocationProviderCurrentVersion,
-        this, // clientInfo
+    WKGeolocationProviderV1 wkGeolocationProvider = {
+        {
+            1, // version
+            this, // clientInfo
+        },
         startUpdatingCallback,
-        stopUpdatingCallback
+        stopUpdatingCallback,
+        0 // setEnableHighAccuracy
     };
-    WKGeolocationManagerSetProvider(toAPI(geolocationManager), &wkGeolocationProvider);
+    WKGeolocationManagerSetProvider(toAPI(geolocationManager), &wkGeolocationProvider.base);
 }
 
 void WebKitGeolocationProvider::startUpdating()
index 26a6f8f10f63cab472ddcb6cece41f5f0d084916..2a4fdeac1f17a28b12350efe70adb2cdb2de7f24 100644 (file)
@@ -120,12 +120,14 @@ static void didReceiveMessageFromInjectedBundle(WKContextRef, WKStringRef messag
 
 void attachInjectedBundleClientToContext(WebKitWebContext* webContext)
 {
-    WKContextInjectedBundleClient wkInjectedBundleClient = {
-        kWKContextInjectedBundleClientCurrentVersion,
-        webContext, // clientInfo
+    WKContextInjectedBundleClientV1 wkInjectedBundleClient = {
+        {
+            0, // version
+            webContext, // clientInfo
+        },
         didReceiveMessageFromInjectedBundle,
         0, // didReceiveSynchronousMessageFromInjectedBundle
         0 // getInjectedBundleInitializationUserData
     };
-    WKContextSetInjectedBundleClient(toAPI(webkitWebContextGetContext(webContext)), &wkInjectedBundleClient);
+    WKContextSetInjectedBundleClient(toAPI(webkitWebContextGetContext(webContext)), &wkInjectedBundleClient.base);
 }
index c3c4a23b2ccfaacc6c9aba02330d6e7fe64b692a..6e4d2f9c7e74ca90fe68ae5c13cb1662db0555d7 100644 (file)
@@ -140,9 +140,11 @@ static void processDidCrash(WKPageRef page, const void* clientInfo)
 
 void attachLoaderClientToView(WebKitWebView* webView)
 {
-    WKPageLoaderClient wkLoaderClient = {
-        kWKPageLoaderClientCurrentVersion,
-        webView, // clientInfo
+    WKPageLoaderClientV3 wkLoaderClient = {
+        {
+            3, // version
+            webView, // clientInfo
+        },
         didStartProvisionalLoadForFrame,
         didReceiveServerRedirectForProvisionalLoadForFrame,
         didFailProvisionalLoadWithErrorForFrame,
@@ -181,6 +183,6 @@ void attachLoaderClientToView(WebKitWebView* webView)
         0, // pluginLoadPolicy
     };
     WKPageRef wkPage = toAPI(webkitWebViewBaseGetPage(WEBKIT_WEB_VIEW_BASE(webView)));
-    WKPageSetPageLoaderClient(wkPage, &wkLoaderClient);
+    WKPageSetPageLoaderClient(wkPage, &wkLoaderClient.base);
 }
 
index 0eaa9bec78f545e062b91f9b8dde1b9dcdb4473e..5fdcbe5cc09d9202c020ed0bd39a2a382e2d0451 100644 (file)
@@ -68,9 +68,11 @@ static void decidePolicyForResponse(WKPageRef page, WKFrameRef frame, WKURLRespo
 
 void attachPolicyClientToView(WebKitWebView* webView)
 {
-    WKPagePolicyClient policyClient = {
-        kWKPagePolicyClientCurrentVersion,
-        webView, // clientInfo
+    WKPagePolicyClientV1 policyClient = {
+        {
+            1, // version
+            webView, // clientInfo
+        },
         0, // decidePolicyForNavigationAction_deprecatedForUseWithV0
         decidePolicyForNewWindowAction,
         0, // decidePolicyForResponse_deprecatedForUseWithV0
@@ -78,5 +80,5 @@ void attachPolicyClientToView(WebKitWebView* webView)
         decidePolicyForNavigationAction,
         decidePolicyForResponse
     };
-    WKPageSetPagePolicyClient(toAPI(webkitWebViewBaseGetPage(WEBKIT_WEB_VIEW_BASE(webView))), &policyClient);
+    WKPageSetPagePolicyClient(toAPI(webkitWebViewBaseGetPage(WEBKIT_WEB_VIEW_BASE(webView))), &policyClient.base);
 }
index 0899b8563894a4005a12831f65e3f9eb2b6728c8..483b827860ce6572f3cf7bc5357aed5fb5288ae2 100644 (file)
@@ -160,9 +160,11 @@ static void runModal(WKPageRef page, const void* clientInfo)
 
 void attachUIClientToView(WebKitWebView* webView)
 {
-    WKPageUIClient wkUIClient = {
-        kWKPageUIClientCurrentVersion,
-        webView, // clientInfo
+    WKPageUIClientV2 wkUIClient = {
+        {
+            2, // version
+            webView, // clientInfo
+        },
         0, // createNewPage_deprecatedForUseWithV0
         showPage,
         closePage,
@@ -211,6 +213,6 @@ void attachUIClientToView(WebKitWebView* webView)
         0, // pluginLoadPolicy
     };
     WKPageRef wkPage = toAPI(webkitWebViewBaseGetPage(WEBKIT_WEB_VIEW_BASE(webView)));
-    WKPageSetPageUIClient(wkPage, &wkUIClient);
+    WKPageSetPageUIClient(wkPage, &wkUIClient.base);
 }
 
index 4074e5947e6e096b1b0ced89c105a94936ebe5dd..40d05bb310d3af1fb710b1109678c4d4eff0cb89 100644 (file)
@@ -116,16 +116,18 @@ WebKitWebExtension* webkitWebExtensionCreate(InjectedBundle* bundle)
 {
     WebKitWebExtension* extension = WEBKIT_WEB_EXTENSION(g_object_new(WEBKIT_TYPE_WEB_EXTENSION, NULL));
 
-    WKBundleClient wkBundleClient = {
-        kWKBundleClientCurrentVersion,
-        extension, // clientInfo
+    WKBundleClientV1 wkBundleClient = {
+        {
+            1, // version
+            extension, // clientInfo
+        },
         didCreatePage,
         willDestroyPage,
         0, // didInitializePageGroup
         didReceiveMessage,
         didReceiveMessageToPage
     };
-    WKBundleSetClient(toAPI(bundle), &wkBundleClient);
+    WKBundleSetClient(toAPI(bundle), &wkBundleClient.base);
 
     return extension;
 }
index e998a23e4e239e0f8770ecab71aeab60d4fb0973..474a708add3358026938a81dc8a54e843cd3ce7c 100644 (file)
@@ -309,9 +309,11 @@ WebKitWebPage* webkitWebPageCreate(WebPage* webPage)
     WebKitWebPage* page = WEBKIT_WEB_PAGE(g_object_new(WEBKIT_TYPE_WEB_PAGE, NULL));
     page->priv->webPage = webPage;
 
-    WKBundlePageLoaderClient loaderClient = {
-        kWKBundlePageLoaderClientCurrentVersion,
-        page,
+    WKBundlePageLoaderClientV7 loaderClient = {
+        {
+            7, // version
+            page, // clientInfo
+        },
         didStartProvisionalLoadForFrame,
         didReceiveServerRedirectForProvisionalLoadForFrame,
         0, // didFailProvisionalLoadWithErrorForFrame
@@ -348,11 +350,13 @@ WebKitWebPage* webkitWebPageCreate(WebPage* webPage)
         0, // willLoadDataRequest
         willDestroyFrame
     };
-    WKBundlePageSetPageLoaderClient(toAPI(webPage), &loaderClient);
+    WKBundlePageSetPageLoaderClient(toAPI(webPage), &loaderClient.base);
 
-    WKBundlePageResourceLoadClient resourceLoadClient = {
-        kWKBundlePageResourceLoadClientCurrentVersion,
-        page,
+    WKBundlePageResourceLoadClientV1 resourceLoadClient = {
+        {
+            1, // version
+            page, // clientInfo
+        },
         didInitiateLoadForResource,
         willSendRequestForFrame,
         didReceiveResponseForResource,
@@ -362,7 +366,7 @@ WebKitWebPage* webkitWebPageCreate(WebPage* webPage)
         0, // shouldCacheResponse
         0 // shouldUseCredentialStorage
     };
-    WKBundlePageSetResourceLoadClient(toAPI(webPage), &resourceLoadClient);
+    WKBundlePageSetResourceLoadClient(toAPI(webPage), &resourceLoadClient.base);
 
     return page;
 }