[Geolocation] Expose Coordinates.floorLevel
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 11 Oct 2017 22:21:58 +0000 (22:21 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 11 Oct 2017 22:21:58 +0000 (22:21 +0000)
commit6b310ce4645c5771a00b8ca2409bbbfd486833a6
treee381cc180d121c5582a627524b68d59447239304
parent5f972d62bea547d679321b2112a38aa10dddd942
[Geolocation] Expose Coordinates.floorLevel
https://bugs.webkit.org/show_bug.cgi?id=178173
<rdar://problem/34918936>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Expose Coordinates.floorLevel via the Geolocation API. This is currently
a WebKit-specific extension and it is only populated on iOS / WKTR / DRT.
It is null on other platforms.

Test: fast/dom/Geolocation/floorLevel.html

* Modules/geolocation/Coordinates.h:
(WebCore::Coordinates::floorLevel const):
* Modules/geolocation/Coordinates.idl:
* Modules/geolocation/GeolocationPosition.h:
(WebCore::GeolocationPosition::encode const):
(WebCore::GeolocationPosition::decode):
* Modules/geolocation/ios/GeolocationPositionIOS.mm:
(WebCore::GeolocationPosition::GeolocationPosition):
* page/Settings.in:

Source/WebKit:

* UIProcess/API/C/WKGeolocationPosition.cpp:
(WKGeolocationPositionCreate):
(WKGeolocationPositionCreate_b):
(WKGeolocationPositionCreate_c):
* UIProcess/API/C/WKGeolocationPosition.h:

Tools:

Add test infrastructure for testing Coordinates.floorLevel.

* DumpRenderTree/TestRunner.cpp:
(setMockGeolocationPositionCallback):
* DumpRenderTree/TestRunner.h:
* DumpRenderTree/mac/TestRunnerMac.mm:
(TestRunner::setMockGeolocationPosition):
* DumpRenderTree/win/TestRunnerWin.cpp:
(TestRunner::setMockGeolocationPosition):
* WebKitTestRunner/GeolocationProviderMock.cpp:
(WTR::GeolocationProviderMock::setPosition):
* WebKitTestRunner/GeolocationProviderMock.h:
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::setMockGeolocationPosition):
* WebKitTestRunner/InjectedBundle/InjectedBundle.h:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setMockGeolocationPosition):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::setMockGeolocationPosition):
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveMessageFromInjectedBundle):

LayoutTests:

Add layout test coverage.

* fast/dom/Geolocation/floorLevel-expected.txt: Added.
* fast/dom/Geolocation/floorLevel.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223211 268f45cc-cd09-0410-ab3c-d52691b4dbfc
27 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/dom/Geolocation/floorLevel-expected.txt [new file with mode: 0644]
LayoutTests/fast/dom/Geolocation/floorLevel.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/Modules/geolocation/Coordinates.h
Source/WebCore/Modules/geolocation/Coordinates.idl
Source/WebCore/Modules/geolocation/GeolocationPosition.h
Source/WebCore/Modules/geolocation/ios/GeolocationPositionIOS.mm
Source/WebCore/page/Settings.in
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/API/C/WKGeolocationPosition.cpp
Source/WebKit/UIProcess/API/C/WKGeolocationPosition.h
Tools/ChangeLog
Tools/DumpRenderTree/TestRunner.cpp
Tools/DumpRenderTree/TestRunner.h
Tools/DumpRenderTree/mac/TestRunnerMac.mm
Tools/DumpRenderTree/win/TestRunnerWin.cpp
Tools/WebKitTestRunner/GeolocationProviderMock.cpp
Tools/WebKitTestRunner/GeolocationProviderMock.h
Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl
Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp
Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.h
Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp
Tools/WebKitTestRunner/InjectedBundle/TestRunner.h
Tools/WebKitTestRunner/TestController.cpp
Tools/WebKitTestRunner/TestController.h
Tools/WebKitTestRunner/TestInvocation.cpp