1. 02 Aug, 2012 1 commit
    • scheib@chromium.org's avatar
      Remove old Pointer Lock API. · 03edde3b
      scheib@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=88892
      
      Reviewed by Adam Barth.
      
      Source/WebCore:
      
      Removing the old Pointer Lock API as one of the final cleanup
      changes for the Update to Fullscreen style locking Spec meta
      bug https://bugs.webkit.org/show_bug.cgi?id=84402.
      
      This change primarily removes idl, access in navigator,
      one event, and supporting infrastructure in page/PointerLock.
      
      In PointerLockController changes were already noted clearly with
      TODOs differentiating old and new api sections.
      
      Test: pointer-lock/pointerlockchange-event-on-lock-lost.html
      
      * WebCore.gypi:
      * dom/Element.cpp:
      (WebCore::Element::webkitRequestPointerLock):
      * dom/EventNames.h:
      (WebCore):
      * page/Navigator.cpp:
      * page/Navigator.h:
      (WebCore):
      (Navigator):
      * page/Navigator.idl:
      * page/PointerLock.cpp: Removed.
      * page/PointerLock.h: Removed.
      * page/PointerLock.idl: Removed.
      * page/PointerLockController.cpp:
      (WebCore::PointerLockController::requestPointerLock):
      (WebCore::PointerLockController::didAcquirePointerLock):
      (WebCore::PointerLockController::didNotAcquirePointerLock):
      (WebCore::PointerLockController::didLosePointerLock):
      * page/PointerLockController.h:
      (PointerLockController):
      
      Source/WebKit/chromium:
      
      * src/WebViewImpl.cpp:
          Removed #include to old API header.
      
      LayoutTests:
      
      Tests for old API removed, and most remaining tests required only small
      changes.
      
      * platform/chromium/fast/dom/navigator-detached-no-crash-expected.txt:
      * pointer-lock/lock-already-locked-expected.txt:
      * pointer-lock/lock-already-locked.html:
      * pointer-lock/lock-fail-responses-expected.txt: Removed.
      * pointer-lock/lock-fail-responses.html: Removed.
          This test only covered the old API. The related concept is tested
          for the new api in pointerlockchange-pointerlockerror-events.html.
      * pointer-lock/pointer-lock-api-expected.txt:
      * pointer-lock/pointer-lock-api.html:
      * pointer-lock/pointerlockchange-event-on-lock-lost-expected.txt: Added.
      * pointer-lock/pointerlockchange-event-on-lock-lost.html: Added.
      * pointer-lock/pointerlocklost-event-expected.txt: Removed.
      * pointer-lock/pointerlocklost-event.html: Removed.
          pointerlocklost-event.html renamed to pointerlockchange-event-on-lock-lost.html.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124535 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      03edde3b
  2. 20 Jul, 2012 1 commit
    • scheib@chromium.org's avatar
      Move pointer lock test resources to http/tests/resources in preparation for... · aed8d1bd
      scheib@chromium.org authored
      Move pointer lock test resources to http/tests/resources in preparation for adding new tests to http.
      https://bugs.webkit.org/show_bug.cgi?id=91882
      
      Reviewed by Adrienne Walker.
      
      * http/tests/resources/pointer-lock/pointer-lock-test-harness.js: Renamed from LayoutTests/pointer-lock/resources/pointer-lock-test-harness.js.
      * pointer-lock/bug90391-move-then-window-open-crash.html:
      * pointer-lock/lock-already-locked.html:
      * pointer-lock/lock-element-not-in-dom.html:
      * pointer-lock/lock-fail-responses.html:
      * pointer-lock/locked-element-iframe-removed-from-dom.html:
      * pointer-lock/locked-element-removed-from-dom.html:
      * pointer-lock/mouse-event-api.html:
      * pointer-lock/mouse-event-delivery.html:
      * pointer-lock/pointer-lock-api.html:
      * pointer-lock/pointerlockchange-pointerlockerror-events.html:
      * pointer-lock/pointerlocklost-event.html:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123247 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      aed8d1bd
  3. 09 Jul, 2012 1 commit
    • scheib@chromium.org's avatar
      Refactor common Pointer Lock test code to a harness. · 3684f627
      scheib@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=90813
      
      Reviewed by Adrienne Walker.
      
      * pointer-lock/bug90391-move-then-window-open-crash-expected.txt:
      * pointer-lock/bug90391-move-then-window-open-crash.html:
      * pointer-lock/lock-already-locked-expected.txt:
      * pointer-lock/lock-already-locked.html:
      * pointer-lock/lock-fail-responses-expected.txt:
      * pointer-lock/lock-fail-responses.html:
      * pointer-lock/mouse-event-delivery-expected.txt:
      * pointer-lock/mouse-event-delivery.html:
      * pointer-lock/pointer-lock-api-expected.txt:
      * pointer-lock/pointer-lock-api.html:
      * pointer-lock/pointerlockchange-pointerlockerror-events-expected.txt:
      * pointer-lock/pointerlockchange-pointerlockerror-events.html:
      * pointer-lock/pointerlocklost-event-expected.txt:
      * pointer-lock/pointerlocklost-event.html:
      * pointer-lock/resources/pointer-lock-test-harness.js: Added.
      (doNextStep.else):
      (doNextStepWithUserGesture):
      (eventExpected.targetHanderNode.eventHandlerName):
      (eventExpected):
      (expectOnlyChangeEvent):
      (expectOnlyErrorEvent):
      (expectNoEvents):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122158 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3684f627
  4. 15 Jun, 2012 1 commit
    • scheib@chromium.org's avatar
      Add new Pointer Lock spec webkitRequestPointerLock and webkitExitPointerLock methods. · ebbfecc5
      scheib@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=88891
      
      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
      
      Entering and exiting mouse lock is provided in the new webkitRequestPointerLock and
      webkitExitPointerLock methods.
      
      Source/WebCore:
      
      Existing pointer-lock tests updated to use the new methods.
      
      * dom/Document.cpp:
      (WebCore::Document::webkitExitPointerLock):
      (WebCore):
      * dom/Document.h:
      (Document):
      * dom/Document.idl:
      * dom/Element.cpp:
      (WebCore):
      (WebCore::Element::webkitRequestPointerLock):
      * dom/Element.h:
      * dom/Element.idl:
      
      LayoutTests:
      
      Existing tests updated to use the new methods. Also, several updated to
      support manual testing.
      
      * pointer-lock/lock-already-locked-expected.txt:
      * pointer-lock/lock-already-locked.html:
      * pointer-lock/mouse-event-delivery-expected.txt:
      * pointer-lock/mouse-event-delivery.html:
      * pointer-lock/pointer-lock-api-expected.txt:
      * pointer-lock/pointer-lock-api.html:
      * pointer-lock/pointerlockchange-pointerlockerror-events-expected.txt:
      * pointer-lock/pointerlockchange-pointerlockerror-events.html:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@120486 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ebbfecc5
  5. 11 Jun, 2012 1 commit
    • scheib@chromium.org's avatar
      Add new Pointer Lock spec attribute webkitPointerLockElement. · 6ed01762
      scheib@chromium.org authored
      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: http://svn.webkit.org/repository/webkit/trunk@120031 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6ed01762
  6. 07 Jun, 2012 1 commit
    • scheib@chromium.org's avatar
      Add new Pointer Lock spec events webkitpointerlockchange and webkitpointerlockerror · 13c96db0
      scheib@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=88377
      
      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 change and error events added. Follow up patches will remove
      the previous callbacks and pointerlocklost event. Tests updated
      to include the new events, and a new test added specifically for
      the new events, pointerlockchange-pointerlockerror-events.html.
      
      Source/WebCore:
      
      Test: pointer-lock/pointerlockchange-pointerlockerror-events.html
      
      * dom/Document.h:
      (Document):
      * dom/Document.idl:
      * dom/EventNames.h:
      (WebCore):
      * page/PointerLockController.cpp:
      (WebCore::PointerLockController::requestPointerLock):
      (WebCore::PointerLockController::didAcquirePointerLock):
      (WebCore::PointerLockController::didNotAcquirePointerLock):
      (WebCore::PointerLockController::didLosePointerLock):
      (WebCore::PointerLockController::enqueueEvent):
      (WebCore):
      * page/PointerLockController.h:
      (PointerLockController):
      
      LayoutTests:
      
      * 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/pointerlockchange-pointerlockerror-events-expected.txt: Added.
      * pointer-lock/pointerlockchange-pointerlockerror-events.html: Added.
      * pointer-lock/pointerlocklost-event-expected.txt:
      * pointer-lock/pointerlocklost-event.html:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119763 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      13c96db0
  7. 27 Jan, 2012 1 commit
    • scheib@chromium.org's avatar
      Pointer Lock: Implement pointer interface · 32c154ad
      scheib@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=75762
      
      Source/WebCore:
      
      Reviewed by Julien Chaffraix.
      
      Implement the navigator.pointer interface via a new
      PointerLockController class, as per
      http://dvcs.w3.org/hg/webevents/raw-file/default/mouse-lock.html.
      
      The implementation is being made in steps, the feature is still behind
      compile-time and run-time flags, 'webkit' prefixed, and not yet enabled
      in any browser. (Chromium has a developer flag required.) Follow-up
      work will include handling DOM elements being removed, making all
      callbacks asynchronous, iframe permissions (similar to Full Screen),
      etc.
      
      PointerLockController maintains state of which Element is the current
      lock target and the success and failure callbacks. ChromeClient has
      methods added to expose the required state change requests.
      
      Tests: pointer-lock/lock-already-locked.html
             pointer-lock/lock-fail-responses.html
             pointer-lock/mouse-event-delivery.html
             pointer-lock/pointerlocklost-event.html
      
      * WebCore.gypi:
      * dom/EventNames.h:
      * page/ChromeClient.h:
      (WebCore::ChromeClient::requestPointerLock):
      (WebCore::ChromeClient::requestPointerUnlock):
      (WebCore::ChromeClient::isPointerLocked):
      * page/Navigator.cpp:
      (WebCore::Navigator::webkitPointer):
      * page/Page.cpp:
      (WebCore::Page::Page):
      * page/Page.h:
      (WebCore::Page::pointerLockController):
      * page/PointerLock.cpp:
      (WebCore::PointerLock::PointerLock):
      (WebCore::PointerLock::create):
      (WebCore::PointerLock::lock):
      (WebCore::PointerLock::unlock):
      (WebCore::PointerLock::isLocked):
      * page/PointerLock.h:
      (WebCore::PointerLock::create):
      * page/PointerLockController.cpp: Added.
      (WebCore::PointerLockController::PointerLockController):
      (WebCore::PointerLockController::requestPointerLock):
      (WebCore::PointerLockController::requestPointerUnlock):
      (WebCore::PointerLockController::isLocked):
      (WebCore::PointerLockController::didAcquirePointerLock):
      (WebCore::PointerLockController::didNotAcquirePointerLock):
      (WebCore::PointerLockController::didLosePointerLock):
      (WebCore::PointerLockController::dispatchLockedMouseEvent):
      * page/PointerLockController.h: Copied from Source/WebCore/page/PointerLock.h.
      
      Source/WebKit/chromium:
      
      Add calls to the PointerLockController added in this patch to WebCore.
      
      * src/WebViewImpl.cpp:
      (WebKit::WebViewImpl::close):
      (WebKit::WebViewImpl::didAcquirePointerLock):
      (WebKit::WebViewImpl::didNotAcquirePointerLock):
      (WebKit::WebViewImpl::didLosePointerLock):
      (WebKit::WebViewImpl::pointerLockMouseEvent):
      
      LayoutTests:
      
      Reviewed by Julien Chaffraix.
      
      * pointer-lock/lock-already-locked-expected.txt: Added.
      * pointer-lock/lock-already-locked.html: Added.
      * pointer-lock/lock-fail-responses-expected.txt: Added.
      * pointer-lock/lock-fail-responses.html: Added.
      * pointer-lock/mouse-event-delivery-expected.txt: Added.
      * pointer-lock/mouse-event-delivery.html: Added.
      * pointer-lock/pointerlocklost-event-expected.txt: Added.
      * pointer-lock/pointerlocklost-event.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106134 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      32c154ad