Add new Pointer Lock spec attribute webkitPointerLockElement.
authorscheib@chromium.org <scheib@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 12 Jun 2012 03:02:16 +0000 (03:02 +0000)
committerscheib@chromium.org <scheib@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 12 Jun 2012 03:02:16 +0000 (03:02 +0000)
commitc5fa9e80b2f719ff9a850f0c06352bf2dcd2359c
treee21499c049fdac6957fe2ebe6e110ce36e0134fb
parent62da0c30cb4be876d838726a05c55623da2cc2ef
Add new Pointer Lock spec attribute webkitPointerLockElement.
https://bugs.webkit.org/show_bug.cgi?id=88799

Source/WebCore:

Reviewed by Dimitri Glazkov.

Part of a series of refactoring changes to update pointer lock API to
the fullscreen locking style. https://bugs.webkit.org/show_bug.cgi?id=84402

New attribute webkitPointerLockElement added. Follow up patches
will remove the previous isLocked attribute. Tests updated to use
the new attribute.

* bindings/generic/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::webkitPointerLockElementEnabled):
* dom/Document.cpp:
(WebCore):
(WebCore::Document::webkitPointerLockElement):
* dom/Document.h:
(Document):
* dom/Document.idl:
* page/PointerLockController.h:
(WebCore::PointerLockController::element):

Tools:

Reviewed by Dimitri Glazkov.

Part of a series of refactoring changes to update pointer lock API to
the fullscreen locking style. https://bugs.webkit.org/show_bug.cgi?id=84402

New attribute webkitPointerLockElement added. Follow up patches
will remove the previous isLocked attribute. Tests updated to use
the new attribute.

WebViewHost logic required modification to correctly repond to
a lock, unlock, pointerLockElement call series. Specifically,
unlocking must be queued after a lock command is issued always
as the lock state may not be set yet with a lock request in flight.

* DumpRenderTree/chromium/WebViewHost.cpp:
(WebViewHost::requestPointerUnlock): Always post didLosePointerLock task.
(WebViewHost::didLosePointerLock): Signal didLosePointerLock only if pointer was locked.

LayoutTests:

Part of a series of refactoring changes to update pointer lock API to
the fullscreen locking style. https://bugs.webkit.org/show_bug.cgi?id=84402

New attribute webkitPointerLockElement added. Follow up patches
will remove the previous isLocked attribute. Tests updated to use
the new attribute.

Reviewed by Dimitri Glazkov.

* pointer-lock/lock-already-locked-expected.txt:
* pointer-lock/lock-already-locked.html:
* pointer-lock/pointer-lock-api-expected.txt:
* pointer-lock/pointer-lock-api.html:
* pointer-lock/pointerlocklost-event-expected.txt:
* pointer-lock/pointerlocklost-event.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@120031 268f45cc-cd09-0410-ab3c-d52691b4dbfc
15 files changed:
LayoutTests/ChangeLog
LayoutTests/pointer-lock/lock-already-locked-expected.txt
LayoutTests/pointer-lock/lock-already-locked.html
LayoutTests/pointer-lock/pointer-lock-api-expected.txt
LayoutTests/pointer-lock/pointer-lock-api.html
LayoutTests/pointer-lock/pointerlocklost-event-expected.txt
LayoutTests/pointer-lock/pointerlocklost-event.html
Source/WebCore/ChangeLog
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/Document.h
Source/WebCore/dom/Document.idl
Source/WebCore/page/PointerLockController.cpp
Source/WebCore/page/PointerLockController.h
Tools/ChangeLog
Tools/DumpRenderTree/chromium/WebViewHost.cpp