Title: [112120] releases/WebKitGTK/webkit-1.8/Source/WebKit/gtk

Diff

Modified: releases/WebKitGTK/webkit-1.8/Source/WebKit/gtk/ChangeLog (112119 => 112120)


--- releases/WebKitGTK/webkit-1.8/Source/WebKit/gtk/ChangeLog	2012-03-26 17:25:09 UTC (rev 112119)
+++ releases/WebKitGTK/webkit-1.8/Source/WebKit/gtk/ChangeLog	2012-03-26 17:29:28 UTC (rev 112120)
@@ -1,5 +1,26 @@
 2012-03-26  Zan Dobersek  <[email protected]>
 
+        [Gtk] Webkit fails to build with --disable-geolocation
+        https://bugs.webkit.org/show_bug.cgi?id=81451
+
+        Reviewed by Benjamin Poulain.
+
+        Wrap uses of WebCore::Geolocation in WebKitGeolocationPolicyDecision
+        and WebKitWebView in ifdefs, removing compilation errors when compiling
+        with geolocation support disabled. Affected public API methods are then
+        stubs, throwing a warning that feature was not enabled at compile-time.
+
+        * webkit/webkitgeolocationpolicydecision.cpp:
+        (_WebKitGeolocationPolicyDecisionPrivate):
+        (webkit_geolocation_policy_decision_new):
+        (webkit_geolocation_policy_allow):
+        (webkit_geolocation_policy_deny):
+        * webkit/webkitgeolocationpolicydecisionprivate.h:
+        * webkit/webkitwebview.cpp:
+        (webkit_web_view_init):
+
+2012-03-26  Zan Dobersek  <[email protected]>
+
         [GObject bindings] Supplemental interfaces are not disabled with the "Conditional" attribute
         https://bugs.webkit.org/show_bug.cgi?id=80030
 

Modified: releases/WebKitGTK/webkit-1.8/Source/WebKit/gtk/webkit/webkitgeolocationpolicydecision.cpp (112119 => 112120)


--- releases/WebKitGTK/webkit-1.8/Source/WebKit/gtk/webkit/webkitgeolocationpolicydecision.cpp	2012-03-26 17:25:09 UTC (rev 112119)
+++ releases/WebKitGTK/webkit-1.8/Source/WebKit/gtk/webkit/webkitgeolocationpolicydecision.cpp	2012-03-26 17:29:28 UTC (rev 112120)
@@ -22,9 +22,8 @@
 
 #include "Geolocation.h"
 #include "webkitgeolocationpolicydecisionprivate.h"
+#include "webkitglobalsprivate.h"
 
-using namespace WebCore;
-
 /**
  * SECTION:webkitgeolocationpolicydecision
  * @short_description: Liaison between WebKit and the application regarding asynchronous geolocation policy decisions
@@ -39,7 +38,9 @@
 
 struct _WebKitGeolocationPolicyDecisionPrivate {
     WebKitWebFrame* frame;
-    Geolocation* geolocation;
+#if ENABLE(GEOLOCATION)
+    WebCore::Geolocation* geolocation;
+#endif
 };
 
 static void webkit_geolocation_policy_decision_class_init(WebKitGeolocationPolicyDecisionClass* decisionClass)
@@ -52,7 +53,8 @@
     decision->priv = G_TYPE_INSTANCE_GET_PRIVATE(decision, WEBKIT_TYPE_GEOLOCATION_POLICY_DECISION, WebKitGeolocationPolicyDecisionPrivate);
 }
 
-WebKitGeolocationPolicyDecision* webkit_geolocation_policy_decision_new(WebKitWebFrame* frame, Geolocation* geolocation)
+#if ENABLE(GEOLOCATION)
+WebKitGeolocationPolicyDecision* webkit_geolocation_policy_decision_new(WebKitWebFrame* frame, WebCore::Geolocation* geolocation)
 {
     g_return_val_if_fail(frame, NULL);
     WebKitGeolocationPolicyDecision* decision = WEBKIT_GEOLOCATION_POLICY_DECISION(g_object_new(WEBKIT_TYPE_GEOLOCATION_POLICY_DECISION, NULL));
@@ -62,6 +64,7 @@
     priv->geolocation = geolocation;
     return decision;
 }
+#endif
 
 /**
  * webkit_geolocation_policy_allow
@@ -73,10 +76,14 @@
  */
 void webkit_geolocation_policy_allow(WebKitGeolocationPolicyDecision* decision)
 {
+#if ENABLE(GEOLOCATION)
     g_return_if_fail(WEBKIT_IS_GEOLOCATION_POLICY_DECISION(decision));
 
     WebKitGeolocationPolicyDecisionPrivate* priv = decision->priv;
     priv->geolocation->setIsAllowed(TRUE);
+#else
+    WEBKIT_WARN_FEATURE_NOT_PRESENT("Geolocation")
+#endif
 }
 
 /**
@@ -89,9 +96,13 @@
  */
 void webkit_geolocation_policy_deny(WebKitGeolocationPolicyDecision* decision)
 {
+#if ENABLE(GEOLOCATION)
     g_return_if_fail(WEBKIT_IS_GEOLOCATION_POLICY_DECISION(decision));
 
     WebKitGeolocationPolicyDecisionPrivate* priv = decision->priv;
     priv->geolocation->setIsAllowed(FALSE);
+#else
+    WEBKIT_WARN_FEATURE_NOT_PRESENT("Geolocation")
+#endif
 }
 

Modified: releases/WebKitGTK/webkit-1.8/Source/WebKit/gtk/webkit/webkitgeolocationpolicydecisionprivate.h (112119 => 112120)


--- releases/WebKitGTK/webkit-1.8/Source/WebKit/gtk/webkit/webkitgeolocationpolicydecisionprivate.h	2012-03-26 17:25:09 UTC (rev 112119)
+++ releases/WebKitGTK/webkit-1.8/Source/WebKit/gtk/webkit/webkitgeolocationpolicydecisionprivate.h	2012-03-26 17:29:28 UTC (rev 112120)
@@ -25,10 +25,14 @@
 
 #include "webkitgeolocationpolicydecision.h"
 
+#if ENABLE(GEOLOCATION)
+
 extern "C" {
 
 WebKitGeolocationPolicyDecision* webkit_geolocation_policy_decision_new(WebKitWebFrame*, WebCore::Geolocation*);
 
 }
 
+#endif // ENABLE(GEOLOCATION)
+
 #endif
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to