diff --git a/Source/WebCore/CMakeLists.txt b/Source/WebCore/CMakeLists.txt index a2e6189e982a8d815735a859123e2d60b8c9f474..1920285e2b412939a4b0db28f86c821a5b12f489 100644 --- a/Source/WebCore/CMakeLists.txt +++ b/Source/WebCore/CMakeLists.txt @@ -804,6 +804,7 @@ set(WebCore_SOURCES Modules/gamepad/GamepadList.cpp Modules/gamepad/NavigatorGamepad.cpp + Modules/geolocation/Coordinates.cpp Modules/geolocation/Geolocation.cpp Modules/geolocation/GeolocationController.cpp Modules/geolocation/NavigatorGeolocation.cpp diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog index fd1aea11b54322d7858be1fbb3578b1ebea85216..49c2976587ede24ecb37c4ba069f660b63395029 100644 --- a/Source/WebCore/ChangeLog +++ b/Source/WebCore/ChangeLog @@ -1,3 +1,34 @@ +2013-03-22 Steve Block + + Use generated bindings for the Coordinates type used by Geolocation + https://bugs.webkit.org/show_bug.cgi?id=112975 + + Reviewed by Kentaro Hara. + + No new tests, refactoring only. + + * CMakeLists.txt: + * GNUmakefile.list.am: + * Modules/geolocation/Coordinates.cpp: Renamed from Source/WebCore/bindings/js/JSCoordinatesCustom.cpp. + (WebCore): + (WebCore::Coordinates::altitude): + (WebCore::Coordinates::altitudeAccuracy): + (WebCore::Coordinates::heading): + (WebCore::Coordinates::speed): + * Modules/geolocation/Coordinates.h: + (Coordinates): + * Modules/geolocation/Coordinates.idl: + * Target.pri: + * UseJSC.cmake: + * UseV8.cmake: + * WebCore.gypi: + * WebCore.vcproj/WebCore.vcproj: + * WebCore.vcxproj/WebCore.vcxproj: + * WebCore.vcxproj/WebCore.vcxproj.filters: + * WebCore.xcodeproj/project.pbxproj: + * bindings/js/JSBindingsAllInOne.cpp: + * bindings/v8/custom/V8CoordinatesCustom.cpp: Removed. + 2013-03-22 Kunihiko Sakamoto INPUT_MULTIPLE_FIELDS_UI: Incomplete datetime format should fallback to default diff --git a/Source/WebCore/GNUmakefile.list.am b/Source/WebCore/GNUmakefile.list.am index a566e75bc9f4021f2e6851041bbf1074ae3bffcd..72e5eb3a0105d115865d30280945ae12c2482f33 100644 --- a/Source/WebCore/GNUmakefile.list.am +++ b/Source/WebCore/GNUmakefile.list.am @@ -1856,6 +1856,7 @@ webcore_modules_sources += \ Source/WebCore/Modules/gamepad/GamepadList.h \ Source/WebCore/Modules/gamepad/NavigatorGamepad.cpp \ Source/WebCore/Modules/gamepad/NavigatorGamepad.h \ + Source/WebCore/Modules/geolocation/Coordinates.cpp \ Source/WebCore/Modules/geolocation/Coordinates.h \ Source/WebCore/Modules/geolocation/Geolocation.cpp \ Source/WebCore/Modules/geolocation/Geolocation.h \ @@ -2332,7 +2333,6 @@ webcore_sources += \ Source/WebCore/bindings/js/JSCanvasRenderingContextCustom.cpp \ Source/WebCore/bindings/js/JSClipboardCustom.cpp \ Source/WebCore/bindings/js/JSConsoleCustom.cpp \ - Source/WebCore/bindings/js/JSCoordinatesCustom.cpp \ Source/WebCore/bindings/js/JSCryptoCustom.cpp \ Source/WebCore/bindings/js/JSCustomSQLStatementErrorCallback.cpp \ Source/WebCore/bindings/js/JSCustomXPathNSResolver.cpp \ diff --git a/Source/WebCore/bindings/js/JSCoordinatesCustom.cpp b/Source/WebCore/Modules/geolocation/Coordinates.cpp similarity index 62% rename from Source/WebCore/bindings/js/JSCoordinatesCustom.cpp rename to Source/WebCore/Modules/geolocation/Coordinates.cpp index 8ef34ad413d7a1549256a5a07b0f1cd5dadd71cf..d7b759d37d4405fde781f4071a4fe2cfcca0a5d3 100644 --- a/Source/WebCore/bindings/js/JSCoordinatesCustom.cpp +++ b/Source/WebCore/Modules/geolocation/Coordinates.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009 Apple Inc. All Rights Reserved. + * Copyright (C) 2013 Google Inc. All Rights Reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -24,44 +24,44 @@ */ #include "config.h" -#include "JSCoordinates.h" - #include "Coordinates.h" -using namespace JSC; - namespace WebCore { - -JSValue JSCoordinates::altitude(ExecState*) const + +double Coordinates::altitude(bool& isNull) const { - Coordinates* imp = impl(); - if (!imp->canProvideAltitude()) - return jsNull(); - return jsNumber(imp->altitude()); + if (m_canProvideAltitude) + return m_altitude; + + isNull = true; + return 0; } -JSValue JSCoordinates::altitudeAccuracy(ExecState*) const +double Coordinates::altitudeAccuracy(bool& isNull) const { - Coordinates* imp = impl(); - if (!imp->canProvideAltitudeAccuracy()) - return jsNull(); - return jsNumber(imp->altitudeAccuracy()); + if (m_canProvideAltitudeAccuracy) + return m_altitudeAccuracy; + + isNull = true; + return 0; } -JSValue JSCoordinates::heading(ExecState*) const +double Coordinates::heading(bool& isNull) const { - Coordinates* imp = impl(); - if (!imp->canProvideHeading()) - return jsNull(); - return jsNumber(imp->heading()); + if (m_canProvideHeading) + return m_heading; + + isNull = true; + return 0; } -JSValue JSCoordinates::speed(ExecState*) const +double Coordinates::speed(bool& isNull) const { - Coordinates* imp = impl(); - if (!imp->canProvideSpeed()) - return jsNull(); - return jsNumber(imp->speed()); -} + if (m_canProvideSpeed) + return m_speed; + isNull = true; + return 0; +} + } // namespace WebCore diff --git a/Source/WebCore/Modules/geolocation/Coordinates.h b/Source/WebCore/Modules/geolocation/Coordinates.h index 3de1366f1fa5ed7b4d4dd2650286414e58c950a4..fb134a5022f7a3b77d50be32065778f5c4a5c7a1 100644 --- a/Source/WebCore/Modules/geolocation/Coordinates.h +++ b/Source/WebCore/Modules/geolocation/Coordinates.h @@ -42,16 +42,11 @@ public: double latitude() const { return m_latitude; } double longitude() const { return m_longitude; } - double altitude() const { return m_altitude; } + double altitude(bool& isNull) const; double accuracy() const { return m_accuracy; } - double altitudeAccuracy() const { return m_altitudeAccuracy; } - double heading() const { return m_heading; } - double speed() const { return m_speed; } - - bool canProvideAltitude() const { return m_canProvideAltitude; } - bool canProvideAltitudeAccuracy() const { return m_canProvideAltitudeAccuracy; } - bool canProvideHeading() const { return m_canProvideHeading; } - bool canProvideSpeed() const { return m_canProvideSpeed; } + double altitudeAccuracy(bool& isNull) const; + double heading(bool& isNull) const; + double speed(bool& isNull) const; private: Coordinates(double latitude, double longitude, bool providesAltitude, double altitude, double accuracy, bool providesAltitudeAccuracy, double altitudeAccuracy, bool providesHeading, double heading, bool providesSpeed, double speed) diff --git a/Source/WebCore/Modules/geolocation/Coordinates.idl b/Source/WebCore/Modules/geolocation/Coordinates.idl index dc64a60e499407fbcbbb47ea9c44ae291ac01174..f27ff7ef48152c227f14717198aa6cebc2b4bdc1 100644 --- a/Source/WebCore/Modules/geolocation/Coordinates.idl +++ b/Source/WebCore/Modules/geolocation/Coordinates.idl @@ -29,9 +29,9 @@ ] interface Coordinates { readonly attribute double latitude; readonly attribute double longitude; - [Custom] readonly attribute double altitude; + readonly attribute double? altitude; readonly attribute double accuracy; - [Custom] readonly attribute double altitudeAccuracy; - [Custom] readonly attribute double heading; - [Custom] readonly attribute double speed; + readonly attribute double? altitudeAccuracy; + readonly attribute double? heading; + readonly attribute double? speed; }; diff --git a/Source/WebCore/Target.pri b/Source/WebCore/Target.pri index bbd9af05a25836c00c733fc05159e9d33d3d6cf9..152154e250aa5e3ee3a35168632b0555491e25c3 100644 --- a/Source/WebCore/Target.pri +++ b/Source/WebCore/Target.pri @@ -27,6 +27,7 @@ CONFIG += staticlib } SOURCES += \ + Modules/geolocation/Coordinates.cpp \ Modules/geolocation/Geolocation.cpp \ Modules/geolocation/GeolocationController.cpp \ Modules/geolocation/NavigatorGeolocation.cpp \ @@ -95,7 +96,6 @@ SOURCES += \ bindings/js/JSCanvasRenderingContextCustom.cpp \ bindings/js/JSClipboardCustom.cpp \ bindings/js/JSConsoleCustom.cpp \ - bindings/js/JSCoordinatesCustom.cpp \ bindings/js/JSCryptoCustom.cpp \ bindings/js/JSCustomXPathNSResolver.cpp \ bindings/js/JSDictionary.cpp \ diff --git a/Source/WebCore/UseJSC.cmake b/Source/WebCore/UseJSC.cmake index f2d3a1abc61560023f87898e18473a615f2f808f..8454a5a7e1eddc552c312b1794b4413ddd67fe6b 100644 --- a/Source/WebCore/UseJSC.cmake +++ b/Source/WebCore/UseJSC.cmake @@ -48,7 +48,6 @@ list(APPEND WebCore_SOURCES bindings/js/JSCanvasRenderingContextCustom.cpp bindings/js/JSClipboardCustom.cpp bindings/js/JSConsoleCustom.cpp - bindings/js/JSCoordinatesCustom.cpp bindings/js/JSCryptoCustom.cpp bindings/js/JSCustomXPathNSResolver.cpp bindings/js/JSDictionary.cpp diff --git a/Source/WebCore/UseV8.cmake b/Source/WebCore/UseV8.cmake index b792df8fd9557b29081aaa6375b45531fb195c0d..a46bbb0d6968a6c5c8ebbd064800955e3c84637b 100644 --- a/Source/WebCore/UseV8.cmake +++ b/Source/WebCore/UseV8.cmake @@ -84,7 +84,6 @@ list(APPEND WebCore_SOURCES bindings/v8/custom/V8CanvasRenderingContextCustom.cpp bindings/v8/custom/V8ClipboardCustom.cpp bindings/v8/custom/V8ConsoleCustom.cpp - bindings/v8/custom/V8CoordinatesCustom.cpp bindings/v8/custom/V8CustomEventCustom.cpp bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp bindings/v8/custom/V8CustomXPathNSResolver.cpp diff --git a/Source/WebCore/WebCore.gypi b/Source/WebCore/WebCore.gypi index f3275aa22b4792309e7f29d998ebecf8e5e54f59..c306087cca949ba64fd31657f1d0255df0739e11 100644 --- a/Source/WebCore/WebCore.gypi +++ b/Source/WebCore/WebCore.gypi @@ -797,6 +797,7 @@ 'Modules/gamepad/GamepadList.h', 'Modules/gamepad/NavigatorGamepad.cpp', 'Modules/gamepad/NavigatorGamepad.h', + 'Modules/geolocation/Coordinates.cpp', 'Modules/geolocation/Geolocation.cpp', 'Modules/geolocation/GeolocationController.cpp', 'Modules/geolocation/NavigatorGeolocation.cpp', @@ -1442,7 +1443,6 @@ 'bindings/v8/custom/V8CanvasRenderingContextCustom.cpp', 'bindings/v8/custom/V8ClipboardCustom.cpp', 'bindings/v8/custom/V8ConsoleCustom.cpp', - 'bindings/v8/custom/V8CoordinatesCustom.cpp', 'bindings/v8/custom/V8CryptoCustom.cpp', 'bindings/v8/custom/V8CustomElementConstructorCustom.cpp', 'bindings/v8/custom/V8CustomEventCustom.cpp', diff --git a/Source/WebCore/WebCore.vcproj/WebCore.vcproj b/Source/WebCore/WebCore.vcproj/WebCore.vcproj index f3b6ac4cbd28889838a86fe17c0809d99546205a..97b39ef9b822f327ebd523cb86ba4c33dde18f08 100755 --- a/Source/WebCore/WebCore.vcproj/WebCore.vcproj +++ b/Source/WebCore/WebCore.vcproj/WebCore.vcproj @@ -25177,6 +25177,10 @@ + + @@ -66849,58 +66853,6 @@ /> - - - - - - - - - - - - - - - - - - - - diff --git a/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj b/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj index 0febdb0c6c0aa20ce75f438522d1422b9322592f..e648f6351b3b70559111b45975dae3ef76c42389 100644 --- a/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj +++ b/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj @@ -3634,6 +3634,7 @@ + @@ -9229,14 +9230,6 @@ true true - - true - true - true - true - true - true - true true diff --git a/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters b/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters index ef320d73556a08370fce3f85108dfc8f544b6dd0..13ff0d61d50ba36172add36215201774dcacedcd 100644 --- a/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters +++ b/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters @@ -1734,6 +1734,9 @@ Modules\filesystem + + Modules\geolocation + Modules\geolocation @@ -5871,9 +5874,6 @@ bindings\js - - bindings\js - bindings\js diff --git a/Source/WebCore/WebCore.xcodeproj/project.pbxproj b/Source/WebCore/WebCore.xcodeproj/project.pbxproj index 0a2330855d968ee7ffa81e1a2f78eff2e91f6767..50d01d782524defb3b3c4de84433f24d5a934c1d 100644 --- a/Source/WebCore/WebCore.xcodeproj/project.pbxproj +++ b/Source/WebCore/WebCore.xcodeproj/project.pbxproj @@ -3578,6 +3578,7 @@ 973F418B169B96030006BF60 /* HTMLParserOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 973F4187169B95EF0006BF60 /* HTMLParserOptions.cpp */; }; 974187D316A7932700FA77A7 /* HTMLParserThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 974187D016A7932200FA77A7 /* HTMLParserThread.cpp */; }; 974187D416A7932900FA77A7 /* HTMLParserThread.h in Headers */ = {isa = PBXBuildFile; fileRef = 974187D116A7932200FA77A7 /* HTMLParserThread.h */; }; + 9746AF2114F4DDE6003E7A72 /* Coordinates.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9746AF1114F4DDE6003E7A72 /* Coordinates.cpp */; }; 9746AF2114F4DDE6003E7A71 /* Coordinates.h in Headers */ = {isa = PBXBuildFile; fileRef = 9746AF1114F4DDE6003E7A70 /* Coordinates.h */; settings = {ATTRIBUTES = (Private, ); }; }; 9746AF2314F4DDE6003E7A70 /* Geolocation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9746AF1314F4DDE6003E7A70 /* Geolocation.cpp */; }; 9746AF2414F4DDE6003E7A70 /* Geolocation.h in Headers */ = {isa = PBXBuildFile; fileRef = 9746AF1414F4DDE6003E7A70 /* Geolocation.h */; settings = {ATTRIBUTES = (Private, ); }; }; @@ -6824,7 +6825,6 @@ FE6F6AB0169E057500FC30A2 /* DatabaseBackendContext.h in Headers */ = {isa = PBXBuildFile; fileRef = FE6F6AAE169E057500FC30A2 /* DatabaseBackendContext.h */; settings = {ATTRIBUTES = (Private, ); }; }; FE6FD48D0F676E9300092873 /* JSCoordinates.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FE6FD48B0F676E9300092873 /* JSCoordinates.cpp */; }; FE6FD48E0F676E9300092873 /* JSCoordinates.h in Headers */ = {isa = PBXBuildFile; fileRef = FE6FD48C0F676E9300092873 /* JSCoordinates.h */; }; - FE700DD10F92D81A008E2BFE /* JSCoordinatesCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FE700DD00F92D81A008E2BFE /* JSCoordinatesCustom.cpp */; }; FE80D7AB0E9C1ED2000D6F75 /* JSGeolocationCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FE80D7A60E9C1ED2000D6F75 /* JSGeolocationCustom.cpp */; }; FE80DA630E9C4703000D6F75 /* JSGeolocation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FE80DA5F0E9C4703000D6F75 /* JSGeolocation.cpp */; }; FE80DA640E9C4703000D6F75 /* JSGeolocation.h in Headers */ = {isa = PBXBuildFile; fileRef = FE80DA600E9C4703000D6F75 /* JSGeolocation.h */; }; @@ -11092,6 +11092,7 @@ 973F4188169B95EF0006BF60 /* HTMLParserOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTMLParserOptions.h; path = parser/HTMLParserOptions.h; sourceTree = ""; }; 974187D016A7932200FA77A7 /* HTMLParserThread.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HTMLParserThread.cpp; path = parser/HTMLParserThread.cpp; sourceTree = ""; }; 974187D116A7932200FA77A7 /* HTMLParserThread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTMLParserThread.h; path = parser/HTMLParserThread.h; sourceTree = ""; }; + 9746AF1114F4DDE6003E7A72 /* Coordinates.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Coordinates.cpp; path = Modules/geolocation/Coordinates.cpp; sourceTree = ""; }; 9746AF1114F4DDE6003E7A70 /* Coordinates.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Coordinates.h; path = Modules/geolocation/Coordinates.h; sourceTree = ""; }; 9746AF1214F4DDE6003E7A70 /* Coordinates.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = Coordinates.idl; path = Modules/geolocation/Coordinates.idl; sourceTree = ""; }; 9746AF1314F4DDE6003E7A70 /* Geolocation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Geolocation.cpp; path = Modules/geolocation/Geolocation.cpp; sourceTree = ""; }; @@ -14638,7 +14639,6 @@ FE6F6AAE169E057500FC30A2 /* DatabaseBackendContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DatabaseBackendContext.h; path = Modules/webdatabase/DatabaseBackendContext.h; sourceTree = ""; }; FE6FD48B0F676E9300092873 /* JSCoordinates.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCoordinates.cpp; sourceTree = ""; }; FE6FD48C0F676E9300092873 /* JSCoordinates.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSCoordinates.h; sourceTree = ""; }; - FE700DD00F92D81A008E2BFE /* JSCoordinatesCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCoordinatesCustom.cpp; sourceTree = ""; }; FE80D7A60E9C1ED2000D6F75 /* JSGeolocationCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSGeolocationCustom.cpp; sourceTree = ""; }; FE80DA5F0E9C4703000D6F75 /* JSGeolocation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSGeolocation.cpp; sourceTree = ""; }; FE80DA600E9C4703000D6F75 /* JSGeolocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSGeolocation.h; sourceTree = ""; }; @@ -18508,6 +18508,7 @@ 971145FF14EF007900674FD9 /* geolocation */ = { isa = PBXGroup; children = ( + 9746AF1114F4DDE6003E7A72 /* Coordinates.cpp */, 9746AF1114F4DDE6003E7A70 /* Coordinates.h */, 9746AF1214F4DDE6003E7A70 /* Coordinates.idl */, 9746AF1314F4DDE6003E7A70 /* Geolocation.cpp */, @@ -21228,7 +21229,6 @@ 93BA59B10F2AA5FE008E8E99 /* JSCDATASectionCustom.cpp */, BCA83E510D7CE205003421A8 /* JSClipboardCustom.cpp */, C0DFC86F0DB6841A003EAE7C /* JSConsoleCustom.cpp */, - FE700DD00F92D81A008E2BFE /* JSCoordinatesCustom.cpp */, 209B456A16796A7E00E54E4E /* JSCryptoCustom.cpp */, E1AD14901297337400ACA989 /* JSCSSFontFaceRuleCustom.cpp */, E1AD147B1297307E00ACA989 /* JSCSSImportRuleCustom.cpp */, @@ -27310,6 +27310,7 @@ E1424C90164B460B00F32D40 /* CookieJarMac.mm in Sources */, 7EE6846312D26E3800E79415 /* CookieStorageCFNet.cpp in Sources */, E13F01F11270E19000DFBA71 /* CookieStorageMac.mm in Sources */, + 9746AF2114F4DDE6003E7A72 /* Coordinates.cpp in Sources */, BC5EB9500E82056B00B25965 /* CounterDirectives.cpp in Sources */, 9392F1500AD1862300691BD4 /* CounterNode.cpp in Sources */, D0B0556909C6700100307E43 /* CreateLinkCommand.cpp in Sources */, @@ -28307,7 +28308,6 @@ C0DFC8700DB6841A003EAE7C /* JSConsoleCustom.cpp in Sources */, FDA15EBD12B03F0B003A583A /* JSConvolverNode.cpp in Sources */, FE6FD48D0F676E9300092873 /* JSCoordinates.cpp in Sources */, - FE700DD10F92D81A008E2BFE /* JSCoordinatesCustom.cpp in Sources */, 930705D809E0C9B700B17FE4 /* JSCounter.cpp in Sources */, 975CA2A11303679D00E99AD9 /* JSCrypto.cpp in Sources */, 209B456B16796A7E00E54E4E /* JSCryptoCustom.cpp in Sources */, diff --git a/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp b/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp index b6853eb0802872bc2e40d3b988ba2957f51e4812..2ba10f556e8b4802e8ba966fd1d3ce1243124056 100644 --- a/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp +++ b/Source/WebCore/bindings/js/JSBindingsAllInOne.cpp @@ -50,7 +50,6 @@ #include "JSCanvasRenderingContextCustom.cpp" #include "JSClipboardCustom.cpp" #include "JSConsoleCustom.cpp" -#include "JSCoordinatesCustom.cpp" #include "JSCryptoCustom.cpp" #include "JSCustomSQLStatementErrorCallback.cpp" #include "JSCustomXPathNSResolver.cpp" diff --git a/Source/WebCore/bindings/v8/custom/V8CoordinatesCustom.cpp b/Source/WebCore/bindings/v8/custom/V8CoordinatesCustom.cpp deleted file mode 100644 index d8d88e2aa746e73d891e326d7fe7521562499f27..0000000000000000000000000000000000000000 --- a/Source/WebCore/bindings/v8/custom/V8CoordinatesCustom.cpp +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright 2009, The Android Open Source Project - * - * 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. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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 "V8Coordinates.h" - -#include "Coordinates.h" -#include "V8Binding.h" - -namespace WebCore { - -v8::Handle V8Coordinates::altitudeAttrGetterCustom(v8::Local name, const v8::AccessorInfo& info) -{ - v8::Handle holder = info.Holder(); - Coordinates* imp = V8Coordinates::toNative(holder); - if (!imp->canProvideAltitude()) - return v8Null(info.GetIsolate()); - return v8::Number::New(imp->altitude()); -} - -v8::Handle V8Coordinates::altitudeAccuracyAttrGetterCustom(v8::Local name, const v8::AccessorInfo& info) -{ - v8::Handle holder = info.Holder(); - Coordinates* imp = V8Coordinates::toNative(holder); - if (!imp->canProvideAltitudeAccuracy()) - return v8Null(info.GetIsolate()); - return v8::Number::New(imp->altitudeAccuracy()); -} - -v8::Handle V8Coordinates::headingAttrGetterCustom(v8::Local name, const v8::AccessorInfo& info) -{ - v8::Handle holder = info.Holder(); - Coordinates* imp = V8Coordinates::toNative(holder); - if (!imp->canProvideHeading()) - return v8Null(info.GetIsolate()); - return v8::Number::New(imp->heading()); -} - -v8::Handle V8Coordinates::speedAttrGetterCustom(v8::Local name, const v8::AccessorInfo& info) -{ - v8::Handle holder = info.Holder(); - Coordinates* imp = V8Coordinates::toNative(holder); - if (!imp->canProvideSpeed()) - return v8Null(info.GetIsolate()); - return v8::Number::New(imp->speed()); -} - -} // namespace WebCore