Skip to content
  • scheib@chromium.org's avatar
    Remove duplicate webkitpointerlockchange events when unlocking. · 94681642
    scheib@chromium.org authored
    https://bugs.webkit.org/show_bug.cgi?id=88917
    
    Reviewed by Dimitri Glazkov.
    
    Source/WebCore:
    
    Subsequent patches adding the new API for entering and exiting
    pointer lock would be burdened by handling multiple change events
    when the lock target is changed. This change introduces
    temporary code to suppress duplicate change events.
    
    Existing tests simplified by removing the duplicate change events.
    
    * page/PointerLockController.cpp:
    (WebCore::PointerLockController::requestPointerLock):
    (WebCore::PointerLockController::didLosePointerLock):
    * page/PointerLockController.h:
    (PointerLockController):
    
    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
    
    Tests simplified by removing the duplicate change events.
    
    * pointer-lock/lock-already-locked-expected.txt:
    * pointer-lock/pointerlockchange-pointerlockerror-events-expected.txt:
    * pointer-lock/pointerlockchange-pointerlockerror-events.html:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@120248 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    94681642