Exit pointer lock when page goes into page cache.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 8 Dec 2016 06:19:57 +0000 (06:19 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 8 Dec 2016 06:19:57 +0000 (06:19 +0000)
commitc4edaa9ebe3f86d15a73297a53737b22d02da70a
tree5d067d3d86f3d9dd717b33f2d9d6f5fffb4236e7
parent9a57a2d20d6b3a49657089edcac89b6bbdce575d
Exit pointer lock when page goes into page cache.
https://bugs.webkit.org/show_bug.cgi?id=165425
rdar://problem/29430834

Patch by Jeremy Jones <jeremyj@apple.com> on 2016-12-07
Reviewed by Jer Noble.

Source/WebCore:

Test: pointer-lock/lock-lost-on-navigation.html

Cancel pointer lock when page goes into page cache and add methods to Internals
so it can be tested.

* dom/Document.cpp:
(WebCore::Document::setPageCacheState):
* page/PointerLockController.h:
* testing/Internals.cpp:
(WebCore::Internals::pageHasPendingPointerLock):
(WebCore::Internals::pageHasPointerLock):
* testing/Internals.h:
* testing/Internals.idl:

LayoutTests:

* platform/mac/TestExpectations:
* pointer-lock/lock-lost-on-navigation-expected.txt: Added.
* pointer-lock/lock-lost-on-navigation.html: Added.
* pointer-lock/resources/lock-lost-on-navigation2.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209525 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/platform/mac/TestExpectations
LayoutTests/pointer-lock/lock-lost-on-navigation-expected.txt [new file with mode: 0644]
LayoutTests/pointer-lock/lock-lost-on-navigation.html [new file with mode: 0644]
LayoutTests/pointer-lock/resources/lock-lost-on-navigation2.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/dom/Document.cpp
Source/WebCore/page/PointerLockController.h
Source/WebCore/testing/Internals.cpp
Source/WebCore/testing/Internals.h
Source/WebCore/testing/Internals.idl