1. 23 Jul, 2012 1 commit
    • scheib@chromium.org's avatar
      webkitFullscreenElement, webkitCurrentFullScreenElement,... · e31007f1
      scheib@chromium.org authored
      webkitFullscreenElement, webkitCurrentFullScreenElement, webkitPointerLockElement block cross origin access.
      https://bugs.webkit.org/show_bug.cgi?id=91892
      
      Reviewed by Adam Barth.
      
      Source/WebCore:
      
      PointerLockElement only returned when requested from the document that owns it.
      
      Tests: http/tests/fullscreen/fullscreenelement-different-origin.html
             http/tests/fullscreen/fullscreenelement-same-origin.html
             http/tests/pointer-lock/pointerlockelement-different-origin.html
             http/tests/pointer-lock/pointerlockelement-same-origin.html
      
      * dom/Document.cpp:
      (WebCore::Document::webkitPointerLockElement):
      
      LayoutTests:
      
      Tests verifying the behavior of accessing
      webkitFullscreenElement, webkitCurrentFullScreenElement, webkitPointerLockElement
      from different origins.
      
      * http/tests/fullscreen/fullscreenelement-different-origin-expected.txt: Added.
      * http/tests/fullscreen/fullscreenelement-different-origin.html: Added.
      * http/tests/fullscreen/fullscreenelement-same-origin-expected.txt: Added.
      * http/tests/fullscreen/fullscreenelement-same-origin.html: Added.
      * http/tests/pointer-lock/pointerlockelement-different-origin-expected.txt: Added.
      * http/tests/pointer-lock/pointerlockelement-different-origin.html: Added.
      * http/tests/pointer-lock/pointerlockelement-same-origin-expected.txt: Added.
      * http/tests/pointer-lock/pointerlockelement-same-origin.html: Added.
      * http/tests/resources/pointer-lock/iframe-common.js: Added.
      (thisFileName):
      (window.onmessage):
      * http/tests/resources/pointer-lock/inner-iframe.html: Added.
      * http/tests/resources/pointer-lock/pointer-lock-test-harness.js:
      (runOnKeyPress.keypressHandler):
      * pointer-lock/locked-element-iframe-removed-from-dom-expected.txt:
      * pointer-lock/locked-element-iframe-removed-from-dom.html:
      * pointer-lock/locked-element-removed-from-dom-expected.txt:
      * pointer-lock/locked-element-removed-from-dom.html:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123343 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e31007f1
  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. 16 Jul, 2012 1 commit
  4. 13 Jul, 2012 1 commit
    • scheib@chromium.org's avatar
      Pointer Lock handles disconnected DOM elements · fd0b8a9b
      scheib@chromium.org authored
      https://bugs.webkit.org/show_bug.cgi?id=77029
      
      Reviewed by Adrienne Walker.
      
      Source/WebCore:
      
      Pointer Lock Controller now checks when elements or documents are
      removed, and unlocks if the target element is being removed.
      
      Tests: pointer-lock/locked-element-iframe-removed-from-dom.html
             pointer-lock/locked-element-removed-from-dom.html
      
      * dom/Document.cpp:
      (WebCore::Document::detach):
      * dom/Element.cpp:
      (WebCore::Element::removedFrom):
      (WebCore::Element::webkitRequestPointerLock):
      * page/PointerLockController.cpp:
      (WebCore::PointerLockController::requestPointerLock):
      (WebCore::PointerLockController::elementRemoved):
      (WebCore):
      (WebCore::PointerLockController::documentDetached):
      (WebCore::PointerLockController::didLosePointerLock):
      (WebCore::PointerLockController::enqueueEvent):
      * page/PointerLockController.h:
      (WebCore):
      (PointerLockController):
      
      LayoutTests:
      
      Two new tests that verify pointer lock is released when the target
      is removed from the document.
      
      * pointer-lock/locked-element-iframe-removed-from-dom-expected.txt: Added.
      * pointer-lock/locked-element-iframe-removed-from-dom.html: Added.
      * pointer-lock/locked-element-removed-from-dom-expected.txt: Added.
      * pointer-lock/locked-element-removed-from-dom.html: Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122626 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fd0b8a9b