RESOLVED FIXED 118288
vibrate function have to return boolean value.
https://bugs.webkit.org/show_bug.cgi?id=118288
Summary vibrate function have to return boolean value.
Kihong Kwon
Reported 2013-07-02 02:41:44 PDT
Latest Vibration API spec is changed. It is LC now. Therefore Vibration API need to align with the spec.
Attachments
Patch (13.16 KB, patch)
2013-07-02 03:02 PDT, Kihong Kwon
no flags
Patch (11.91 KB, patch)
2013-07-02 19:14 PDT, Kihong Kwon
no flags
Patch (12.01 KB, patch)
2013-07-03 02:08 PDT, Kihong Kwon
no flags
Patch (10.60 KB, patch)
2013-07-03 23:49 PDT, Kihong Kwon
no flags
Kihong Kwon
Comment 1 2013-07-02 03:02:42 PDT
EFL EWS Bot
Comment 2 2013-07-02 03:05:53 PDT
EFL EWS Bot
Comment 3 2013-07-02 03:06:18 PDT
Gyuyoung Kim
Comment 4 2013-07-02 03:13:20 PDT
Comment on attachment 205883 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=205883&action=review r- because of build error and my comment. > Source/WebCore/ChangeLog:11 > + In addition, add maxVibrationDuration and maxVibrationPatternLength. I think we need to handle this new variables on new bug because this patch is not trivial.
Kihong Kwon
Comment 5 2013-07-02 03:18:03 PDT
(In reply to comment #4) > (From update of attachment 205883 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=205883&action=review > > r- because of build error and my comment. I think efl doesn't do clean build in this case, It's same error with my local build. After remove WebKitBuild direcory, there is no error. > > > Source/WebCore/ChangeLog:11 > > + In addition, add maxVibrationDuration and maxVibrationPatternLength. > > I think we need to handle this new variables on new bug because this patch is not trivial. I agree with this. I will make a new bug for it.
Gyuyoung Kim
Comment 6 2013-07-02 03:19:06 PDT
(In reply to comment #5) > (In reply to comment #4) > > (From update of attachment 205883 [details] [details]) > > View in context: https://bugs.webkit.org/attachment.cgi?id=205883&action=review > > > > r- because of build error and my comment. > > I think efl doesn't do clean build in this case, It's same error with my local build. > After remove WebKitBuild direcory, there is no error. If so, I will check it soon.
Gyuyoung Kim
Comment 7 2013-07-02 18:06:38 PDT
(In reply to comment #5) > (In reply to comment #4) > > (From update of attachment 205883 [details] [details]) > > View in context: https://bugs.webkit.org/attachment.cgi?id=205883&action=review > > > > r- because of build error and my comment. Kihong, I also check there is no build error locally. Please submit patch corresponding with the title.
Kihong Kwon
Comment 8 2013-07-02 19:14:09 PDT
EFL EWS Bot
Comment 9 2013-07-02 19:18:32 PDT
EFL EWS Bot
Comment 10 2013-07-02 19:24:00 PDT
Gyuyoung Kim
Comment 11 2013-07-03 01:13:32 PDT
Comment on attachment 205962 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=205962&action=review > Source/WebCore/ChangeLog:8 > + According to latest Vibration API which is LC, vibrate() need to be return need -> needs ? return -> returned ? > Source/WebCore/Modules/vibration/NavigatorVibration.cpp:45 > + return NavigatorVibration::vibrate(navigator, pattern); I don't prefer to use unneeded local variables. Why not we use NavigatorVibration::vibrate(navigator, VibrationPattern(time)); ? > Source/WebCore/Modules/vibration/Vibration.cpp:52 > + if (length && !(length % 2)) Could you explain why this condition is needed ? > Source/WebCore/Modules/vibration/Vibration.cpp:55 > + if (m_isVibrating || (m_pattern.size() == 1 && !m_pattern[0])) I think we need to keep existing comment for this condition. > Source/WebCore/Modules/vibration/Vibration.cpp:56 > cancelVibration(); Why you don't return false ? > LayoutTests/ChangeLog:9 > + cancelVibration-after-pagevisibility-changed-to-hidden.html is not proper. Why ? There is still definition in the spec. "When the visibilitychange event [PAGE-VISIBILITY] is dispatched at the Document in a browsing context, the user agent must cancel the pre-existing instance of the processing vibration patterns algorithm, if any." > LayoutTests/ChangeLog:10 > + And navigator-vibration.html need to be changed to align to the spec. need -> needs ?
Kihong Kwon
Comment 12 2013-07-03 01:59:03 PDT
(In reply to comment #11) > (From update of attachment 205962 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=205962&action=review > > > Source/WebCore/Modules/vibration/NavigatorVibration.cpp:45 > > + return NavigatorVibration::vibrate(navigator, pattern); > > I don't prefer to use unneeded local variables. Why not we use NavigatorVibration::vibrate(navigator, VibrationPattern(time)); ? No problem. > > > Source/WebCore/Modules/vibration/Vibration.cpp:52 > > + if (length && !(length % 2)) > > Could you explain why this condition is needed ? According to the spec - If the length of pattern is even and is not zero, then remove the last entry in pattern. > > > Source/WebCore/Modules/vibration/Vibration.cpp:55 > > + if (m_isVibrating || (m_pattern.size() == 1 && !m_pattern[0])) > > I think we need to keep existing comment for this condition. OK. > > > Source/WebCore/Modules/vibration/Vibration.cpp:56 > > cancelVibration(); > > Why you don't return false ? According to the spec, vibraiton cancel is also return true. > > > LayoutTests/ChangeLog:9 > > + cancelVibration-after-pagevisibility-changed-to-hidden.html is not proper. > > Why ? There is still definition in the spec. > > "When the visibilitychange event [PAGE-VISIBILITY] is dispatched at the Document in a browsing context, the user agent must cancel the pre-existing instance of the processing vibration patterns algorithm, if any." > This test case is for checking that vibration can be canceled or not, even if visibility state is hidden. But according to the spec, when visibilitychange event is dispatched, pre-exsiting vibration have to be canceled automatically. IMHO, we need to add new test case for page-visibility status when we add that part, but is's not included in this patch.
Kihong Kwon
Comment 13 2013-07-03 02:08:11 PDT
EFL EWS Bot
Comment 14 2013-07-03 02:31:58 PDT
EFL EWS Bot
Comment 15 2013-07-03 02:37:53 PDT
Gyuyoung Kim
Comment 16 2013-07-03 04:11:43 PDT
(In reply to comment #12) > This test case is for checking that vibration can be canceled or not, even if visibility state is hidden. But according to the spec, when visibilitychange event is dispatched, pre-exsiting vibration have to be canceled automatically. > > IMHO, we need to add new test case for page-visibility status when we add that part, but is's not included in this patch. This removal isn't related to this bug. I think you need to keep this until you're ready to add new test cases.
Kihong Kwon
Comment 17 2013-07-03 22:01:36 PDT
(In reply to comment #16) > (In reply to comment #12) > > > This test case is for checking that vibration can be canceled or not, even if visibility state is hidden. But according to the spec, when visibilitychange event is dispatched, pre-exsiting vibration have to be canceled automatically. > > > > IMHO, we need to add new test case for page-visibility status when we add that part, but is's not included in this patch. > > This removal isn't related to this bug. I think you need to keep this until you're ready to add new test cases. I think this test cases is related to this patch, because I align vibration api to the latest spec, and according to the spec, this TC is wrong. - When page visibility is changed, vibration have to be canceled. But this TC suppose to vibrating is not canceled when page visibility is changed to the hidden state.
Gyuyoung Kim
Comment 18 2013-07-03 22:20:49 PDT
(In reply to comment #17) > (In reply to comment #16) > > (In reply to comment #12) > > > > > This test case is for checking that vibration can be canceled or not, even if visibility state is hidden. But according to the spec, when visibilitychange event is dispatched, pre-exsiting vibration have to be canceled automatically. > > > > > > IMHO, we need to add new test case for page-visibility status when we add that part, but is's not included in this patch. > > > > This removal isn't related to this bug. I think you need to keep this until you're ready to add new test cases. > > I think this test cases is related to this patch, because I align vibration api to the latest spec, and according to the spec, this TC is wrong. > - When page visibility is changed, vibration have to be canceled. > But this TC suppose to vibrating is not canceled when page visibility is changed to the hidden state. If possible, IMHO, we need to land a patch corresponding with bug title. I feel the removal is away from this bug's aim. Of course, we sometimes have landed patches with trivial changes on previous bugs though, I would recommend to keep this test until you're ready to replace with new tests.
Kihong Kwon
Comment 19 2013-07-03 22:31:28 PDT
> If possible, IMHO, we need to land a patch corresponding with bug title. I feel the removal is away from this bug's aim. Of course, we sometimes have landed patches with trivial changes on previous bugs though, I would recommend to keep this test until you're ready to replace with new tests. I will this TC to the TestExpectations until I fix it. Thanks :)
Kihong Kwon
Comment 20 2013-07-03 23:49:07 PDT
EFL EWS Bot
Comment 21 2013-07-03 23:54:04 PDT
EFL EWS Bot
Comment 22 2013-07-03 23:57:06 PDT
Gyuyoung Kim
Comment 23 2013-07-04 00:48:46 PDT
Comment on attachment 206054 [details] Patch r=me as a step of adjusting latest vibration spec into WebKit.
Gyuyoung Kim
Comment 24 2013-07-04 00:53:27 PDT
When patch is landed, I will restart efl buildbot. But, we need to file a bug regarding this ews problem.
Kihong Kwon
Comment 25 2013-07-04 01:26:20 PDT
(In reply to comment #24) > When patch is landed, I will restart efl buildbot. But, we need to file a bug regarding this ews problem. I will file a bug about this issue.
Kihong Kwon
Comment 26 2013-07-04 05:20:34 PDT
(In reply to comment #25) > (In reply to comment #24) > > When patch is landed, I will restart efl buildbot. But, we need to file a bug regarding this ews problem. > > I will file a bug about this issue. Bug is filed for this issue.(Bug 118390)
WebKit Commit Bot
Comment 27 2013-07-08 00:40:15 PDT
Comment on attachment 206054 [details] Patch Clearing flags on attachment: 206054 Committed r152441: <http://trac.webkit.org/changeset/152441>
WebKit Commit Bot
Comment 28 2013-07-08 00:40:19 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.