Skip to content
  • commit-queue@webkit.org's avatar
    .: Add a new API for the Vibration API(W3C). · 9dda50c8
    commit-queue@webkit.org authored
    https://bugs.webkit.org/show_bug.cgi?id=72010
    
    Patch by Kihong Kwon <kihong.kwon@samsung.com> on 2012-02-20
    Reviewed by Hajime Morita.
    
    Add Implementation for the Vibration API to the WebKit-EFL port.
    http://dev.w3.org/2009/dap/vibration/
    
    * Source/cmake/OptionsEfl.cmake: Add ENABLE_VIBRATION feature.
    * Source/cmakeconfig.h.cmake:
    
    Source/WebCore: Add a new API for the Vibration API(W3C).
    https://bugs.webkit.org/show_bug.cgi?id=72010
    
    http://dev.w3.org/2009/dap/vibration/
    This patch implements navigator.webkitvibrate() API.
    This API operates differently depending upon a given parameter:
    1. It cancels vibration when given 0 or [].
    2. It gives a vibration duration in milliseconds when given as a single integer value.
    3. It gives a vibration pattern when given as an integer array. For instance, [1000 300 1000] generates a vibration of 1000ms followed by 300ms of idle time, and then creates another vibration of 1000ms.
    
    Patch by Kihong Kwon <kihong.kwon@samsung.com> on 2012-02-20
    Reviewed by Hajime Morita.
    
    Test: fast/dom/navigator-vibration.html
    
    * CMakeLists.txt:
    * Modules/vibration/NavigatorVibration.cpp: Added.
    (WebCore):
    (WebCore::NavigatorVibration::NavigatorVibration):
    (WebCore::NavigatorVibration::~NavigatorVibration):
    (WebCore::NavigatorVibration::webkitVibrate):
    Add webkitVibrate method to get an array or single integer parameter for vibrating.
    They check vibration is activated in the platform, and then call vibrate() in the Vibration class.
    * Modules/vibration/NavigatorVibration.h: Added.
    (WebCore):
    (NavigatorVibration):
    * Modules/vibration/NavigatorVibration.idl: Added.
    * Modules/vibration/Vibration.cpp: Added.
    This class implements the entire vibration logic.
    (WebCore):
    (WebCore::Vibration::Vibration):
    (WebCore::Vibration::~Vibration):
    (WebCore::Vibration::create):
    (WebCore::Vibration::vibrate):
    (WebCore::Vibration::cancelVibration):
    (WebCore::Vibration::suspendVibration):
    (WebCore::Vibration::resumeVibration):
    (WebCore::Vibration::timerStartFired):
    (WebCore::Vibration::timerStopFired):
    (WebCore::Vibration::supplementName):
    (WebCore::Vibration::isActive):
    (WebCore::provideVibrationTo):
    * Modules/vibration/Vibration.h: Added.
    (WebCore):
    (Vibration):
    (WebCore::Vibration::from):
    * Modules/vibration/VibrationClient.h: Added.
    vibrate() and cancelVibrate() need to be implemented in the VibrationClient.
    (WebCore):
    (VibrationClient):
    (WebCore::VibrationClient::~VibrationClient):
    
    Source/WebKit/efl: Add a new API for the Vibration API(W3C).
    https://bugs.webkit.org/show_bug.cgi?id=72010
    
    Patch by Kihong Kwon <kihong.kwon@samsung.com> on 2012-02-20
    Reviewed by Hajime Morita.
    
    Implementation for the Vibration API feature to the EFL-port layer.
    http://dev.w3.org/2009/dap/vibration/
    There are two methods for vibration API.
    - vibrate : Vibrate device for receiving as a parameter.
    - cancelVibrate : Cancel current vibration.
    
    * CMakeListsEfl.txt:
    * WebCoreSupport/VibrationClientEfl.cpp: Added.
    (WebCore):
    (WebCore::VibrationClientEfl::VibrationClientEfl):
    (WebCore::VibrationClientEfl::vibrate):
    (WebCore::VibrationClientEfl::cancelVibration):
    (WebCore::VibrationClientEfl::vibrationDestroyed):
    * WebCoreSupport/VibrationClientEfl.h: Added.
    (WebCore):
    (VibrationClientEfl):
    (WebCore::VibrationClientEfl::~VibrationClientEfl):
    * ewk/ewk_view.cpp:
    (_Ewk_View_Private_Data):
    (_ewk_view_priv_new):
    
    Tools: Add a new API for the Vibration API(W3C).
    https://bugs.webkit.org/show_bug.cgi?id=72010
    
    Patch by Kihong Kwon <kihong.kwon@samsung.com> on 2012-02-20
    Reviewed by Hajime Morita.
    
    * Scripts/build-webkit: Enable ENABLE_VIBRATION feature.
    
    LayoutTests: Add a new test case for the Vibration API.
    https://bugs.webkit.org/show_bug.cgi?id=72010
    
    Patch by Kihong Kwon <kihong.kwon@samsung.com> on 2012-02-20
    Reviewed by Hajime Morita.
    
    * fast/dom/navigator-vibration-expected.txt: Added.
    * fast/dom/navigator-vibration.html: Added.
    * platform/chromium/test_expectations.txt:
    * platform/gtk/Skipped:
    * platform/mac/Skipped:
    * platform/qt/Skipped:
    * platform/win/Skipped:
    * platform/wincairo/Skipped:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108272 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    9dda50c8