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

commit-queue at webkit.org commit-queue at webkit.org
Wed Dec 22 16:26:38 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 3a3d94cb7019e5bd1f686e3132b2f417e56d551a
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Nov 23 21:30:41 2010 +0000

    2010-11-23  John Knottenbelt  <jknotten at chromium.org>
    
            Reviewed by Darin Fisher.
    
            [Chromium] Introduce wrapper types for WebCore::GeolocationError, WebCore::GeolocationPosition.
            https://bugs.webkit.org/show_bug.cgi?id=49735
    
            Introduce WebKit API types so that the browser implementation can feed
            position and error updates to the WebCore::GeolocationController.
    
            * WebKit.gyp:
            * public/WebGeolocationError.h: Added.
            (WebKit::WebGeolocationError::WebGeolocationError):
            (WebKit::WebGeolocationError::~WebGeolocationError):
            * public/WebGeolocationPosition.h: Added.
            (WebKit::WebGeolocationPosition::WebGeolocationPosition):
            (WebKit::WebGeolocationPosition::~WebGeolocationPosition):
            * src/WebGeolocationError.cpp: Added.
            (WebKit::WebGeolocationError::assign):
            (WebKit::WebGeolocationError::reset):
            (WebKit::WebGeolocationError::WebGeolocationError):
            (WebKit::WebGeolocationError::operator=):
            (WebKit::WebGeolocationError::operator WTF::PassRefPtr<WebCore::GeolocationError>):
            * src/WebGeolocationPosition.cpp: Added.
            (WebKit::WebGeolocationPosition::assign):
            (WebKit::WebGeolocationPosition::reset):
            (WebKit::WebGeolocationPosition::operator=):
            (WebKit::WebGeolocationPosition::operator PassRefPtr<WebCore::GeolocationPosition>):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72624 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 2244de3..7a57986 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,32 @@
+2010-11-23  John Knottenbelt  <jknotten at chromium.org>
+
+        Reviewed by Darin Fisher.
+
+        [Chromium] Introduce wrapper types for WebCore::GeolocationError, WebCore::GeolocationPosition.
+        https://bugs.webkit.org/show_bug.cgi?id=49735
+
+        Introduce WebKit API types so that the browser implementation can feed
+        position and error updates to the WebCore::GeolocationController.
+
+        * WebKit.gyp:
+        * public/WebGeolocationError.h: Added.
+        (WebKit::WebGeolocationError::WebGeolocationError):
+        (WebKit::WebGeolocationError::~WebGeolocationError):
+        * public/WebGeolocationPosition.h: Added.
+        (WebKit::WebGeolocationPosition::WebGeolocationPosition):
+        (WebKit::WebGeolocationPosition::~WebGeolocationPosition):
+        * src/WebGeolocationError.cpp: Added.
+        (WebKit::WebGeolocationError::assign):
+        (WebKit::WebGeolocationError::reset):
+        (WebKit::WebGeolocationError::WebGeolocationError):
+        (WebKit::WebGeolocationError::operator=):
+        (WebKit::WebGeolocationError::operator WTF::PassRefPtr<WebCore::GeolocationError>):
+        * src/WebGeolocationPosition.cpp: Added.
+        (WebKit::WebGeolocationPosition::assign):
+        (WebKit::WebGeolocationPosition::reset):
+        (WebKit::WebGeolocationPosition::operator=):
+        (WebKit::WebGeolocationPosition::operator PassRefPtr<WebCore::GeolocationPosition>):
+
 2010-11-23  Jonathan Backer  <backer at chromium.org>
 
         Reviewed by Kenneth Russell.
diff --git a/WebKit/chromium/WebKit.gyp b/WebKit/chromium/WebKit.gyp
index 6cf9130..51858d5 100644
--- a/WebKit/chromium/WebKit.gyp
+++ b/WebKit/chromium/WebKit.gyp
@@ -173,6 +173,8 @@
                 'public/WebFontCache.h',
                 'public/WebFormControlElement.h',
                 'public/WebFormElement.h',
+                'public/WebGeolocationError.h',
+                'public/WebGeolocationPosition.h',
                 'public/WebGeolocationService.h',
                 'public/WebGeolocationServiceBridge.h',
                 'public/WebGeolocationServiceMock.h',
@@ -442,6 +444,8 @@
                 'src/WebFormElement.cpp',
                 'src/WebFrameImpl.cpp',
                 'src/WebFrameImpl.h',
+                'src/WebGeolocationError.cpp',
+                'src/WebGeolocationPosition.cpp',
                 'src/WebGeolocationServiceBridgeImpl.cpp',
                 'src/WebGeolocationServiceBridgeImpl.h',
                 'src/WebGeolocationServiceMock.cpp',
@@ -666,6 +670,11 @@
                         ['exclude', 'WebGeolocationService.*$'],
                         ['include', 'WebGeolocationServiceMock.*'],
                     ],
+                }, {
+                   'sources/': [
+                        ['exclude', 'WebGeolocationError.*'],
+                        ['exclude', 'WebGeolocationPosition.*'],
+                   ],
                 }]
             ],
         },
diff --git a/WebKit/chromium/public/WebGeolocationError.h b/WebKit/chromium/public/WebGeolocationError.h
new file mode 100644
index 0000000..e9354d3
--- /dev/null
+++ b/WebKit/chromium/public/WebGeolocationError.h
@@ -0,0 +1,68 @@
+/*
+ * Copyright (C) 2010 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:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS 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 APPLE OR ITS 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.
+ */
+
+#ifndef WebGeolocationError_h
+#define WebGeolocationError_h
+
+#include "WebCommon.h"
+#include "WebPrivatePtr.h"
+
+#if WEBKIT_IMPLEMENTATION
+#include <wtf/PassRefPtr.h>
+namespace WebCore { class GeolocationError; }
+#endif
+
+namespace WebKit {
+
+class WebString;
+
+class WebGeolocationError {
+public:
+    enum Error {
+        ErrorPermissionDenied,
+        ErrorPositionUnavailable
+    };
+
+    WebGeolocationError(Error code, const WebString& message) { assign(code, message); }
+    WebGeolocationError(const WebGeolocationError& other) { assign(other); }
+    ~WebGeolocationError() { reset(); }
+
+    WEBKIT_API void assign(Error code, const WebString& message);
+    WEBKIT_API void assign(const WebGeolocationError&);
+    WEBKIT_API void reset();
+
+#if WEBKIT_IMPLEMENTATION
+    WebGeolocationError(WTF::PassRefPtr<WebCore::GeolocationError>);
+    WebGeolocationError& operator=(WTF::PassRefPtr<WebCore::GeolocationError>);
+    operator WTF::PassRefPtr<WebCore::GeolocationError>() const;
+#endif
+
+private:
+    WebPrivatePtr<WebCore::GeolocationError> m_private;
+};
+
+} // namespace WebKit
+
+#endif // WebGeolocationError_h
diff --git a/WebKit/chromium/public/WebGeolocationPosition.h b/WebKit/chromium/public/WebGeolocationPosition.h
new file mode 100644
index 0000000..de73431
--- /dev/null
+++ b/WebKit/chromium/public/WebGeolocationPosition.h
@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2010 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:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS 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 APPLE OR ITS 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.
+ */
+
+#ifndef WebGeolocationPosition_h
+#define WebGeolocationPosition_h
+
+#include "WebCommon.h"
+#include "WebPrivatePtr.h"
+
+#if WEBKIT_IMPLEMENTATION
+#include <wtf/PassRefPtr.h>
+namespace WebCore { class GeolocationPosition; }
+#endif
+
+namespace WebKit {
+
+class WebGeolocationPosition {
+public:
+    WebGeolocationPosition() {}
+    WebGeolocationPosition(double timestamp, double latitude, double longitude, double accuracy, bool providesAltitude, double altitude, bool providesAltitudeAccuracy, double altitudeAccuracy, bool providesHeading, double heading, bool providesSpeed, double speed)
+    {
+        assign(timestamp, latitude, longitude, accuracy, providesAltitude, altitude, providesAltitudeAccuracy, altitudeAccuracy, providesHeading, heading, providesSpeed, speed);
+    }
+    WebGeolocationPosition(const WebGeolocationPosition& other) { assign(other); }
+    ~WebGeolocationPosition() { reset(); }
+
+    WEBKIT_API void assign(double timestamp, double latitude, double longitude, double accuracy, bool providesAltitude, double altitude, bool providesAltitudeAccuracy, double altitudeAccuracy, bool providesHeading, double heading, bool providesSpeed, double speed);
+    WEBKIT_API void assign(const WebGeolocationPosition&);
+    WEBKIT_API void reset();
+
+#if WEBKIT_IMPLEMENTATION
+    WebGeolocationPosition(WTF::PassRefPtr<WebCore::GeolocationPosition>);
+    WebGeolocationPosition& operator=(WTF::PassRefPtr<WebCore::GeolocationPosition>);
+    operator WTF::PassRefPtr<WebCore::GeolocationPosition>() const;
+#endif
+
+private:
+    WebPrivatePtr<WebCore::GeolocationPosition> m_private;
+};
+
+} // namespace WebKit
+
+#endif // WebGeolocationPosition_h
diff --git a/WebKit/chromium/src/AssertMatchingEnums.cpp b/WebKit/chromium/src/AssertMatchingEnums.cpp
index 3fffd60..ceeed8d 100644
--- a/WebKit/chromium/src/AssertMatchingEnums.cpp
+++ b/WebKit/chromium/src/AssertMatchingEnums.cpp
@@ -41,6 +41,8 @@
 #include "FileMetadata.h"
 #include "FontDescription.h"
 #include "FontSmoothingMode.h"
+#include "GeolocationError.h"
+#include "GeolocationPosition.h"
 #include "HTMLInputElement.h"
 #include "IDBKey.h"
 #include "MediaPlayer.h"
@@ -62,6 +64,8 @@
 #include "WebFileInfo.h"
 #include "WebFileSystem.h"
 #include "WebFontDescription.h"
+#include "WebGeolocationError.h"
+#include "WebGeolocationPosition.h"
 #include "WebIDBKey.h"
 #include "WebInputElement.h"
 #include "WebMediaPlayer.h"
@@ -383,3 +387,8 @@ COMPILE_ASSERT_MATCHING_ENUM(WebFileErrorInvalidModification, FileError::INVALID
 COMPILE_ASSERT_MATCHING_ENUM(WebFileErrorQuotaExceeded, FileError::QUOTA_EXCEEDED_ERR);
 COMPILE_ASSERT_MATCHING_ENUM(WebFileErrorTypeMismatch, FileError::TYPE_MISMATCH_ERR);
 COMPILE_ASSERT_MATCHING_ENUM(WebFileErrorPathExists, FileError::PATH_EXISTS_ERR);
+
+#if ENABLE(CLIENT_BASED_GEOLOCATION)
+COMPILE_ASSERT_MATCHING_ENUM(WebGeolocationError::ErrorPermissionDenied, GeolocationError::PermissionDenied);
+COMPILE_ASSERT_MATCHING_ENUM(WebGeolocationError::ErrorPositionUnavailable, GeolocationError::PositionUnavailable);
+#endif
diff --git a/WebKit/chromium/src/WebGeolocationError.cpp b/WebKit/chromium/src/WebGeolocationError.cpp
new file mode 100644
index 0000000..9acb676
--- /dev/null
+++ b/WebKit/chromium/src/WebGeolocationError.cpp
@@ -0,0 +1,67 @@
+/*
+ * Copyright (C) 2010 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:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS 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 APPLE OR ITS 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 "WebGeolocationError.h"
+
+#include "GeolocationError.h"
+#include "WebString.h"
+
+using namespace WebCore;
+
+namespace WebKit {
+
+void WebGeolocationError::assign(Error code, const WebString& message)
+{
+    m_private = GeolocationError::create(static_cast<GeolocationError::ErrorCode>(code), message);
+}
+
+void WebGeolocationError::assign(const WebGeolocationError& other)
+{
+    m_private = other.m_private;
+}
+
+void WebGeolocationError::reset()
+{
+    m_private.reset();
+}
+
+WebGeolocationError::WebGeolocationError(PassRefPtr<GeolocationError> error)
+{
+    m_private = error;
+}
+
+WebGeolocationError& WebGeolocationError::operator=(PassRefPtr<GeolocationError> error)
+{
+    m_private = error;
+    return *this;
+}
+
+WebGeolocationError::operator PassRefPtr<GeolocationError>() const
+{
+    return m_private.get();
+}
+
+}
diff --git a/WebKit/chromium/src/WebGeolocationPosition.cpp b/WebKit/chromium/src/WebGeolocationPosition.cpp
new file mode 100644
index 0000000..75b3306
--- /dev/null
+++ b/WebKit/chromium/src/WebGeolocationPosition.cpp
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2010 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:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS 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 APPLE OR ITS 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 "WebGeolocationPosition.h"
+
+#include "GeolocationPosition.h"
+
+using namespace WebCore;
+
+namespace WebKit {
+
+void WebGeolocationPosition::assign(double timestamp, double latitude, double longitude, double accuracy, bool providesAltitude, double altitude, bool providesAltitudeAccuracy, double altitudeAccuracy, bool providesHeading, double heading, bool providesSpeed, double speed)
+{
+    m_private = GeolocationPosition::create(timestamp, latitude, longitude, accuracy, providesAltitude, altitude, providesAltitudeAccuracy, altitudeAccuracy, providesHeading, heading, providesSpeed, speed);
+}
+
+void WebGeolocationPosition::assign(const WebGeolocationPosition& other)
+{
+    m_private = other.m_private;
+}
+
+void WebGeolocationPosition::reset()
+{
+    m_private.reset();
+}
+
+WebGeolocationPosition& WebGeolocationPosition::operator=(PassRefPtr<GeolocationPosition> position)
+{
+    m_private = position;
+    return *this;
+}
+
+WebGeolocationPosition::operator PassRefPtr<GeolocationPosition>() const
+{
+    return m_private.get();
+}
+
+} // namespace WebKit

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list