<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>93957</bug_id>
          
          <creation_ts>2012-08-14 04:48:58 -0700</creation_ts>
          <short_desc>Clear pattern to prevent timing problem between cancelVibration and vibrate</short_desc>
          <delta_ts>2012-08-14 17:10:56 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>DOM</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Kihong Kwon">kihong.kwon</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>haraken</cc>
    
    <cc>morrita</cc>
    
    <cc>naginenis</cc>
    
    <cc>vimff0</cc>
    
    <cc>webkit.review.bot</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>694823</commentid>
    <comment_count>0</comment_count>
    <who name="Kihong Kwon">kihong.kwon</who>
    <bug_when>2012-08-14 04:48:58 -0700</bug_when>
    <thetext>If there is javascript codes like below,

navigator.vibrate(1000);
navigator.vibrate(0);

cancelVibrate() can be called before calling vibrate().(It&apos;s timer timing issue)
In this case, cancelVibrate() is not working at all.

We need to fix this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>694856</commentid>
    <comment_count>1</comment_count>
      <attachid>158301</attachid>
    <who name="Kihong Kwon">kihong.kwon</who>
    <bug_when>2012-08-14 05:22:28 -0700</bug_when>
    <thetext>Created attachment 158301
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>694857</commentid>
    <comment_count>2</comment_count>
    <who name="Kihong Kwon">kihong.kwon</who>
    <bug_when>2012-08-14 05:24:42 -0700</bug_when>
    <thetext>CC haraken and morrita.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>694859</commentid>
    <comment_count>3</comment_count>
      <attachid>158301</attachid>
    <who name="Kentaro Hara">haraken</who>
    <bug_when>2012-08-14 05:26:17 -0700</bug_when>
    <thetext>Comment on attachment 158301
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=158301&amp;action=review

&gt; Source/WebCore/ChangeLog:11
&gt; +        There is a timing issue in the cancelVibration.
&gt; +        Since vibrate works based on timer, cancelVibration might be called
&gt; +        eariler than vibrate when cancelVibration is called just after vibrate call.
&gt; +        It can be prevented from clearing m_pattern in the cancelVibration.

Can&apos;t you write a layout test for this?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>694874</commentid>
    <comment_count>4</comment_count>
    <who name="Kihong Kwon">kihong.kwon</who>
    <bug_when>2012-08-14 05:44:45 -0700</bug_when>
    <thetext>(In reply to comment #3)
&gt; (From update of attachment 158301 [details])
&gt; View in context: https://bugs.webkit.org/attachment.cgi?id=158301&amp;action=review
&gt; 
&gt; &gt; Source/WebCore/ChangeLog:11
&gt; &gt; +        There is a timing issue in the cancelVibration.
&gt; &gt; +        Since vibrate works based on timer, cancelVibration might be called
&gt; &gt; +        eariler than vibrate when cancelVibration is called just after vibrate call.
&gt; &gt; +        It can be prevented from clearing m_pattern in the cancelVibration.
&gt; 
&gt; Can&apos;t you write a layout test for this?

There is no return value in the Vibration API.
Therefore, if we add layout test, I think we have only way to use printf like legacy notification tests.(LayoutTests/fast/notifications/)
But IMHO it&apos;s not good to us.
I would like to get your opinion about this please. :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>695532</commentid>
    <comment_count>5</comment_count>
      <attachid>158301</attachid>
    <who name="Kentaro Hara">haraken</who>
    <bug_when>2012-08-14 16:37:06 -0700</bug_when>
    <thetext>Comment on attachment 158301
Patch

Thanks, I understood that writing the test is difficult. The change looks reasonable, let&apos;s land it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>695568</commentid>
    <comment_count>6</comment_count>
      <attachid>158301</attachid>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-08-14 17:10:51 -0700</bug_when>
    <thetext>Comment on attachment 158301
Patch

Clearing flags on attachment: 158301

Committed r125624: &lt;http://trac.webkit.org/changeset/125624&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>695569</commentid>
    <comment_count>7</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-08-14 17:10:56 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>158301</attachid>
            <date>2012-08-14 05:22:28 -0700</date>
            <delta_ts>2012-08-14 17:10:51 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-93957-20120814212155.patch</filename>
            <type>text/plain</type>
            <size>1578</size>
            <attacher name="Kihong Kwon">kihong.kwon</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMTI1NTM3CmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViQ29yZS9D
aGFuZ2VMb2cgYi9Tb3VyY2UvV2ViQ29yZS9DaGFuZ2VMb2cKaW5kZXggNDI3MGYzNTFiM2RmNTIz
M2VhMzljYWU2MmMzODA1MDQxODE4ZDQ0OC4uMjYyZTQ3YTgwMTExYTAyYmFjNzhmMzg4YTE0ZTUw
NGRjMGJjMmE5MyAxMDA2NDQKLS0tIGEvU291cmNlL1dlYkNvcmUvQ2hhbmdlTG9nCisrKyBiL1Nv
dXJjZS9XZWJ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