Geolocation objects shouldn't prevent page caching.
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 12 Jan 2015 23:14:24 +0000 (23:14 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 12 Jan 2015 23:14:24 +0000 (23:14 +0000)
commit9143abb7839fb9e1f3f5c9bc5bef4c2a2d59ca26
tree6953ee58221684b2e8d0e4d9df3fa96eb32636a1
parent9607ec58fc3cfb75624562871572f419f4b3f18a
Geolocation objects shouldn't prevent page caching.
<https://webkit.org/b/140369>

Reviewed by Joseph Pecoraro.

Source/WebCore:

Enable the code for suspend/resume of Geolocation objects on all platforms
instead of just iOS. This allows pages using geolocation to use page cache
instead of reloading on back/forward navigation.

Test: fast/history/page-cache-geolocation.html

* Modules/geolocation/Geolocation.cpp:
(WebCore::Geolocation::Geolocation):
(WebCore::Geolocation::resetAllGeolocationPermission):
(WebCore::Geolocation::stop):
(WebCore::Geolocation::setIsAllowed):
(WebCore::Geolocation::positionChanged):
(WebCore::Geolocation::setError):
* Modules/geolocation/Geolocation.h:

LayoutTests:

Take the existing test for this and make it not-specific-to-iOS.
Also remove a test whose only purpose was confirming that we don't cache these pages.

* fast/dom/Geolocation/no-page-cache-expected.txt: Removed.
* fast/dom/Geolocation/no-page-cache.html: Removed.
* fast/dom/Geolocation/script-tests/no-page-cache.js: Removed.
* fast/history/page-cache-geolocation-expected.txt: Renamed from LayoutTests/platform/ios-simulator/ios/fast/history/page-cache-geolocation-expected.txt.
* fast/history/page-cache-geolocation.html: Renamed from LayoutTests/platform/ios-simulator/ios/fast/history/script-tests/page-cache-geolocation.js.
* fast/history/resources/page-cache-helper.html: Added.
* platform/ios-sim-deprecated/iphone/fast/history/page-cache-geolocation-expected.txt: Removed.
* platform/ios-sim-deprecated/iphone/fast/history/page-cache-geolocation.html: Removed.
* platform/ios-sim-deprecated/iphone/fast/history/script-tests/page-cache-geolocation.js: Removed.
* platform/ios-simulator/TestExpectations:
* platform/ios-simulator/ios/fast/history/page-cache-geolocation.html: Removed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178300 268f45cc-cd09-0410-ab3c-d52691b4dbfc
15 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/dom/Geolocation/no-page-cache-expected.txt [deleted file]
LayoutTests/fast/dom/Geolocation/no-page-cache.html [deleted file]
LayoutTests/fast/dom/Geolocation/script-tests/no-page-cache.js [deleted file]
LayoutTests/fast/history/page-cache-geolocation-expected.txt [moved from LayoutTests/platform/ios-simulator/ios/fast/history/page-cache-geolocation-expected.txt with 100% similarity]
LayoutTests/fast/history/page-cache-geolocation.html [moved from LayoutTests/platform/ios-simulator/ios/fast/history/script-tests/page-cache-geolocation.js with 85% similarity]
LayoutTests/fast/history/resources/page-cache-helper.html [new file with mode: 0644]
LayoutTests/platform/ios-sim-deprecated/iphone/fast/history/page-cache-geolocation-expected.txt [deleted file]
LayoutTests/platform/ios-sim-deprecated/iphone/fast/history/page-cache-geolocation.html [deleted file]
LayoutTests/platform/ios-sim-deprecated/iphone/fast/history/script-tests/page-cache-geolocation.js [deleted file]
LayoutTests/platform/ios-simulator/TestExpectations
LayoutTests/platform/ios-simulator/ios/fast/history/page-cache-geolocation.html [deleted file]
Source/WebCore/ChangeLog
Source/WebCore/Modules/geolocation/Geolocation.cpp
Source/WebCore/Modules/geolocation/Geolocation.h