<?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>64392</bug_id>
          
          <creation_ts>2011-07-12 14:30:30 -0700</creation_ts>
          <short_desc>Caret should move immediately before a word when modifying selection by word granularity on Windows</short_desc>
          <delta_ts>2012-05-02 11:15:50 -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>PC</rep_platform>
          <op_sys>Windows 7</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>1</everconfirmed>
          <reporter name="David Tseng">dtseng</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>aroben</cc>
    
    <cc>darin</cc>
    
    <cc>enrica</cc>
    
    <cc>justin.garcia</cc>
    
    <cc>mitz</cc>
    
    <cc>mrobinson</cc>
    
    <cc>rniwa</cc>
    
    <cc>xji</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>435952</commentid>
    <comment_count>0</comment_count>
    <who name="David Tseng">dtseng</who>
    <bug_when>2011-07-12 14:30:30 -0700</bug_when>
    <thetext>1.  place focus on a textfield or textarea (i.e. google.com, search field).
2.  type a sentence (i.e. &quot;this is a test&quot;).
3.  press ctrl-right several times and then ctrl-left several times.

What is the expected result?
each press of ctrl-right places cursor before next word.  Example:
this |is a test.
this is |a test.
this is a |test.

Currently, webkit places the cursor *after* the current word.
this| is a test.
this is| a test.
this is a| test.

This though consistent with Mac cursor movement, isn&apos;t in Windows.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>435968</commentid>
    <comment_count>1</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2011-07-12 14:39:33 -0700</bug_when>
    <thetext>http://crbug.com/88711</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>439483</commentid>
    <comment_count>2</comment_count>
      <attachid>101393</attachid>
    <who name="David Tseng">dtseng</who>
    <bug_when>2011-07-19 14:57:20 -0700</bug_when>
    <thetext>Created attachment 101393
Proposed patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>439489</commentid>
    <comment_count>3</comment_count>
      <attachid>101393</attachid>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2011-07-19 15:08:30 -0700</bug_when>
    <thetext>Comment on attachment 101393
Proposed patch.

We definitely need a test for this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>439497</commentid>
    <comment_count>4</comment_count>
      <attachid>101393</attachid>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2011-07-19 15:16:17 -0700</bug_when>
    <thetext>Comment on attachment 101393
Proposed patch.

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

&gt; Source/WebCore/platform/text/TextBoundaries.cpp:74
&gt; -            if (position &lt; len &amp;&amp; isAlphanumeric(chars[position - 1]))
&gt; +            if (position &lt; len &amp;&amp; isAlphanumeric(chars[position]))

This code seems to be used by GTK as well.  Are we sure we want this behavior on GTK?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>439500</commentid>
    <comment_count>5</comment_count>
      <attachid>101393</attachid>
    <who name="Darin Adler">darin</who>
    <bug_when>2011-07-19 15:18:55 -0700</bug_when>
    <thetext>Comment on attachment 101393
Proposed patch.

I don’t think this is the right level to make this policy change.

Further, this should probably be a behavior change that is conditional based on text editing behavior. It’s a coincidence right now that this code isn’t used on Mac, for example.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>439508</commentid>
    <comment_count>6</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2011-07-19 15:26:35 -0700</bug_when>
    <thetext>(In reply to comment #5)
&gt; (From update of attachment 101393 [details])
&gt; I don’t think this is the right level to make this policy change.
&gt; 
&gt; Further, this should probably be a behavior change that is conditional based on text editing behavior. It’s a coincidence right now that this code isn’t used on Mac, for example.

I agree. Changing behavior based on EditingBehavior is much cleaner.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>448184</commentid>
    <comment_count>7</comment_count>
      <attachid>101393</attachid>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2011-08-08 12:39:37 -0700</bug_when>
    <thetext>Comment on attachment 101393
Proposed patch.

Clearing cq? since this patch has been r-ed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>614026</commentid>
    <comment_count>8</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2012-05-01 23:39:45 -0700</bug_when>
    <thetext>Xiaomei, is this bug fixed per your visual word movement patch?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>614459</commentid>
    <comment_count>9</comment_count>
    <who name="Xiaomei Ji">xji</who>
    <bug_when>2012-05-02 11:15:50 -0700</bug_when>
    <thetext>(In reply to comment #8)
&gt; Xiaomei, is this bug fixed per your visual word movement patch?

Yes. and I am closing it.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>101393</attachid>
            <date>2011-07-19 14:57:20 -0700</date>
            <delta_ts>2011-08-08 12:39:36 -0700</delta_ts>
            <desc>Proposed patch.</desc>
            <filename>text.txt</filename>
            <type>text/plain</type>
            <size>1557</size>
            <attacher name="David Tseng">dtseng</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09P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yODYpCisrKyBTb3VyY2UvV2Vi
Q29yZS9wbGF0Zm9ybS90ZXh0L1RleHRCb3VuZGFyaWVzLmNwcAkod29ya2luZyBjb3B5KQpAQCAt
NjksOSArNjksOSBAQCBpbnQgZmluZE5leHRXb3JkRnJvbUluZGV4KGNvbnN0IFVDaGFyKiBjCiAg
ICAgaWYgKGZvcndhcmQpIHsKICAgICAgICAgcG9zaXRpb24gPSB0ZXh0QnJlYWtGb2xsb3dpbmco
aXQsIHBvc2l0aW9uKTsKICAgICAgICAgd2hpbGUgKHBvc2l0aW9uICE9IFRleHRCcmVha0RvbmUp
IHsKLSAgICAgICAgICAgIC8vIFdlIHN0b3Agc2VhcmNoaW5nIHdoZW4gdGhlIGNoYXJhY3RlciBw
cmVjZWVkaW5nIHRoZSBicmVhaworICAgICAgICAgICAgLy8gV2Ugc3RvcCBzZWFyY2hpbmcgd2hl
biB0aGUgY2hhcmFjdGVyIGZvbGxvd2luZyB0aGUgYnJlYWsKICAgICAgICAgICAgIC8vIGlzIGFs
cGhhbnVtZXJpYy4KLSAgICAgICAgICAgIGlmIChwb3NpdGlvbiA8IGxlbiAmJiBpc0FscGhhbnVt
ZXJpYyhjaGFyc1twb3NpdGlvbiAtIDFdKSkKKyAgICAgICAgICAgIGlmIChwb3NpdGlvbiA8IGxl
biAmJiBpc0FscGhhbnVtZXJpYyhjaGFyc1twb3NpdGlvbl0pKQogICAgICAgICAgICAgICAgIHJl
dHVybiBwb3NpdGlvbjsKIAogICAgICAgICAgICAgcG9zaXRpb24gPSB0ZXh0QnJlYWtGb2xsb3dp
bmcoaXQsIHBvc2l0aW9uKTsK
</data>
<flag name="review"
          id="96289"
          type_id="1"
          status="-"
          setter="rniwa"
    />
          </attachment>
      

    </bug>

</bugzilla>