<?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>46839</bug_id>
          
          <creation_ts>2010-09-29 14:16:34 -0700</creation_ts>
          <short_desc>Autocorrection shouldn&apos;t prompt the same correction after user has edited previous correction.</short_desc>
          <delta_ts>2010-10-01 11:11:40 -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>New Bugs</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.6</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Jia Pu">jiapu.mail</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>commit-queue</cc>
    
    <cc>jiapu.mail</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>287115</commentid>
    <comment_count>0</comment_count>
    <who name="Jia Pu">jiapu.mail</who>
    <bug_when>2010-09-29 14:16:34 -0700</bug_when>
    <thetext>&lt;rdar://problem/8476963&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>287165</commentid>
    <comment_count>1</comment_count>
      <attachid>69260</attachid>
    <who name="Jia Pu">jiapu.mail</who>
    <bug_when>2010-09-29 15:26:00 -0700</bug_when>
    <thetext>Created attachment 69260
Proposed patch (v1)

Prior to bug 45709. We use &quot;Replacement&quot; marker to indicate the word that has been autocorrected and need to be marked with underline. Whenever user edits an autocorrected word, in order to remove the underline, we remove the &quot;Replacement&quot; marker. However, doing this also prevents us from keeping track of on which word we have already applied autocorrection. So if the user corrects an autocorrection, we would keep prompting the same autocorrection suggestion.

In bug 45709, we introduced a new marker &quot;CorrectionIndicator&quot; to indicate whether we should draw underline. So now we can remove underline by removing &quot;CorrectionIndicator&quot; marker. This allows us to keep &quot;Replacement&quot; marker around, so that we won&apos;t suggest autocorrection on word that already bears &quot;Replacement&quot; marker.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>287192</commentid>
    <comment_count>2</comment_count>
      <attachid>69260</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2010-09-29 16:06:40 -0700</bug_when>
    <thetext>Comment on attachment 69260
Proposed patch (v1)

Change looks fine. We should come up with a way to do regression tests. It’s not safe to have this code in here but not tested in the WebKit regression test suite.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>287194</commentid>
    <comment_count>3</comment_count>
    <who name="Jia Pu">jiapu.mail</who>
    <bug_when>2010-09-29 16:12:10 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; (From update of attachment 69260 [details])
&gt; Change looks fine. We should come up with a way to do regression tests. It’s not safe to have this code in here but not tested in the WebKit regression test suite.

Agree. I will look into writing test for autocorrection. One of the trick parts is that autocorrection result depends on user&apos;s past usage. In other word, we adapt to user feedback. So unless we always run the tests on a freshly installed system, there&apos;s no guarantee to get the expected correction result back.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>287432</commentid>
    <comment_count>4</comment_count>
      <attachid>69260</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2010-09-30 01:53:41 -0700</bug_when>
    <thetext>Comment on attachment 69260
Proposed patch (v1)

Rejecting patch 69260 from commit-queue.

Failed to run &quot;[&apos;./WebKitTools/Scripts/webkit-patch&apos;, &apos;--status-host=queues.webkit.org&apos;, &apos;build-and-test&apos;, &apos;--no-clean&apos;, &apos;--no-update&apos;, &apos;--test&apos;, &apos;--quiet&apos;, &apos;--non-interactive&apos;]&quot; exit_code: 2
Last 500 characters of output:
 tests successful.
Files=14, Tests=304,  1 wallclock secs ( 0.63 cusr +  0.13 csys =  0.76 CPU)
Running build-dumprendertree
Compiling Java tests
make: Nothing to be done for `default&apos;.
Running tests from /Users/abarth/git/webkit-queue/LayoutTests
Testing 21408 test cases.
websocket/tests/simple.html -&gt; failed

Exiting early after 1 failures. 21390 tests run.
498.10s total testing time

21389 test cases (99%) succeeded
1 test case (&lt;1%) had incorrect layout
33 test cases (&lt;1%) had stderr output

Full output: http://queues.webkit.org/results/4229026</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>288331</commentid>
    <comment_count>5</comment_count>
      <attachid>69260</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2010-10-01 10:28:43 -0700</bug_when>
    <thetext>Comment on attachment 69260
Proposed patch (v1)

Trying again because the last failure seemed to be due to a flaky websocket test.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>288353</commentid>
    <comment_count>6</comment_count>
      <attachid>69260</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2010-10-01 11:11:34 -0700</bug_when>
    <thetext>Comment on attachment 69260
Proposed patch (v1)

Clearing flags on attachment: 69260

Committed r68902: &lt;http://trac.webkit.org/changeset/68902&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>288354</commentid>
    <comment_count>7</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2010-10-01 11:11:40 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>69260</attachid>
            <date>2010-09-29 15:26:00 -0700</date>
            <delta_ts>2010-10-01 11:11:34 -0700</delta_ts>
            <desc>Proposed patch (v1)</desc>
            <filename>webkit-bug46839.patch</filename>
            <type>text/plain</type>
            <size>1862</size>
            <attacher name="Jia Pu">jiapu.mail</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYkNvcmUvQ2hhbmdlTG9nCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIFdlYkNvcmUvQ2hhbmdlTG9n
CShyZXZpc2lvbiA2ODY4NikKKysrIFdlYkNvcmUvQ2hhbmdlTG9nCSh3b3JraW5nIGNvcHkpCkBA
IC0xLDMgKzEsMTcgQEAKKzIwMTAtMDktMjkgIEppYSBQdSAgPGpwdUBhcHBsZS5jb20+CisKKyAg
ICAgICAgUmV2aWV3ZWQgYnkgTk9CT0RZIChPT1BTISkuCisKKyAgICAgICAgQXV0b2NvcnJlY3Rp
b24gc2hvdWxkbid0IHByb21wdCB0aGUgc2FtZSBjb3JyZWN0aW9uIGFmdGVyIHVzZXIgaGFzIGVk
aXRlZCBwcmV2aW91cyBjb3JyZWN0aW9uLgorICAgICAgICBodHRwczovL2J1Z3Mud2Via2l0Lm9y
Zy9zaG93X2J1Zy5jZ2k/aWQ9NDY4MzkKKyAgICAgICAgPHJkYXI6Ly9wcm9ibGVtLzg0NzY5NjM+
CisKKyAgICAgICAgKiBlZGl0aW5nL0VkaXRvci5jcHA6CisgICAgICAgIChXZWJDb3JlOjpFZGl0
b3I6OnJlc3BvbmRUb0NoYW5nZWRTZWxlY3Rpb24pOiBSZW1vdmUgIkNvcnJlY3Rpb25JbmRpY2F0
b3IiIG1hcmtlciBpbnN0ZWFkIG9mCisgICAgICAgICAgIlJlcGxhY2VtZW50IiBtYXJrZXIuIFNp
bmNlIHRoZSBmb3JtZXIgY29udHJvbHMgd2hldGhlciB3ZSBkcmF3IGF1dG9jb3JyZWN0aW9uIHVu
ZGVybGluZSwKKyAgICAgICAgICBhbmQgdGhlIGxhdHRlciBpcyB1c2VkIHRvIHByZXZlbnQgYXV0
b2NvcnJlY3Rpb24gZnJvbSBiZWluZyBhcHBsaWVkIGFnYWluIG9uIGFscmVhZHk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