[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.17-1283-gcf603cf
eric at webkit.org
eric at webkit.org
Tue Jan 5 23:41:57 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit 9a07914823e3a8ca969ef5cc42dbbd0fc9d1f169
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Dec 3 21:54:10 2009 +0000
2009-12-03 Jonathan Dixon <joth at chromium.org>
Reviewed by Dimitri Glazkov.
Bug 32066 - Add enable geolocation flag to WebCore::Settings for Chromium
https://bugs.webkit.org/show_bug.cgi?id=32066
Adds geolocationEnabled in Settings for runtime control of geolocaiton features. This defaults to ON
as it is intended as a development and testing aid, not a user control. To completely remove geolocation
from a given port, the compile time ENABLE_GEOLOCATION should still be used.
Adding placeholder GeolocationServiceChromium implementation, as this is required to allows
ENABLE_GEOLOCATION to be defined (in turn required for testing), even though this patch does not
make that the default just yet.
* WebCore.gypi:
* page/Settings.cpp:
(WebCore::Settings::Settings): Add new m_geolocationEnabled flag default value
(WebCore::Settings::setGeolocationEnabled): Setter for m_geolocationEnabled flag
* page/Settings.h:
(WebCore::Settings::geolocationEnabled): Add m_geolocationEnabled flag
* platform/chromium/GeolocationServiceChromium.cpp: Added.
(WebCore::GeolocationServiceChromium::GeolocationServiceChromium): Place holder GeolocationServiceChromium)
(WebCore::createGeolocationService): factory function, only required when ENABLED(GEOLOCATION) is true
2009-12-03 Jonathan Dixon <joth at chromium.org>
Reviewed by Dimitri Glazkov.
Bug 32066 - Add enable geolocation flag to WebCore::Settings for Chromium
https://bugs.webkit.org/show_bug.cgi?id=32066
Add the plumbing to map WebSettings through to WebCore::Settings
* features.gypi:
* public/WebSettings.h: Add setGeolocationEnabled API to interface
* src/WebSettingsImpl.cpp:
(WebKit::WebSettingsImpl::setGeolocationEnabled): Calls through to WebCore::Settings::setGeolocationEnabled
* src/WebSettingsImpl.h: Add setGeolocationEnabled interface function
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51660 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index e6d71fc..f55cb92 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,27 @@
+2009-12-03 Jonathan Dixon <joth at chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Bug 32066 - Add enable geolocation flag to WebCore::Settings for Chromium
+ https://bugs.webkit.org/show_bug.cgi?id=32066
+
+ Adds geolocationEnabled in Settings for runtime control of geolocaiton features. This defaults to ON
+ as it is intended as a development and testing aid, not a user control. To completely remove geolocation
+ from a given port, the compile time ENABLE_GEOLOCATION should still be used.
+ Adding placeholder GeolocationServiceChromium implementation, as this is required to allows
+ ENABLE_GEOLOCATION to be defined (in turn required for testing), even though this patch does not
+ make that the default just yet.
+
+ * WebCore.gypi:
+ * page/Settings.cpp:
+ (WebCore::Settings::Settings): Add new m_geolocationEnabled flag default value
+ (WebCore::Settings::setGeolocationEnabled): Setter for m_geolocationEnabled flag
+ * page/Settings.h:
+ (WebCore::Settings::geolocationEnabled): Add m_geolocationEnabled flag
+ * platform/chromium/GeolocationServiceChromium.cpp: Added.
+ (WebCore::GeolocationServiceChromium::GeolocationServiceChromium): Place holder GeolocationServiceChromium)
+ (WebCore::createGeolocationService): factory function, only required when ENABLED(GEOLOCATION) is true
+
2009-12-03 Enrica Casucci <enrica at apple.com>
Reviewed by John Sullivan.
diff --git a/WebCore/WebCore.gypi b/WebCore/WebCore.gypi
index 700b85b..af25f4e 100644
--- a/WebCore/WebCore.gypi
+++ b/WebCore/WebCore.gypi
@@ -1859,6 +1859,7 @@
'platform/chromium/FramelessScrollView.cpp',
'platform/chromium/FramelessScrollView.h',
'platform/chromium/FramelessScrollViewClient.h',
+ 'platform/chromium/GeolocationServiceChromium.cpp',
'platform/chromium/KeyCodeConversion.h',
'platform/chromium/KeyCodeConversionGtk.cpp',
'platform/chromium/KeyboardCodesPosix.h',
diff --git a/WebCore/page/Settings.cpp b/WebCore/page/Settings.cpp
index 2e0f402..87962e2 100644
--- a/WebCore/page/Settings.cpp
+++ b/WebCore/page/Settings.cpp
@@ -119,6 +119,7 @@ Settings::Settings(Page* page)
, m_showRepaintCounter(false)
, m_experimentalNotificationsEnabled(false)
, m_webGLEnabled(false)
+ , m_geolocationEnabled(true)
{
// A Frame may not have been created yet, so we initialize the AtomicString
// hash before trying to use it.
@@ -543,4 +544,9 @@ void Settings::setWebGLEnabled(bool enabled)
m_webGLEnabled = enabled;
}
+void Settings::setGeolocationEnabled(bool enabled)
+{
+ m_geolocationEnabled = enabled;
+}
+
} // namespace WebCore
diff --git a/WebCore/page/Settings.h b/WebCore/page/Settings.h
index fa385e5..673ba8f 100644
--- a/WebCore/page/Settings.h
+++ b/WebCore/page/Settings.h
@@ -273,6 +273,9 @@ namespace WebCore {
void setWebGLEnabled(bool);
bool webGLEnabled() const { return m_webGLEnabled; }
+ void setGeolocationEnabled(bool);
+ bool geolocationEnabled() const { return m_geolocationEnabled; }
+
private:
Page* m_page;
@@ -342,6 +345,7 @@ namespace WebCore {
bool m_showRepaintCounter : 1;
bool m_experimentalNotificationsEnabled : 1;
bool m_webGLEnabled : 1;
+ bool m_geolocationEnabled : 1;
#if USE(SAFARI_THEME)
static bool gShouldPaintNativeControls;
diff --git a/WebCore/platform/chromium/GeolocationServiceChromium.cpp b/WebCore/platform/chromium/GeolocationServiceChromium.cpp
new file mode 100644
index 0000000..65886b0
--- /dev/null
+++ b/WebCore/platform/chromium/GeolocationServiceChromium.cpp
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2009, Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "GeolocationService.h"
+
+namespace WebCore {
+
+class GeolocationServiceChromium : public GeolocationService {
+public:
+ GeolocationServiceChromium(GeolocationServiceClient* c)
+ : GeolocationService(c)
+ {
+ }
+ // FIXME: Implement. https://bugs.webkit.org/show_bug.cgi?id=32068
+};
+
+// This guard is the counterpart of the one in WebCore/platform/GeolocationService.cpp
+#if ENABLE(GEOLOCATION)
+static GeolocationService* createGeolocationService(GeolocationServiceClient* c)
+{
+ return new GeolocationServiceChromium(c);
+}
+
+GeolocationService::FactoryFunction* GeolocationService::s_factoryFunction = &createGeolocationService;
+#endif
+
+} // namespace WebCore
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 9c48a15..43e634d 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,18 @@
+2009-12-03 Jonathan Dixon <joth at chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Bug 32066 - Add enable geolocation flag to WebCore::Settings for Chromium
+ https://bugs.webkit.org/show_bug.cgi?id=32066
+
+ Add the plumbing to map WebSettings through to WebCore::Settings
+
+ * features.gypi:
+ * public/WebSettings.h: Add setGeolocationEnabled API to interface
+ * src/WebSettingsImpl.cpp:
+ (WebKit::WebSettingsImpl::setGeolocationEnabled): Calls through to WebCore::Settings::setGeolocationEnabled
+ * src/WebSettingsImpl.h: Add setGeolocationEnabled interface function
+
2009-12-03 Brady Eidson <beidson at apple.com>
Reviewed by Sam Weinig.
diff --git a/WebKit/chromium/features.gypi b/WebKit/chromium/features.gypi
index 14be1a2..b4cd333 100644
--- a/WebKit/chromium/features.gypi
+++ b/WebKit/chromium/features.gypi
@@ -46,6 +46,7 @@
'ENABLE_OFFLINE_WEB_APPLICATIONS=1',
'ENABLE_DASHBOARD_SUPPORT=0',
'ENABLE_DOM_STORAGE=1',
+ 'ENABLE_GEOLOCATION=1',
'ENABLE_JAVASCRIPT_DEBUGGER=0',
'ENABLE_JSC_MULTIPLE_THREADS=0',
'ENABLE_ICONDATABASE=0',
diff --git a/WebKit/chromium/public/WebSettings.h b/WebKit/chromium/public/WebSettings.h
index 304a3d3..da36806 100644
--- a/WebKit/chromium/public/WebSettings.h
+++ b/WebKit/chromium/public/WebSettings.h
@@ -80,6 +80,7 @@ public:
virtual void setTextDirectionSubmenuInclusionBehaviorNeverIncluded() = 0;
virtual void setOfflineWebApplicationCacheEnabled(bool) = 0;
virtual void setExperimentalWebGLEnabled(bool) = 0;
+ virtual void setGeolocationEnabled(bool) = 0;
protected:
~WebSettings() { }
diff --git a/WebKit/chromium/src/WebSettingsImpl.cpp b/WebKit/chromium/src/WebSettingsImpl.cpp
index dc7cc39..e019653 100644
--- a/WebKit/chromium/src/WebSettingsImpl.cpp
+++ b/WebKit/chromium/src/WebSettingsImpl.cpp
@@ -249,4 +249,9 @@ void WebSettingsImpl::setExperimentalWebGLEnabled(bool enabled)
m_settings->setWebGLEnabled(enabled);
}
+void WebSettingsImpl::setGeolocationEnabled(bool enabled)
+{
+ m_settings->setGeolocationEnabled(enabled);
+}
+
} // namespace WebKit
diff --git a/WebKit/chromium/src/WebSettingsImpl.h b/WebKit/chromium/src/WebSettingsImpl.h
index 99397d9..9c0f9f4 100644
--- a/WebKit/chromium/src/WebSettingsImpl.h
+++ b/WebKit/chromium/src/WebSettingsImpl.h
@@ -82,6 +82,7 @@ public:
virtual void setTextDirectionSubmenuInclusionBehaviorNeverIncluded();
virtual void setOfflineWebApplicationCacheEnabled(bool);
virtual void setExperimentalWebGLEnabled(bool);
+ virtual void setGeolocationEnabled(bool);
private:
WebCore::Settings* m_settings;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list