Skip to content
  • kihong.kwon@samsung.com's avatar
    Vibration can be canceled even if page visibility status is hidden · c08815ea
    kihong.kwon@samsung.com authored
    https://bugs.webkit.org/show_bug.cgi?id=117333
    
    Reviewed by Gyuyoung Kim.
    
    Source/WebCore:
    
    vibration can be canceled in the onvisibilitychange listener even if page visibility is changed to hidden status.
    Therefore cancelVibration needs to work when page visibility is hidden.
    
    Tests: vibration/cancelVibration-after-pagevisibility-changed-to-hidden.html
    
    * Modules/vibration/NavigatorVibration.cpp:
    (WebCore::NavigatorVibration::vibrate):
    * Modules/vibration/Vibration.h:
    (WebCore::Vibration::isVibrating):
    * testing/Internals.cpp:
    (WebCore::Internals::isVibrating):
    * testing/Internals.h:
    * testing/Internals.idl:
    
    LayoutTests:
    
    Add a test case for cancel vibration after page visibility is changed to hidden status.
    In addition, move navigator-vibration.html to vibration directory.
    
    * platform/gtk/TestExpectations:
    * platform/mac/TestExpectations:
    * platform/qt/TestExpectations:
    * platform/win/TestExpectations:
    * vibration/cancelVibration-after-pagevisibility-changed-to-hidden-expected.txt: Added.
    * vibration/cancelVibration-after-pagevisibility-changed-to-hidden.html: Added.
    * vibration/navigator-vibration-expected.txt: Renamed from LayoutTests/fast/dom/navigator-vibration-expected.txt.
    * vibration/navigator-vibration.html: Renamed from LayoutTests/fast/dom/navigator-vibration.html.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@151727 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    c08815ea