Diff
Modified: trunk/Source/WebKit/ChangeLog (132359 => 132360)
--- trunk/Source/WebKit/ChangeLog 2012-10-24 15:28:37 UTC (rev 132359)
+++ trunk/Source/WebKit/ChangeLog 2012-10-24 15:30:28 UTC (rev 132360)
@@ -1,3 +1,17 @@
+2012-10-24 Otto Derek Cheung <[email protected]>
+
+ [BlackBerry] Rename GeolocationControllerClientBlackBerry to GeolocationClientBlackBerry
+ https://bugs.webkit.org/show_bug.cgi?id=100250
+
+ Reviewed by Rob Buis.
+
+ Rename GeolocationControllerClientBlackBerry to GeolocationClientBlackBerry
+ to prevent confusion.
+
+ PR 230196
+
+ * PlatformBlackBerry.cmake:
+
2012-10-23 Hyowon Kim <[email protected]>
[Texmap][EFL] Add AcceleratedCompositingContextEfl to the build system.
Modified: trunk/Source/WebKit/PlatformBlackBerry.cmake (132359 => 132360)
--- trunk/Source/WebKit/PlatformBlackBerry.cmake 2012-10-24 15:28:37 UTC (rev 132359)
+++ trunk/Source/WebKit/PlatformBlackBerry.cmake 2012-10-24 15:30:28 UTC (rev 132360)
@@ -109,7 +109,7 @@
blackberry/WebCoreSupport/EditorClientBlackBerry.cpp
blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp
blackberry/WebCoreSupport/FrameNetworkingContextBlackBerry.cpp
- blackberry/WebCoreSupport/GeolocationControllerClientBlackBerry.cpp
+ blackberry/WebCoreSupport/GeolocationClientBlackBerry.cpp
blackberry/WebCoreSupport/IconDatabaseClientBlackBerry.cpp
blackberry/WebCoreSupport/InspectorClientBlackBerry.cpp
blackberry/WebCoreSupport/_javascript_DebuggerBlackBerry.cpp
Modified: trunk/Source/WebKit/blackberry/Api/WebPage.cpp (132359 => 132360)
--- trunk/Source/WebKit/blackberry/Api/WebPage.cpp 2012-10-24 15:28:37 UTC (rev 132359)
+++ trunk/Source/WebKit/blackberry/Api/WebPage.cpp 2012-10-24 15:30:28 UTC (rev 132360)
@@ -60,7 +60,7 @@
#if !defined(PUBLIC_BUILD) || !PUBLIC_BUILD
#include "GeolocationClientMock.h"
#endif
-#include "GeolocationControllerClientBlackBerry.h"
+#include "GeolocationClientBlackBerry.h"
#include "GroupSettings.h"
#include "HTMLAreaElement.h"
#include "HTMLFrameOwnerElement.h"
@@ -542,9 +542,8 @@
WebCore::provideGeolocationTo(m_page, mock);
mock->setController(WebCore::GeolocationController::from(m_page));
} else
-#else
- WebCore::provideGeolocationTo(m_page, new GeolocationControllerClientBlackBerry(this));
#endif
+ WebCore::provideGeolocationTo(m_page, new GeolocationClientBlackBerry(this));
#if !defined(PUBLIC_BUILD) || !PUBLIC_BUILD
if (getenv("drtRun"))
WebCore::provideDeviceOrientationTo(m_page, new DeviceOrientationClientMock);
Modified: trunk/Source/WebKit/blackberry/Api/WebPage_p.h (132359 => 132360)
--- trunk/Source/WebKit/blackberry/Api/WebPage_p.h 2012-10-24 15:28:37 UTC (rev 132359)
+++ trunk/Source/WebKit/blackberry/Api/WebPage_p.h 2012-10-24 15:30:28 UTC (rev 132360)
@@ -53,7 +53,7 @@
class Document;
class Element;
class Frame;
-class GeolocationControllerClientBlackBerry;
+class GeolocationClientBlackBerry;
class GraphicsLayerBlackBerry;
class _javascript_DebuggerBlackBerry;
class LayerWebKitThread;
Modified: trunk/Source/WebKit/blackberry/ChangeLog (132359 => 132360)
--- trunk/Source/WebKit/blackberry/ChangeLog 2012-10-24 15:28:37 UTC (rev 132359)
+++ trunk/Source/WebKit/blackberry/ChangeLog 2012-10-24 15:30:28 UTC (rev 132360)
@@ -1,3 +1,38 @@
+2012-10-24 Otto Derek Cheung <[email protected]>
+
+ [BlackBerry] Rename GeolocationControllerClientBlackBerry to GeolocationClientBlackBerry
+ https://bugs.webkit.org/show_bug.cgi?id=100250
+
+ Reviewed by Rob Buis.
+
+ Rename GeolocationControllerClientBlackBerry to GeolocationClientBlackBerry
+ to prevent confusion.
+ PR 230196
+
+ * Api/WebPage.cpp:
+ (BlackBerry::WebKit::WebPagePrivate::init):
+ * Api/WebPage_p.h:
+ (WebCore):
+ * WebCoreSupport/ChromeClientBlackBerry.cpp:
+ * WebCoreSupport/GeolocationClientBlackBerry.cpp: Renamed from Source/WebKit/blackberry/WebCoreSupport/GeolocationControllerClientBlackBerry.cpp.
+ (frameOrigin):
+ (GeolocationClientBlackBerry::GeolocationClientBlackBerry):
+ (GeolocationClientBlackBerry::geolocationDestroyed):
+ (GeolocationClientBlackBerry::startUpdating):
+ (GeolocationClientBlackBerry::stopUpdating):
+ (GeolocationClientBlackBerry::lastPosition):
+ (GeolocationClientBlackBerry::requestPermission):
+ (GeolocationClientBlackBerry::cancelPermissionRequest):
+ (GeolocationClientBlackBerry::onLocationUpdate):
+ (GeolocationClientBlackBerry::onLocationError):
+ (GeolocationClientBlackBerry::onPermission):
+ (GeolocationClientBlackBerry::setEnableHighAccuracy):
+ * WebCoreSupport/GeolocationClientBlackBerry.h: Renamed from Source/WebKit/blackberry/WebCoreSupport/GeolocationControllerClientBlackBerry.h.
+ (WebKit):
+ (WebCore):
+ (GeolocationClientBlackBerry):
+ (WebCore::GeolocationClientBlackBerry::tracker):
+
2012-10-24 Parth Patel <[email protected]>
[BlackBerry] Extending existing ThreadUnsafe singletons in webkit to
Modified: trunk/Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.cpp (132359 => 132360)
--- trunk/Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.cpp 2012-10-24 15:28:37 UTC (rev 132359)
+++ trunk/Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.cpp 2012-10-24 15:30:28 UTC (rev 132360)
@@ -34,7 +34,7 @@
#include "FrameLoadRequest.h"
#include "FrameLoader.h"
#include "Geolocation.h"
-#include "GeolocationControllerClientBlackBerry.h"
+#include "GeolocationClientBlackBerry.h"
#include "GraphicsLayer.h"
#include "HTMLInputElement.h"
#include "HTMLNames.h"
Copied: trunk/Source/WebKit/blackberry/WebCoreSupport/GeolocationClientBlackBerry.cpp (from rev 132359, trunk/Source/WebKit/blackberry/WebCoreSupport/GeolocationControllerClientBlackBerry.cpp) (0 => 132360)
--- trunk/Source/WebKit/blackberry/WebCoreSupport/GeolocationClientBlackBerry.cpp (rev 0)
+++ trunk/Source/WebKit/blackberry/WebCoreSupport/GeolocationClientBlackBerry.cpp 2012-10-24 15:30:28 UTC (rev 132360)
@@ -0,0 +1,118 @@
+/*
+ * Copyright (C) 2010, 2011, 2012 Research In Motion Limited. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "config.h"
+#include "GeolocationClientBlackBerry.h"
+
+#include "Chrome.h"
+#include "Geolocation.h"
+#include "GeolocationController.h"
+#include "GeolocationError.h"
+#include "Page.h"
+#include "WebPage_p.h"
+
+using namespace WebCore;
+
+static CString frameOrigin(Frame* frame)
+{
+ DOMWindow* window = frame->document()->domWindow();
+ SecurityOrigin* origin = window->document()->securityOrigin();
+ CString latinOrigin = origin->toString().latin1();
+ return latinOrigin;
+}
+
+GeolocationClientBlackBerry::GeolocationClientBlackBerry(BlackBerry::WebKit::WebPagePrivate* webPagePrivate)
+ : m_webPagePrivate(webPagePrivate)
+ , m_tracker(0)
+ , m_accuracy(false)
+{
+}
+
+void GeolocationClientBlackBerry::geolocationDestroyed()
+{
+ if (m_tracker)
+ m_tracker->destroy();
+ delete this;
+}
+
+void GeolocationClientBlackBerry::startUpdating()
+{
+ if (m_tracker)
+ m_tracker->resume();
+ else
+ m_tracker = BlackBerry::Platform::GeoTracker::create(this, m_accuracy);
+}
+
+void GeolocationClientBlackBerry::stopUpdating()
+{
+ if (m_tracker)
+ m_tracker->suspend();
+}
+
+GeolocationPosition* GeolocationClientBlackBerry::lastPosition()
+{
+ return m_lastPosition.get();
+}
+
+void GeolocationClientBlackBerry::requestPermission(Geolocation* location)
+{
+ Frame* frame = location->frame();
+ if (!frame)
+ return;
+ m_webPagePrivate->m_page->chrome()->client()->requestGeolocationPermissionForFrame(frame, location);
+}
+
+void GeolocationClientBlackBerry::cancelPermissionRequest(Geolocation* location)
+{
+ Frame* frame = location->frame();
+ if (!frame)
+ return;
+ m_webPagePrivate->m_page->chrome()->client()->cancelGeolocationPermissionRequestForFrame(frame, location);
+}
+
+void GeolocationClientBlackBerry::onLocationUpdate(double timestamp, double latitude, double longitude, double accuracy, double altitude, bool altitudeValid,
+ double altitudeAccuracy, bool altitudeAccuracyValid, double speed, bool speedValid, double heading, bool headingValid)
+{
+ m_lastPosition = GeolocationPosition::create(timestamp, latitude, longitude, accuracy, altitudeValid, altitude, altitudeAccuracyValid,
+ altitudeAccuracy, headingValid, heading, speedValid, speed);
+ GeolocationController::from(m_webPagePrivate->m_page)->positionChanged(m_lastPosition.get());
+}
+
+void GeolocationClientBlackBerry::onLocationError(const char* errorStr)
+{
+ RefPtr<GeolocationError> error = GeolocationError::create(GeolocationError::PositionUnavailable, String::fromUTF8(errorStr));
+ GeolocationController::from(m_webPagePrivate->m_page)->errorOccurred(error.get());
+}
+
+void GeolocationClientBlackBerry::onPermission(void* context, bool isAllowed)
+{
+ Geolocation* position = static_cast<Geolocation*>(context);
+ position->setIsAllowed(isAllowed);
+}
+
+void GeolocationClientBlackBerry::setEnableHighAccuracy(bool newAccuracy)
+{
+ if (m_accuracy == newAccuracy)
+ return;
+
+ m_accuracy = newAccuracy;
+
+ if (m_tracker)
+ m_tracker->setRequiresHighAccuracy(m_accuracy);
+}
+
Copied: trunk/Source/WebKit/blackberry/WebCoreSupport/GeolocationClientBlackBerry.h (from rev 132359, trunk/Source/WebKit/blackberry/WebCoreSupport/GeolocationControllerClientBlackBerry.h) (0 => 132360)
--- trunk/Source/WebKit/blackberry/WebCoreSupport/GeolocationClientBlackBerry.h (rev 0)
+++ trunk/Source/WebKit/blackberry/WebCoreSupport/GeolocationClientBlackBerry.h 2012-10-24 15:30:28 UTC (rev 132360)
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2010, 2011, 2012 Research In Motion Limited. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef GeolocationClientBlackBerry_h
+#define GeolocationClientBlackBerry_h
+
+#include <BlackBerryPlatformGeoTracker.h>
+#include <BlackBerryPlatformGeoTrackerListener.h>
+#include <GeolocationClient.h>
+#include <wtf/RefPtr.h>
+
+namespace BlackBerry {
+namespace WebKit {
+class WebPagePrivate;
+}
+}
+
+namespace WebCore {
+
+class GeolocationClientBlackBerry : public GeolocationClient, public BlackBerry::Platform::GeoTrackerListener {
+public:
+ GeolocationClientBlackBerry(BlackBerry::WebKit::WebPagePrivate*);
+
+ virtual void geolocationDestroyed();
+ virtual void startUpdating();
+ virtual void stopUpdating();
+ virtual GeolocationPosition* lastPosition();
+ virtual void setEnableHighAccuracy(bool);
+ virtual void requestPermission(Geolocation*);
+ virtual void cancelPermissionRequest(Geolocation*);
+
+ virtual void onLocationUpdate(double timestamp, double latitude, double longitude, double accuracy, double altitude, bool altitudeValid, double altitudeAccuracy,
+ bool altitudeAccuracyValid, double speed, bool speedValid, double heading, bool headingValid);
+ virtual void onLocationError(const char* error);
+ virtual void onPermission(void* context, bool isAllowed);
+ BlackBerry::Platform::GeoTracker* tracker() const { return m_tracker; }
+
+private:
+ BlackBerry::WebKit::WebPagePrivate* m_webPagePrivate;
+ BlackBerry::Platform::GeoTracker* m_tracker;
+ RefPtr<GeolocationPosition> m_lastPosition;
+ bool m_accuracy;
+};
+}
+
+#endif // GeolocationClientBlackBerry_h
Deleted: trunk/Source/WebKit/blackberry/WebCoreSupport/GeolocationControllerClientBlackBerry.cpp (132359 => 132360)
--- trunk/Source/WebKit/blackberry/WebCoreSupport/GeolocationControllerClientBlackBerry.cpp 2012-10-24 15:28:37 UTC (rev 132359)
+++ trunk/Source/WebKit/blackberry/WebCoreSupport/GeolocationControllerClientBlackBerry.cpp 2012-10-24 15:30:28 UTC (rev 132360)
@@ -1,110 +0,0 @@
-/*
- * Copyright (C) 2010, 2011, 2012 Research In Motion Limited. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "config.h"
-#include "GeolocationControllerClientBlackBerry.h"
-
-#include "Chrome.h"
-#include "Geolocation.h"
-#include "GeolocationController.h"
-#include "GeolocationError.h"
-#include "Page.h"
-#include "WebPage_p.h"
-
-using namespace WebCore;
-
-GeolocationControllerClientBlackBerry::GeolocationControllerClientBlackBerry(BlackBerry::WebKit::WebPagePrivate* webPagePrivate)
- : m_webPagePrivate(webPagePrivate)
- , m_tracker(0)
- , m_accuracy(false)
-{
-}
-
-void GeolocationControllerClientBlackBerry::geolocationDestroyed()
-{
- if (m_tracker)
- m_tracker->destroy();
- delete this;
-}
-
-void GeolocationControllerClientBlackBerry::startUpdating()
-{
- if (m_tracker)
- m_tracker->resume();
- else
- m_tracker = BlackBerry::Platform::GeoTracker::create(this, m_accuracy);
-}
-
-void GeolocationControllerClientBlackBerry::stopUpdating()
-{
- if (m_tracker)
- m_tracker->suspend();
-}
-
-GeolocationPosition* GeolocationControllerClientBlackBerry::lastPosition()
-{
- return m_lastPosition.get();
-}
-
-void GeolocationControllerClientBlackBerry::requestPermission(Geolocation* location)
-{
- Frame* frame = location->frame();
- if (!frame)
- return;
- m_webPagePrivate->m_page->chrome()->client()->requestGeolocationPermissionForFrame(frame, location);
-}
-
-void GeolocationControllerClientBlackBerry::cancelPermissionRequest(Geolocation* location)
-{
- Frame* frame = location->frame();
- if (!frame)
- return;
- m_webPagePrivate->m_page->chrome()->client()->cancelGeolocationPermissionRequestForFrame(frame, location);
-}
-
-void GeolocationControllerClientBlackBerry::onLocationUpdate(double timestamp, double latitude, double longitude, double accuracy, double altitude, bool altitudeValid,
- double altitudeAccuracy, bool altitudeAccuracyValid, double speed, bool speedValid, double heading, bool headingValid)
-{
- m_lastPosition = GeolocationPosition::create(timestamp, latitude, longitude, accuracy, altitudeValid, altitude, altitudeAccuracyValid,
- altitudeAccuracy, headingValid, heading, speedValid, speed);
- GeolocationController::from(m_webPagePrivate->m_page)->positionChanged(m_lastPosition.get());
-}
-
-void GeolocationControllerClientBlackBerry::onLocationError(const char* errorStr)
-{
- RefPtr<GeolocationError> error = GeolocationError::create(GeolocationError::PositionUnavailable, String::fromUTF8(errorStr));
- GeolocationController::from(m_webPagePrivate->m_page)->errorOccurred(error.get());
-}
-
-void GeolocationControllerClientBlackBerry::onPermission(void* context, bool isAllowed)
-{
- Geolocation* position = static_cast<Geolocation*>(context);
- position->setIsAllowed(isAllowed);
-}
-
-void GeolocationControllerClientBlackBerry::setEnableHighAccuracy(bool newAccuracy)
-{
- if (m_accuracy == newAccuracy)
- return;
-
- m_accuracy = newAccuracy;
-
- if (m_tracker)
- m_tracker->setRequiresHighAccuracy(m_accuracy);
-}
-
Deleted: trunk/Source/WebKit/blackberry/WebCoreSupport/GeolocationControllerClientBlackBerry.h (132359 => 132360)
--- trunk/Source/WebKit/blackberry/WebCoreSupport/GeolocationControllerClientBlackBerry.h 2012-10-24 15:28:37 UTC (rev 132359)
+++ trunk/Source/WebKit/blackberry/WebCoreSupport/GeolocationControllerClientBlackBerry.h 2012-10-24 15:30:28 UTC (rev 132360)
@@ -1,61 +0,0 @@
-/*
- * Copyright (C) 2010, 2011, 2012 Research In Motion Limited. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef GeolocationControllerClientBlackBerry_h
-#define GeolocationControllerClientBlackBerry_h
-
-#include <BlackBerryPlatformGeoTracker.h>
-#include <BlackBerryPlatformGeoTrackerListener.h>
-#include <GeolocationClient.h>
-#include <wtf/RefPtr.h>
-
-namespace BlackBerry {
-namespace WebKit {
-class WebPagePrivate;
-}
-}
-
-namespace WebCore {
-
-class GeolocationControllerClientBlackBerry : public GeolocationClient, public BlackBerry::Platform::GeoTrackerListener {
-public:
- GeolocationControllerClientBlackBerry(BlackBerry::WebKit::WebPagePrivate*);
-
- virtual void geolocationDestroyed();
- virtual void startUpdating();
- virtual void stopUpdating();
- virtual GeolocationPosition* lastPosition();
- virtual void setEnableHighAccuracy(bool);
- virtual void requestPermission(Geolocation*);
- virtual void cancelPermissionRequest(Geolocation*);
-
- virtual void onLocationUpdate(double timestamp, double latitude, double longitude, double accuracy, double altitude, bool altitudeValid, double altitudeAccuracy,
- bool altitudeAccuracyValid, double speed, bool speedValid, double heading, bool headingValid);
- virtual void onLocationError(const char* error);
- virtual void onPermission(void* context, bool isAllowed);
- BlackBerry::Platform::GeoTracker* tracker() const { return m_tracker; }
-
-private:
- BlackBerry::WebKit::WebPagePrivate* m_webPagePrivate;
- BlackBerry::Platform::GeoTracker* m_tracker;
- RefPtr<GeolocationPosition> m_lastPosition;
- bool m_accuracy;
-};
-}
-
-#endif // GeolocationControllerClientBlackBerry_h