<?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>66514</bug_id>
          
          <creation_ts>2011-08-18 17:00:54 -0700</creation_ts>
          <short_desc>[Qt] editing/selection/caret-at-bidi-boundary.html fails</short_desc>
          <delta_ts>2012-10-09 02:04:52 -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>HTML Editing</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>
          <dependson>76821</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ryosuke Niwa">rniwa</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>cshu</cc>
    
    <cc>kbalazs</cc>
    
    <cc>mrobinson</cc>
    
    <cc>ossy</cc>
    
    <cc>rafael.lobo</cc>
    
    <cc>rhodovan.u-szeged</cc>
    
    <cc>tonikitoo</cc>
    
    <cc>webkit.review.bot</cc>
    
    <cc>yael</cc>
    
    <cc>zoltan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>453498</commentid>
    <comment_count>0</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2011-08-18 17:00:54 -0700</bug_when>
    <thetext>The test added by http://trac.webkit.org/changeset/93369 is failing on Qt.  Unfortunately, I can&apos;t see the diff on http://build.webkit.org/results/Qt%20Linux%20Release/r93369%20(36616)/results.html.

Could either one of you run the test locally tell me what the diff is?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>453698</commentid>
    <comment_count>1</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2011-08-19 01:42:18 -0700</bug_when>
    <thetext>Because this test times out.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>453699</commentid>
    <comment_count>2</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2011-08-19 01:43:19 -0700</bug_when>
    <thetext>the test introduced in https://trac.webkit.org/changeset/93369</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>453740</commentid>
    <comment_count>3</comment_count>
    <who name="Zoltan Horvath">zoltan</who>
    <bug_when>2011-08-19 04:38:30 -0700</bug_when>
    <thetext>I skipped the test in http://trac.webkit.org/changeset/93394.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>453885</commentid>
    <comment_count>4</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2011-08-19 09:50:53 -0700</bug_when>
    <thetext>Also see the bug 66551.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>453887</commentid>
    <comment_count>5</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2011-08-19 09:52:54 -0700</bug_when>
    <thetext>Does the test still time out if you commented out all but the first dt and dd?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>454272</commentid>
    <comment_count>6</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2011-08-19 18:49:20 -0700</bug_when>
    <thetext>Ah, so this is caused by Qt&apos;s DRT actually sleeping for the amount of time leapForward is called upon.  This is not how other ports implement leapForward (except Windows port which apparently has the same behavior).  The point of leapForward is so that you can call it as many time as you want with any delay as you wish without actually delaying or sleeping DRT.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>454273</commentid>
    <comment_count>7</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2011-08-19 18:50:06 -0700</bug_when>
    <thetext>See http://trac.webkit.org/browser/trunk/Tools/DumpRenderTree/qt/EventSenderQt.cpp#L561</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>454410</commentid>
    <comment_count>8</comment_count>
    <who name="Martin Robinson">mrobinson</who>
    <bug_when>2011-08-21 09:56:44 -0700</bug_when>
    <thetext>(In reply to comment #6)
&gt; Ah, so this is caused by Qt&apos;s DRT actually sleeping for the amount of time leapForward is called upon.  This is not how other ports implement leapForward (except Windows port which apparently has the same behavior).  The point of leapForward is so that you can call it as many time as you want with any delay as you wish without actually delaying or sleeping DRT.

I tried in vain to remove the actual sleep from the GTK+ DRT. GTK+ internals didn&apos;t allow it though -- it broke drag and drop completely. Does this test really need to leap forward one entire second for each loop iteration? Why not just reduce the amount of time for now, since fixing all of these platforms is non-trivial?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>454414</commentid>
    <comment_count>9</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2011-08-21 12:16:03 -0700</bug_when>
    <thetext>(In reply to comment #8)
&gt; I tried in vain to remove the actual sleep from the GTK+ DRT. GTK+ internals didn&apos;t allow it though -- it broke drag and drop completely. Does this test really need to leap forward one entire second for each loop iteration? Why not just reduce the amount of time for now, since fixing all of these platforms is non-trivial?

So if I reduce the amount of time, to say 100ms, then the test still time outs because my test clicks on every pixel on a text run to verify that the caret is placed on the correct location for several test cases.  Even if the text was only 50 pixels long, it&apos;ll take 5 seconds at minimum.  On the other hand, if I reduce the waiting time too much (even 100ms is too small), then DRT thinks I&apos;m double/triple clicking and fail.

We might be able to get away with this problem if we had a way to clear click count in EventHandler.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>454614</commentid>
    <comment_count>10</comment_count>
    <who name="Martin Robinson">mrobinson</who>
    <bug_when>2011-08-22 08:43:10 -0700</bug_when>
    <thetext>(In reply to comment #9)

&gt; We might be able to get away with this problem if we had a way to clear click count in EventHandler.

Another possible solution to avoid leaping forward is to click once at enough distance from the original clicks to reset the internal click counter. This is at least how Windows and GTK+ work. I&apos;m not sure about Mac, Qt and Chromium.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>454700</commentid>
    <comment_count>11</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2011-08-22 11:02:54 -0700</bug_when>
    <thetext>(In reply to comment #10)
&gt; (In reply to comment #9)
&gt; 
&gt; &gt; We might be able to get away with this problem if we had a way to clear click count in EventHandler.
&gt; 
&gt; Another possible solution to avoid leaping forward is to click once at enough distance from the original clicks to reset the internal click counter. This is at least how Windows and GTK+ work. I&apos;m not sure about Mac, Qt and Chromium.

That IS an brilliant idea! It works on Windows at least.  Let me make a patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>454716</commentid>
    <comment_count>12</comment_count>
    <who name="Martin Robinson">mrobinson</who>
    <bug_when>2011-08-22 11:12:39 -0700</bug_when>
    <thetext>(In reply to comment #11)

&gt; That IS an brilliant idea! It works on Windows at least.  Let me make a patch.

I think a long term solution might be to have some EventSender hooks for sending a specific number of clicks. Something like eventSender.doubleClick or eventSender.click(2). That way if there are platform-specific ways to enforce click counts, we can push that to port code.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>454762</commentid>
    <comment_count>13</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2011-08-22 11:46:38 -0700</bug_when>
    <thetext>(In reply to comment #12)
&gt; (In reply to comment #11)
&gt; 
&gt; &gt; That IS an brilliant idea! It works on Windows at least.  Let me make a patch.
&gt; 
&gt; I think a long term solution might be to have some EventSender hooks for sending a specific number of clicks. Something like eventSender.doubleClick or eventSender.click(2). That way if there are platform-specific ways to enforce click counts, we can push that to port code.

I uploaded a patch on the bug 66551 per your suggestion.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>454968</commentid>
    <comment_count>14</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2011-08-22 15:03:26 -0700</bug_when>
    <thetext>Apparently, there&apos;s some Qt-specific bug here.  Skipped again in http://trac.webkit.org/changeset/93549.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>541702</commentid>
    <comment_count>15</comment_count>
    <who name="Rafael Brandao">rafael.lobo</who>
    <bug_when>2012-01-24 14:31:34 -0800</bug_when>
    <thetext>Jesus patch for bug #76821 seems to fix this one. Marking this bug as dependent of it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>543139</commentid>
    <comment_count>16</comment_count>
    <who name="Balazs Kelemen">kbalazs</who>
    <bug_when>2012-01-26 07:22:06 -0800</bug_when>
    <thetext>It&apos;s still failing. See: https://bugs.webkit.org/show_bug.cgi?id=77102</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>737046</commentid>
    <comment_count>17</comment_count>
      <attachid>167608</attachid>
    <who name="Tullio Lucena">tullio.lucena</who>
    <bug_when>2012-10-08 14:27:45 -0700</bug_when>
    <thetext>Created attachment 167608
Patch

Unskipping test. The changes in testfonts solved this bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>737555</commentid>
    <comment_count>18</comment_count>
      <attachid>167608</attachid>
    <who name="Yuta Kitamura">yutak</who>
    <bug_when>2012-10-09 01:57:13 -0700</bug_when>
    <thetext>Comment on attachment 167608
Patch

OK.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>737562</commentid>
    <comment_count>19</comment_count>
      <attachid>167608</attachid>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-10-09 02:04:47 -0700</bug_when>
    <thetext>Comment on attachment 167608
Patch

Clearing flags on attachment: 167608

Committed r130740: &lt;http://trac.webkit.org/changeset/130740&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>737563</commentid>
    <comment_count>20</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-10-09 02:04:52 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>167608</attachid>
            <date>2012-10-08 14:27:45 -0700</date>
            <delta_ts>2012-10-09 02:04:46 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>patch.diff</filename>
            <type>text/plain</type>
            <size>1152</size>
            <attacher name="Tullio Lucena">tullio.lucena</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL0xheW91dFRlc3RzL0NoYW5nZUxvZyBiL0xheW91dFRlc3RzL0NoYW5nZUxv
ZwppbmRleCA4MjgxZmRiLi40ZTdjZDhjIDEwMDY0NAotLS0gYS9MYXlvdXRUZXN0cy9DaGFuZ2VM
b2cKKysrIGIvTGF5b3V0VGVzdHMvQ2hhbmdlTG9nCkBAIC0xLDMgKzEsMTQgQEAKKzIwMTItMTAt
MDggIFR1bGxpbyBMdWNlbmEgIDx0dWxsaW8ubHVjZW5hQG9wZW5ib3NzYS5vcmc+CisKKyAgICAg
ICAgW1F0XSBlZGl0aW5nL3NlbGVjdGlvbi9jYXJldC1hdC1iaWRpLWJvdW5kYXJ5Lmh0bWwgZmFp
bHMKKyAgICAgICAgaHR0cHM6Ly9idWdzLndlYmtpdC5vcmcvc2hvd19idWcuY2dpP2lkPTY2NTE0
CisKKyAgICAgICAgUmV2aWV3ZWQgYnkgTk9CT0RZIChPT1BTISkuCisKKyAgICAgICAgVW5za2lw
cGluZyB0ZXN0LiBUaGUgdXBkYXRlIGluIHRlc3Rmb250cyBzb2x2ZWQgdGhpcyBidWcuCisKKyAg
ICAgICAgKiBwbGF0Zm9ybS9xdC9UZXN0RXhwZWN0YXRpb25zOgorCiAyMDEyLTEwLTA4ICBKdWxp
ZW4gQ2hhZmZyYWl4ICA8amNoYWZmcmFpeEB3ZWJraXQub3JnPgogCiAgICAgICAgIFVucmV2aWV3
ZWQgQ2hyb21pdW0gZ2FyZGVuaW5nLgpkaWZmIC0tZ2l0IGEvTGF5b3V0VGVzdHMvcGxhdGZvcm0v
cXQvVGVzdE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