Use generated bindings for the Coordinates type used by Geolocation

https://bugs.webkit.org/show_bug.cgi?id=112975

Patch by Steve Block <steveblock@chromium.org> on 2013-03-22
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.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146585 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 8d06d34e
...@@ -804,6 +804,7 @@ set(WebCore_SOURCES ...@@ -804,6 +804,7 @@ set(WebCore_SOURCES
Modules/gamepad/GamepadList.cpp Modules/gamepad/GamepadList.cpp
Modules/gamepad/NavigatorGamepad.cpp Modules/gamepad/NavigatorGamepad.cpp
Modules/geolocation/Coordinates.cpp
Modules/geolocation/Geolocation.cpp Modules/geolocation/Geolocation.cpp
Modules/geolocation/GeolocationController.cpp Modules/geolocation/GeolocationController.cpp
Modules/geolocation/NavigatorGeolocation.cpp Modules/geolocation/NavigatorGeolocation.cpp
......
2013-03-22 Steve Block <steveblock@chromium.org>
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 <ksakamoto@chromium.org> 2013-03-22 Kunihiko Sakamoto <ksakamoto@chromium.org>
INPUT_MULTIPLE_FIELDS_UI: Incomplete datetime format should fallback to default INPUT_MULTIPLE_FIELDS_UI: Incomplete datetime format should fallback to default
...@@ -1856,6 +1856,7 @@ webcore_modules_sources += \ ...@@ -1856,6 +1856,7 @@ webcore_modules_sources += \
Source/WebCore/Modules/gamepad/GamepadList.h \ Source/WebCore/Modules/gamepad/GamepadList.h \
Source/WebCore/Modules/gamepad/NavigatorGamepad.cpp \ Source/WebCore/Modules/gamepad/NavigatorGamepad.cpp \
Source/WebCore/Modules/gamepad/NavigatorGamepad.h \ Source/WebCore/Modules/gamepad/NavigatorGamepad.h \
Source/WebCore/Modules/geolocation/Coordinates.cpp \
Source/WebCore/Modules/geolocation/Coordinates.h \ Source/WebCore/Modules/geolocation/Coordinates.h \
Source/WebCore/Modules/geolocation/Geolocation.cpp \ Source/WebCore/Modules/geolocation/Geolocation.cpp \
Source/WebCore/Modules/geolocation/Geolocation.h \ Source/WebCore/Modules/geolocation/Geolocation.h \
...@@ -2332,7 +2333,6 @@ webcore_sources += \ ...@@ -2332,7 +2333,6 @@ webcore_sources += \
Source/WebCore/bindings/js/JSCanvasRenderingContextCustom.cpp \ Source/WebCore/bindings/js/JSCanvasRenderingContextCustom.cpp \
Source/WebCore/bindings/js/JSClipboardCustom.cpp \ Source/WebCore/bindings/js/JSClipboardCustom.cpp \
Source/WebCore/bindings/js/JSConsoleCustom.cpp \ Source/WebCore/bindings/js/JSConsoleCustom.cpp \
Source/WebCore/bindings/js/JSCoordinatesCustom.cpp \
Source/WebCore/bindings/js/JSCryptoCustom.cpp \ Source/WebCore/bindings/js/JSCryptoCustom.cpp \
Source/WebCore/bindings/js/JSCustomSQLStatementErrorCallback.cpp \ Source/WebCore/bindings/js/JSCustomSQLStatementErrorCallback.cpp \
Source/WebCore/bindings/js/JSCustomXPathNSResolver.cpp \ Source/WebCore/bindings/js/JSCustomXPathNSResolver.cpp \
......
/* /*
* 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 * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
...@@ -24,44 +24,44 @@ ...@@ -24,44 +24,44 @@
*/ */
#include "config.h" #include "config.h"
#include "JSCoordinates.h"
#include "Coordinates.h" #include "Coordinates.h"
using namespace JSC;
namespace WebCore { namespace WebCore {
JSValue JSCoordinates::altitude(ExecState*) const double Coordinates::altitude(bool& isNull) const
{ {
Coordinates* imp = impl(); if (m_canProvideAltitude)
if (!imp->canProvideAltitude()) return m_altitude;
return jsNull();
return jsNumber(imp->altitude()); isNull = true;
return 0;
} }
JSValue JSCoordinates::altitudeAccuracy(ExecState*) const double Coordinates::altitudeAccuracy(bool& isNull) const
{ {
Coordinates* imp = impl(); if (m_canProvideAltitudeAccuracy)
if (!imp->canProvideAltitudeAccuracy()) return m_altitudeAccuracy;
return jsNull();
return jsNumber(imp->altitudeAccuracy()); isNull = true;
return 0;
} }
JSValue JSCoordinates::heading(ExecState*) const double Coordinates::heading(bool& isNull) const
{ {
Coordinates* imp = impl(); if (m_canProvideHeading)
if (!imp->canProvideHeading()) return m_heading;
return jsNull();
return jsNumber(imp->heading()); isNull = true;
return 0;
} }
JSValue JSCoordinates::speed(ExecState*) const double Coordinates::speed(bool& isNull) const
{ {
Coordinates* imp = impl(); if (m_canProvideSpeed)
if (!imp->canProvideSpeed()) return m_speed;
return jsNull();
return jsNumber(imp->speed());
}
isNull = true;
return 0;
}
} // namespace WebCore } // namespace WebCore
...@@ -42,16 +42,11 @@ public: ...@@ -42,16 +42,11 @@ public:
double latitude() const { return m_latitude; } double latitude() const { return m_latitude; }
double longitude() const { return m_longitude; } double longitude() const { return m_longitude; }
double altitude() const { return m_altitude; } double altitude(bool& isNull) const;
double accuracy() const { return m_accuracy; } double accuracy() const { return m_accuracy; }
double altitudeAccuracy() const { return m_altitudeAccuracy; } double altitudeAccuracy(bool& isNull) const;
double heading() const { return m_heading; } double heading(bool& isNull) const;
double speed() const { return m_speed; } double speed(bool& isNull) const;
bool canProvideAltitude() const { return m_canProvideAltitude; }
bool canProvideAltitudeAccuracy() const { return m_canProvideAltitudeAccuracy; }
bool canProvideHeading() const { return m_canProvideHeading; }
bool canProvideSpeed() const { return m_canProvideSpeed; }
private: private:
Coordinates(double latitude, double longitude, bool providesAltitude, double altitude, double accuracy, bool providesAltitudeAccuracy, double altitudeAccuracy, bool providesHeading, double heading, bool providesSpeed, double speed) Coordinates(double latitude, double longitude, bool providesAltitude, double altitude, double accuracy, bool providesAltitudeAccuracy, double altitudeAccuracy, bool providesHeading, double heading, bool providesSpeed, double speed)
......
...@@ -29,9 +29,9 @@ ...@@ -29,9 +29,9 @@
] interface Coordinates { ] interface Coordinates {
readonly attribute double latitude; readonly attribute double latitude;
readonly attribute double longitude; readonly attribute double longitude;
[Custom] readonly attribute double altitude; readonly attribute double? altitude;
readonly attribute double accuracy; readonly attribute double accuracy;
[Custom] readonly attribute double altitudeAccuracy; readonly attribute double? altitudeAccuracy;
[Custom] readonly attribute double heading; readonly attribute double? heading;
[Custom] readonly attribute double speed; readonly attribute double? speed;
}; };
...@@ -27,6 +27,7 @@ CONFIG += staticlib ...@@ -27,6 +27,7 @@ CONFIG += staticlib
} }
SOURCES += \ SOURCES += \
Modules/geolocation/Coordinates.cpp \
Modules/geolocation/Geolocation.cpp \ Modules/geolocation/Geolocation.cpp \
Modules/geolocation/GeolocationController.cpp \ Modules/geolocation/GeolocationController.cpp \
Modules/geolocation/NavigatorGeolocation.cpp \ Modules/geolocation/NavigatorGeolocation.cpp \
...@@ -95,7 +96,6 @@ SOURCES += \ ...@@ -95,7 +96,6 @@ SOURCES += \
bindings/js/JSCanvasRenderingContextCustom.cpp \ bindings/js/JSCanvasRenderingContextCustom.cpp \
bindings/js/JSClipboardCustom.cpp \ bindings/js/JSClipboardCustom.cpp \
bindings/js/JSConsoleCustom.cpp \ bindings/js/JSConsoleCustom.cpp \
bindings/js/JSCoordinatesCustom.cpp \
bindings/js/JSCryptoCustom.cpp \ bindings/js/JSCryptoCustom.cpp \
bindings/js/JSCustomXPathNSResolver.cpp \ bindings/js/JSCustomXPathNSResolver.cpp \
bindings/js/JSDictionary.cpp \ bindings/js/JSDictionary.cpp \
......
...@@ -48,7 +48,6 @@ list(APPEND WebCore_SOURCES ...@@ -48,7 +48,6 @@ list(APPEND WebCore_SOURCES
bindings/js/JSCanvasRenderingContextCustom.cpp bindings/js/JSCanvasRenderingContextCustom.cpp
bindings/js/JSClipboardCustom.cpp bindings/js/JSClipboardCustom.cpp
bindings/js/JSConsoleCustom.cpp bindings/js/JSConsoleCustom.cpp
bindings/js/JSCoordinatesCustom.cpp
bindings/js/JSCryptoCustom.cpp bindings/js/JSCryptoCustom.cpp
bindings/js/JSCustomXPathNSResolver.cpp bindings/js/JSCustomXPathNSResolver.cpp
bindings/js/JSDictionary.cpp bindings/js/JSDictionary.cpp
......
...@@ -84,7 +84,6 @@ list(APPEND WebCore_SOURCES ...@@ -84,7 +84,6 @@ list(APPEND WebCore_SOURCES
bindings/v8/custom/V8CanvasRenderingContextCustom.cpp bindings/v8/custom/V8CanvasRenderingContextCustom.cpp
bindings/v8/custom/V8ClipboardCustom.cpp bindings/v8/custom/V8ClipboardCustom.cpp
bindings/v8/custom/V8ConsoleCustom.cpp bindings/v8/custom/V8ConsoleCustom.cpp
bindings/v8/custom/V8CoordinatesCustom.cpp
bindings/v8/custom/V8CustomEventCustom.cpp bindings/v8/custom/V8CustomEventCustom.cpp
bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp
bindings/v8/custom/V8CustomXPathNSResolver.cpp bindings/v8/custom/V8CustomXPathNSResolver.cpp
......
...@@ -797,6 +797,7 @@ ...@@ -797,6 +797,7 @@
'Modules/gamepad/GamepadList.h', 'Modules/gamepad/GamepadList.h',
'Modules/gamepad/NavigatorGamepad.cpp', 'Modules/gamepad/NavigatorGamepad.cpp',
'Modules/gamepad/NavigatorGamepad.h', 'Modules/gamepad/NavigatorGamepad.h',
'Modules/geolocation/Coordinates.cpp',
'Modules/geolocation/Geolocation.cpp', 'Modules/geolocation/Geolocation.cpp',
'Modules/geolocation/GeolocationController.cpp', 'Modules/geolocation/GeolocationController.cpp',
'Modules/geolocation/NavigatorGeolocation.cpp', 'Modules/geolocation/NavigatorGeolocation.cpp',
...@@ -1442,7 +1443,6 @@ ...@@ -1442,7 +1443,6 @@
'bindings/v8/custom/V8CanvasRenderingContextCustom.cpp', 'bindings/v8/custom/V8CanvasRenderingContextCustom.cpp',
'bindings/v8/custom/V8ClipboardCustom.cpp', 'bindings/v8/custom/V8ClipboardCustom.cpp',
'bindings/v8/custom/V8ConsoleCustom.cpp', 'bindings/v8/custom/V8ConsoleCustom.cpp',
'bindings/v8/custom/V8CoordinatesCustom.cpp',
'bindings/v8/custom/V8CryptoCustom.cpp', 'bindings/v8/custom/V8CryptoCustom.cpp',
'bindings/v8/custom/V8CustomElementConstructorCustom.cpp', 'bindings/v8/custom/V8CustomElementConstructorCustom.cpp',
'bindings/v8/custom/V8CustomEventCustom.cpp', 'bindings/v8/custom/V8CustomEventCustom.cpp',
......
...@@ -25177,6 +25177,10 @@ ...@@ -25177,6 +25177,10 @@
<Filter <Filter
Name="geolocation" Name="geolocation"
> >
<File
RelativePath="..\Modules\geolocation\Coordinates.cpp"
>
</File>
<File <File
RelativePath="..\Modules\geolocation\Coordinates.h" RelativePath="..\Modules\geolocation\Coordinates.h"
> >
...@@ -66849,58 +66853,6 @@ ...@@ -66849,58 +66853,6 @@
/> />
</FileConfiguration> </FileConfiguration>
</File> </File>
<File
RelativePath="..\bindings\js\JSCoordinatesCustom.cpp"
>
<FileConfiguration
Name="Debug|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug_Cairo_CFLite|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
<FileConfiguration
Name="Release_Cairo_CFLite|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug_All|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
<FileConfiguration
Name="Production|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
/>
</FileConfiguration>
</File>
<File <File
RelativePath="..\bindings\js\JSCSSFontFaceRuleCustom.cpp" RelativePath="..\bindings\js\JSCSSFontFaceRuleCustom.cpp"
> >
...@@ -3634,6 +3634,7 @@ ...@@ -3634,6 +3634,7 @@
<ClCompile Include="..\Modules\filesystem\FileWriterSync.cpp" /> <ClCompile Include="..\Modules\filesystem\FileWriterSync.cpp" />
<ClCompile Include="..\Modules\filesystem\LocalFileSystem.cpp" /> <ClCompile Include="..\Modules\filesystem\LocalFileSystem.cpp" />
<ClCompile Include="..\Modules\filesystem\WorkerContextFileSystem.cpp" /> <ClCompile Include="..\Modules\filesystem\WorkerContextFileSystem.cpp" />
<ClCompile Include="..\Modules\geolocation\Coordinates.cpp" />
<ClCompile Include="..\Modules\geolocation\Geolocation.cpp" /> <ClCompile Include="..\Modules\geolocation\Geolocation.cpp" />
<ClCompile Include="..\Modules\geolocation\GeolocationController.cpp" /> <ClCompile Include="..\Modules\geolocation\GeolocationController.cpp" />
<ClCompile Include="..\Modules\geolocation\NavigatorGeolocation.cpp" /> <ClCompile Include="..\Modules\geolocation\NavigatorGeolocation.cpp" />
...@@ -9229,14 +9230,6 @@ ...@@ -9229,14 +9230,6 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
</ClCompile> </ClCompile>
<ClCompile Include="..\bindings\js\JSCoordinatesCustom.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\bindings\js\JSCSSFontFaceRuleCustom.cpp"> <ClCompile Include="..\bindings\js\JSCSSFontFaceRuleCustom.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'">true</ExcludedFromBuild>
...@@ -1734,6 +1734,9 @@ ...@@ -1734,6 +1734,9 @@
<ClCompile Include="..\Modules\filesystem\WorkerContextFileSystem.cpp"> <ClCompile Include="..\Modules\filesystem\WorkerContextFileSystem.cpp">
<Filter>Modules\filesystem</Filter> <Filter>Modules\filesystem</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\Modules\geolocation\Coordinates.cpp">
<Filter>Modules\geolocation</Filter>
</ClCompile>
<ClCompile Include="..\Modules\geolocation\Geolocation.cpp"> <ClCompile Include="..\Modules\geolocation\Geolocation.cpp">
<Filter>Modules\geolocation</Filter> <Filter>Modules\geolocation</Filter>
</ClCompile> </ClCompile>
...@@ -5871,9 +5874,6 @@ ...@@ -5871,9 +5874,6 @@
<ClCompile Include="..\bindings\js\JSConsoleCustom.cpp"> <ClCompile Include="..\bindings\js\JSConsoleCustom.cpp">
<Filter>bindings\js</Filter> <Filter>bindings\js</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\bindings\js\JSCoordinatesCustom.cpp">
<Filter>bindings\js</Filter>
</ClCompile>
<ClCompile Include="..\bindings\js\JSCSSFontFaceRuleCustom.cpp"> <ClCompile Include="..\bindings\js\JSCSSFontFaceRuleCustom.cpp">
<Filter>bindings\js</Filter> <Filter>bindings\js</Filter>
</ClCompile> </ClCompile>
......
...@@ -3578,6 +3578,7 @@ ...@@ -3578,6 +3578,7 @@
973F418B169B96030006BF60 /* HTMLParserOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 973F4187169B95EF0006BF60 /* HTMLParserOptions.cpp */; }; 973F418B169B96030006BF60 /* HTMLParserOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 973F4187169B95EF0006BF60 /* HTMLParserOptions.cpp */; };
974187D316A7932700FA77A7 /* HTMLParserThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 974187D016A7932200FA77A7 /* HTMLParserThread.cpp */; }; 974187D316A7932700FA77A7 /* HTMLParserThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 974187D016A7932200FA77A7 /* HTMLParserThread.cpp */; };
974187D416A7932900FA77A7 /* HTMLParserThread.h in Headers */ = {isa = PBXBuildFile; fileRef = 974187D116A7932200FA77A7 /* HTMLParserThread.h */; }; 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, ); }; }; 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 */; }; 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, ); }; }; 9746AF2414F4DDE6003E7A70 /* Geolocation.h in Headers */ = {isa = PBXBuildFile; fileRef = 9746AF1414F4DDE6003E7A70 /* Geolocation.h */; settings = {ATTRIBUTES = (Private, ); }; };
...@@ -6824,7 +6825,6 @@ ...@@ -6824,7 +6825,6 @@
FE6F6AB0169E057500FC30A2 /* DatabaseBackendContext.h in Headers */ = {isa = PBXBuildFile; fileRef = FE6F6AAE169E057500FC30A2 /* DatabaseBackendContext.h */; settings = {ATTRIBUTES = (Private, ); }; }; 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 */; }; FE6FD48D0F676E9300092873 /* JSCoordinates.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FE6FD48B0F676E9300092873 /* JSCoordinates.cpp */; };
FE6FD48E0F676E9300092873 /* JSCoordinates.h in Headers */ = {isa = PBXBuildFile; fileRef = FE6FD48C0F676E9300092873 /* JSCoordinates.h */; }; 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 */; }; FE80D7AB0E9C1ED2000D6F75 /* JSGeolocationCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FE80D7A60E9C1ED2000D6F75 /* JSGeolocationCustom.cpp */; };
FE80DA630E9C4703000D6F75 /* JSGeolocation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FE80DA5F0E9C4703000D6F75 /* JSGeolocation.cpp */; }; FE80DA630E9C4703000D6F75 /* JSGeolocation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FE80DA5F0E9C4703000D6F75 /* JSGeolocation.cpp */; };
FE80DA640E9C4703000D6F75 /* JSGeolocation.h in Headers */ = {isa = PBXBuildFile; fileRef = FE80DA600E9C4703000D6F75 /* JSGeolocation.h */; }; FE80DA640E9C4703000D6F75 /* JSGeolocation.h in Headers */ = {isa = PBXBuildFile; fileRef = FE80DA600E9C4703000D6F75 /* JSGeolocation.h */; };
...@@ -11092,6 +11092,7 @@ ...@@ -11092,6 +11092,7 @@
973F4188169B95EF0006BF60 /* HTMLParserOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTMLParserOptions.h; path = parser/HTMLParserOptions.h; sourceTree = "<group>"; }; 973F4188169B95EF0006BF60 /* HTMLParserOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTMLParserOptions.h; path = parser/HTMLParserOptions.h; sourceTree = "<group>"; };
974187D016A7932200FA77A7 /* HTMLParserThread.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HTMLParserThread.cpp; path = parser/HTMLParserThread.cpp; sourceTree = "<group>"; }; 974187D016A7932200FA77A7 /* HTMLParserThread.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HTMLParserThread.cpp; path = parser/HTMLParserThread.cpp; sourceTree = "<group>"; };
974187D116A7932200FA77A7 /* HTMLParserThread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTMLParserThread.h; path = parser/HTMLParserThread.h; sourceTree = "<group>"; }; 974187D116A7932200FA77A7 /* HTMLParserThread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTMLParserThread.h; path = parser/HTMLParserThread.h; sourceTree = "<group>"; };
9746AF1114F4DDE6003E7A72 /* Coordinates.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Coordinates.cpp; path = Modules/geolocation/Coordinates.cpp; sourceTree = "<group>"; };
9746AF1114F4DDE6003E7A70 /* Coordinates.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Coordinates.h; path = Modules/geolocation/Coordinates.h; sourceTree = "<group>"; }; 9746AF1114F4DDE6003E7A70 /* Coordinates.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Coordinates.h; path = Modules/geolocation/Coordinates.h; sourceTree = "<group>"; };
9746AF1214F4DDE6003E7A70 /* Coordinates.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = Coordinates.idl; path = Modules/geolocation/Coordinates.idl; sourceTree = "<group>"; }; 9746AF1214F4DDE6003E7A70 /* Coordinates.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = Coordinates.idl; path = Modules/geolocation/Coordinates.idl; sourceTree = "<group>"; };
9746AF1314F4DDE6003E7A70 /* Geolocation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Geolocation.cpp; path = Modules/geolocation/Geolocation.cpp; sourceTree = "<group>"; }; 9746AF1314F4DDE6003E7A70 /* Geolocation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Geolocation.cpp; path = Modules/geolocation/Geolocation.cpp; sourceTree = "<group>"; };
...@@ -14638,7 +14639,6 @@ ...@@ -14638,7 +14639,6 @@
FE6F6AAE169E057500FC30A2 /* DatabaseBackendContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DatabaseBackendContext.h; path = Modules/webdatabase/DatabaseBackendContext.h; sourceTree = "<group>"; }; FE6F6AAE169E057500FC30A2 /* DatabaseBackendContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DatabaseBackendContext.h; path = Modules/webdatabase/DatabaseBackendContext.h; sourceTree = "<group>"; };
FE6FD48B0F676E9300092873 /* JSCoordinates.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCoordinates.cpp; sourceTree = "<group>"; }; FE6FD48B0F676E9300092873 /* JSCoordinates.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCoordinates.cpp; sourceTree = "<group>"; };
FE6FD48C0F676E9300092873 /* JSCoordinates.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSCoordinates.h; sourceTree = "<group>"; }; FE6FD48C0F676E9300092873 /* JSCoordinates.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSCoordinates.h; sourceTree = "<group>"; };
FE700DD00F92D81A008E2BFE /* JSCoordinatesCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCoordinatesCustom.cpp; sourceTree = "<group>"; };
FE80D7A60E9C1ED2000D6F75 /* JSGeolocationCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSGeolocationCustom.cpp; sourceTree = "<group>"; }; FE80D7A60E9C1ED2000D6F75 /* JSGeolocationCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSGeolocationCustom.cpp; sourceTree = "<group>"; };
FE80DA5F0E9C4703000D6F75 /* JSGeolocation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSGeolocation.cpp; sourceTree = "<group>"; }; FE80DA5F0E9C4703000D6F75 /* JSGeolocation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSGeolocation.cpp; sourceTree = "<group>"; };
FE80DA600E9C4703000D6F75 /* JSGeolocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSGeolocation.h; sourceTree = "<group>"; }; FE80DA600E9C4703000D6F75 /* JSGeolocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSGeolocation.h; sourceTree = "<group>"; };
...@@ -18508,6 +18508,7 @@ ...@@ -18508,6 +18508,7 @@
971145FF14EF007900674FD9 /* geolocation */ = { 971145FF14EF007900674FD9 /* geolocation */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
9746AF1114F4DDE6003E7A72 /* Coordinates.cpp */,
9746AF1114F4DDE6003E7A70 /* Coordinates.h */, 9746AF1114F4DDE6003E7A70 /* Coordinates.h */,
9746AF1214F4DDE6003E7A70 /* Coordinates.idl */, 9746AF1214F4DDE6003E7A70 /* Coordinates.idl */,
9746AF1314F4DDE6003E7A70 /* Geolocation.cpp */, 9746AF1314F4DDE6003E7A70 /* Geolocation.cpp */,
...@@ -21228,7 +21229,6 @@ ...@@ -21228,7 +21229,6 @@
93BA59B10F2AA5FE008E8E99 /* JSCDATASectionCustom.cpp */, 93BA59B10F2AA5FE008E8E99 /* JSCDATASectionCustom.cpp */,
BCA83E510D7CE205003421A8 /* JSClipboardCustom.cpp */, BCA83E510D7CE205003421A8 /* JSClipboardCustom.cpp */,
C0DFC86F0DB6841A003EAE7C /* JSConsoleCustom.cpp */, C0DFC86F0DB6841A003EAE7C /* JSConsoleCustom.cpp */,
FE700DD00F92D81A008E2BFE /* JSCoordinatesCustom.cpp */,
209B456A16796A7E00E54E4E /* JSCryptoCustom.cpp */, 209B456A16796A7E00E54E4E /* JSCryptoCustom.cpp */,
E1AD14901297337400ACA989 /* JSCSSFontFaceRuleCustom.cpp */, E1AD14901297337400ACA989 /* JSCSSFontFaceRuleCustom.cpp */,
E1AD147B1297307E00ACA989 /* JSCSSImportRuleCustom.cpp */, E1AD147B1297307E00ACA989 /* JSCSSImportRuleCustom.cpp */,
...@@ -27310,6 +27310,7 @@ ...@@ -27310,6 +27310,7 @@
E1424C90164B460B00F32D40 /* CookieJarMac.mm in Sources */, E1424C90164B460B00F32D40 /* CookieJarMac.mm in Sources */,
7EE6846312D26E3800E79415 /* CookieStorageCFNet.cpp in Sources */, 7EE6846312D26E3800E79415 /* CookieStorageCFNet.cpp in Sources */,
E13F01F11270E19000DFBA71 /* CookieStorageMac.mm in Sources */, E13F01F11270E19000DFBA71 /* CookieStorageMac.mm in Sources */,
9746AF2114F4DDE6003E7A72 /* Coordinates.cpp in Sources */,
BC5EB9500E82056B00B25965 /* CounterDirectives.cpp in Sources */, BC5EB9500E82056B00B25965 /* CounterDirectives.cpp in Sources */,
9392F1500AD1862300691BD4 /* CounterNode.cpp in Sources */, 9392F1500AD1862300691BD4 /* CounterNode.cpp in Sources */,
D0B0556909C6700100307E43 /* CreateLinkCommand.cpp in Sources */, D0B0556909C6700100307E43 /* CreateLinkCommand.cpp in Sources */,
...@@ -28307,7 +28308,6 @@ ...@@ -28307,7 +28308,6 @@
C0DFC8700DB6841A003EAE7C /* JSConsoleCustom.cpp in Sources */, C0DFC8700DB6841A003EAE7C /* JSConsoleCustom.cpp in Sources */,
FDA15EBD12B03F0B003A583A /* JSConvolverNode.cpp in Sources */, FDA15EBD12B03F0B003A583A /* JSConvolverNode.cpp in Sources */,
FE6FD48D0F676E9300092873 /* JSCoordinates.cpp in Sources */, FE6FD48D0F676E9300092873 /* JSCoordinates.cpp in Sources */,
FE700DD10F92D81A008E2BFE /* JSCoordinatesCustom.cpp in Sources */,
930705D809E0C9B700B17FE4 /* JSCounter.cpp in Sources */, 930705D809E0C9B700B17FE4 /* JSCounter.cpp in Sources */,
975CA2A11303679D00E99AD9 /* JSCrypto.cpp in Sources */, 975CA2A11303679D00E99AD9 /* JSCrypto.cpp in Sources */,
209B456B16796A7E00E54E4E /* JSCryptoCustom.cpp in Sources */, 209B456B16796A7E00E54E4E /* JSCryptoCustom.cpp in Sources */,
...@@ -50,7 +50,6 @@ ...@@ -50,7 +50,6 @@
#include "JSCanvasRenderingContextCustom.cpp" #include "JSCanvasRenderingContextCustom.cpp"
#include "JSClipboardCustom.cpp" #include "JSClipboardCustom.cpp"
#include "JSConsoleCustom.cpp" #include "JSConsoleCustom.cpp"
#include "JSCoordinatesCustom.cpp"
#include "JSCryptoCustom.cpp" #include "JSCryptoCustom.cpp"
#include "JSCustomSQLStatementErrorCallback.cpp" #include "JSCustomSQLStatementErrorCallback.cpp"
#include "JSCustomXPathNSResolver.cpp" #include "JSCustomXPathNSResolver.cpp"
......
/*
* 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<v8::Value> V8Coordinates::altitudeAttrGetterCustom(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
v8::Handle<v8::Object> holder = info.Holder();
Coordinates* imp = V8Coordinates::toNative(holder);
if (!imp->canProvideAltitude())
return v8Null(info.GetIsolate());
return v8::Number::New(imp->altitude());
}
v8::Handle<v8::Value> V8Coordinates::altitudeAccuracyAttrGetterCustom(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
v8::Handle<v8::Object> holder = info.Holder();
Coordinates* imp = V8Coordinates::toNative(holder);
if (!imp->canProvideAltitudeAccuracy())
return v8Null(info.GetIsolate());
return v8::Number::New(imp->altitudeAccuracy());
}
v8::Handle<v8::Value> V8Coordinates::headingAttrGetterCustom(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
v8::Handle<v8::Object> holder = info.Holder();
Coordinates* imp = V8Coordinates::toNative(holder);
if (!imp->canProvideHeading())
return v8Null(info.GetIsolate());
return v8::Number::New(imp->heading());
}
v8::Handle<v8::Value> V8Coordinates::speedAttrGetterCustom(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
v8::Handle<v8::Object> holder = info.Holder();
Coordinates* imp = V8Coordinates::toNative(holder);
if (!imp->canProvideSpeed())
return v8Null(info.GetIsolate());
return v8::Number::New(imp->speed());
}
} // namespace WebCore
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment