Changeset 126116 in webkit
- Timestamp:
- Aug 20, 2012 6:50:14 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r126113 r126116 1 2012-08-20 Sudarsana Nagineni <sudarsana.nagineni@linux.intel.com> 2 3 Cancel the outstanding vibration pattern if the pattern is 0 or an empty list 4 https://bugs.webkit.org/show_bug.cgi?id=94085 5 6 Reviewed by Kentaro Hara. 7 8 vibrate() method to stop the device from vibrating is getting called before the 9 vibration is in effect. Hence, it is failing to cancel the pre-existing instance 10 of processing vibration patterns. 11 12 This patch cancel the pre-existing instance of the processing vibration patterns 13 always when the vibrate() method called with pattern 0 or an empty list. 14 15 No new tests since there is no return value in the Vibration API to test this 16 particular case. Existing test fast/dom/navigator-vibration.html covers testing of 17 the Vibration API. 18 19 * Modules/vibration/Vibration.cpp: 20 (WebCore::Vibration::vibrate): 21 1 22 2012-08-20 Adam Klein <adamk@chromium.org> 2 23 -
trunk/Source/WebCore/Modules/vibration/Vibration.cpp
r125624 r126116 59 59 int length = pattern.size(); 60 60 61 // Cancel the pre-existing instance of vibration patterns, if the pattern is 0 or an empty list. 62 if (!length || (length == 1 && !pattern[0])) { 63 cancelVibration(); 64 return; 65 } 66 61 67 if (m_isVibrating) 62 68 cancelVibration(); 63 64 if (!length || (length == 1 && !pattern[0]))65 return;66 69 67 70 if (m_timerStart.isActive())
Note: See TracChangeset
for help on using the changeset viewer.