Bug 94085 - Cancel the outstanding vibration pattern if the pattern is 0 or an empty list
Summary: Cancel the outstanding vibration pattern if the pattern is 0 or an empty list
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Sudarsana Nagineni (babu)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-15 01:43 PDT by Sudarsana Nagineni (babu)
Modified: 2012-08-20 18:50 PDT (History)
4 users (show)

See Also:


Attachments
Patch (1.58 KB, patch)
2012-08-15 02:11 PDT, Sudarsana Nagineni (babu)
no flags Details | Formatted Diff | Diff
Patch (1.75 KB, patch)
2012-08-15 04:14 PDT, Sudarsana Nagineni (babu)
no flags Details | Formatted Diff | Diff
Patch (1.96 KB, patch)
2012-08-20 16:12 PDT, Sudarsana Nagineni (babu)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sudarsana Nagineni (babu) 2012-08-15 01:43:23 PDT
We must cancel the outstanding vibration pattern (i.e stop the device from vibrating), if the pattern is 0 or an empty list.
Comment 1 Sudarsana Nagineni (babu) 2012-08-15 02:11:13 PDT
Created attachment 158529 [details]
Patch
Comment 2 Kihong Kwon 2012-08-15 02:41:57 PDT
Looks fine to me.
But, IMHO we need more detail description.
It's hard to understand why you change vibrate logic like this.
Comment 3 Sudarsana Nagineni (babu) 2012-08-15 04:14:18 PDT
Created attachment 158543 [details]
Patch

Thanks for the informal review Kihong. Updated changelog now.
Comment 4 Kenneth Rohde Christiansen 2012-08-15 06:29:18 PDT
Comment on attachment 158543 [details]
Patch

Can we please have a test for this?
Comment 5 Sudarsana Nagineni (babu) 2012-08-15 06:46:39 PDT
Kenneth, thanks for looking into this. 

Unfortunately there is no return value in the Vibration API to check status. Same issue was discussed in bug 93957, comment 4.
Comment 6 Kenneth Rohde Christiansen 2012-08-15 06:47:36 PDT
Can't you do some private hooks for testing?
Comment 7 Sudarsana Nagineni (babu) 2012-08-15 07:52:51 PDT
(In reply to comment #6)
> Can't you do some private hooks for testing?

I have no clue about this, but what I'm planning to do next is write unit tests for the API (in bug 93890) and make sure that vibrate/cancel callabcks are getting called correctly and the implementation is fully compliant with the spec.
Comment 8 Sudarsana Nagineni (babu) 2012-08-17 09:01:11 PDT
EFL WK2 port has unit tests(landed in r125893) for the Vibration API now to verify the implementation.
Comment 9 Sudarsana Nagineni (babu) 2012-08-20 16:12:35 PDT
Created attachment 159554 [details]
Patch

Rebased and updated changelog.
Comment 10 Kentaro Hara 2012-08-20 16:34:35 PDT
Comment on attachment 159554 [details]
Patch

The change looks reasonable. We wanted any test, but it would be OK for now based on the following comment.

> EFL WK2 port has unit tests(landed in r125893) for the Vibration API now to verify the implementation.
Comment 11 WebKit Review Bot 2012-08-20 18:50:31 PDT
Comment on attachment 159554 [details]
Patch

Clearing flags on attachment: 159554

Committed r126116: <http://trac.webkit.org/changeset/126116>
Comment 12 WebKit Review Bot 2012-08-20 18:50:35 PDT
All reviewed patches have been landed.  Closing bug.