<?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>15279</bug_id>
          
          <creation_ts>2007-09-25 11:50:04 -0700</creation_ts>
          <short_desc>Right clicking over text (or multiple spaces) auto selects the word (or multiple spaces) under it</short_desc>
          <delta_ts>2010-04-27 11:07:32 -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>WebCore Misc.</component>
          <version>523.x (Safari 3)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</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>1</everconfirmed>
          <reporter name="Rahul Kuchhal">kuchhal</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>aa</cc>
    
    <cc>anderson.calvin1</cc>
    
    <cc>aroben</cc>
    
    <cc>dev+webkit</cc>
    
    <cc>eric</cc>
    
    <cc>fishd</cc>
    
    <cc>jesall</cc>
    
    <cc>lethalman88</cc>
    
    <cc>mrowe</cc>
    
    <cc>tonikitoo</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>57011</commentid>
    <comment_count>0</comment_count>
    <who name="Rahul Kuchhal">kuchhal</who>
    <bug_when>2007-09-25 11:50:04 -0700</bug_when>
    <thetext>Due to changes made in WebCore/page/EventHandler.cpp at @24499 &amp; @24561, when I right click on a page, the word under is auto selected and I don&apos;t see the correct context menu (Reload, View Source etc). Instead a selection based menu of Search with Google, Copy etc is shown.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57017</commentid>
    <comment_count>1</comment_count>
    <who name="Darin Fisher (:fishd, Google)">fishd</who>
    <bug_when>2007-09-25 12:59:35 -0700</bug_when>
    <thetext>At least, it seems broken that this happens when right clicking on a link.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57026</commentid>
    <comment_count>2</comment_count>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2007-09-25 13:44:15 -0700</bug_when>
    <thetext>As you can see in the ChangeLog comments from r24499 &lt;http://trac.webkit.org/projects/webkit/changeset/24499&gt;, this is actually expected behavior. If you click on something other than a block of text, no selection should be made and you should see the Reload/View Source menu as you expected.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57029</commentid>
    <comment_count>3</comment_count>
    <who name="Darin Fisher (:fishd, Google)">fishd</who>
    <bug_when>2007-09-25 14:12:26 -0700</bug_when>
    <thetext>Really?  Even for hyperlinks?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57032</commentid>
    <comment_count>4</comment_count>
    <who name="Darin Fisher (:fishd, Google)">fishd</who>
    <bug_when>2007-09-25 14:23:50 -0700</bug_when>
    <thetext>This can&apos;t be wontfix.  At least it is very broken behavior on Windows.  Can we at least make it possible for embedders to define their own behavior here?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57035</commentid>
    <comment_count>5</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2007-09-25 14:29:39 -0700</bug_when>
    <thetext>The behaviour when ctrl-clicking on a link in WebKit differs from that in TextEdit, so I think this is worthy of some investigation.  Ctrl-clicking on a link in TextEdit selects the entire URL, while in WebKit it only selects the word under the cursor.  There may be issues with right-clicking on other platforms at well, but at the very least this issue exists on Mac OS as well.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57036</commentid>
    <comment_count>6</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2007-09-25 14:29:58 -0700</bug_when>
    <thetext>&lt;rdar://problem/5450655&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57038</commentid>
    <comment_count>7</comment_count>
    <who name="Matt Lilek">dev+webkit</who>
    <bug_when>2007-09-25 14:51:54 -0700</bug_when>
    <thetext>(In reply to comment #4)
&gt; At least it is very broken behavior on Windows.

ToT on Windows behaves the same as ToT on Mac for me in regards to selection behavior and the contents of the context menu, etc.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73232</commentid>
    <comment_count>8</comment_count>
    <who name="Robert Blaut">webkit</who>
    <bug_when>2008-03-10 13:18:58 -0700</bug_when>
    <thetext>*** Bug 17747 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73234</commentid>
    <comment_count>9</comment_count>
    <who name="Robert Blaut">webkit</who>
    <bug_when>2008-03-10 13:23:26 -0700</bug_when>
    <thetext>*** Bug 14399 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>76414</commentid>
    <comment_count>10</comment_count>
    <who name="Luca Bruno">lethalman88</who>
    <bug_when>2008-04-06 02:24:41 -0700</bug_when>
    <thetext>On the GTK+ port there&apos;s the same problem. When i right-click it selects the words before the cursor.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82415</commentid>
    <comment_count>11</comment_count>
    <who name="Robert Blaut">webkit</who>
    <bug_when>2008-06-06 03:24:29 -0700</bug_when>
    <thetext>*** Bug 19039 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98525</commentid>
    <comment_count>12</comment_count>
      <attachid>25104</attachid>
    <who name="Aaron Boodman">aa</who>
    <bug_when>2008-11-12 15:02:35 -0800</bug_when>
    <thetext>Created attachment 25104
Disables the word selection behavior for Chromium using an #ifdef.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98529</commentid>
    <comment_count>13</comment_count>
      <attachid>25104</attachid>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2008-11-12 15:11:46 -0800</bug_when>
    <thetext>Comment on attachment 25104
Disables the word selection behavior for Chromium using an #ifdef. 

You should set the review flag to &quot;r?&quot; for new patches to indicate that your patch is ready to review.

&gt; +2008-11-12  aa  &lt;set EMAIL_ADDRESS environment variable&gt;

You should set the EMAIL_ADDRESS environment variable so that prepare-ChangeLog can fill in your email address correctly. You should also set the CHANGE_LOG_NAME environment variable to the name you want used in ChangeLogs.

&gt; +
&gt; +        Reviewed by NOBODY (OOPS!).
&gt; +
&gt; +        * page/EventHandler.cpp:
&gt; +        (WebCore::EventHandler::sendContextMenuEvent):
&gt; +        
&gt; +        Disable word selection on context click for PLATFORM(CHROMIUM).

Normally we reference the Bugzilla bug we&apos;re fixing in the ChangeLog. Something like this:

Chromium fix for Bug 15279: Right clicking over text (or multiple spaces) auto selects the word (or multiple spaces) under it

&lt;https://bugs.webkit.org/show_bug.cgi?id=15279&gt;

&gt; @@ -1627,8 +1627,9 @@ bool EventHandler::sendContextMenuEvent(
&gt;      IntPoint viewportPos = v-&gt;windowToContents(event.pos());
&gt;      MouseEventWithHitTestResults mev = doc-&gt;prepareMouseEvent(HitTestRequest(false, true), viewportPos, event);
&gt;  
&gt; -    // Context menu events shouldn&apos;t select text in GTK+ applications.
&gt; -#if !PLATFORM(GTK)
&gt; +    // Context menu events shouldn&apos;t select text in GTK+ applications or in Chromium.
&gt; +    // TODO: This should probably be configurable by embedders. Consider making it a WebPreferences setting.

We normally use FIXME instead of TODO. If you have filed the bug for WebPreferences you could reference it here with a URL.

r=me

-Adam</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98538</commentid>
    <comment_count>14</comment_count>
    <who name="Aaron Boodman">aa</who>
    <bug_when>2008-11-12 15:28:51 -0800</bug_when>
    <thetext>Note: I talked about this on IRC with aroben. For now, we&apos;re going to change this using a macro, but in the future (perhaps when the Chromium mac team gets to this area), we should change it to use a WebPreferences setting.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98587</commentid>
    <comment_count>15</comment_count>
      <attachid>25117</attachid>
    <who name="Aaron Boodman">aa</who>
    <bug_when>2008-11-12 22:57:31 -0800</bug_when>
    <thetext>Created attachment 25117
Disables the word selection behavior for Chromium, take 2

New patch. I believe I&apos;ve addressed all your comments.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98615</commentid>
    <comment_count>16</comment_count>
      <attachid>25117</attachid>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2008-11-13 07:26:45 -0800</bug_when>
    <thetext>Comment on attachment 25117
Disables the word selection behavior for Chromium, take 2

&gt; Index: WebCore/ChangeLog
&gt; ===================================================================
&gt; --- WebCore/ChangeLog	(revision 38339)
&gt; +++ WebCore/ChangeLog	(working copy)
&gt; @@ -1,3 +1,16 @@
&gt; +2008-11-12  aa  aa@chromium.org

We normally use full names in ChangeLog headers, but this isn&apos;t a requirement.

r=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101048</commentid>
    <comment_count>17</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2008-12-02 12:38:33 -0800</bug_when>
    <thetext>Shouldn&apos;t this only be disabled for chromium on windows and linux?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105929</commentid>
    <comment_count>18</comment_count>
    <who name="Dimitri Glazkov (Google)">dglazkov</who>
    <bug_when>2009-01-15 11:31:25 -0800</bug_when>
    <thetext>Committed in https://bugs.webkit.org/show_bug.cgi?id=23351

New bug for solution with WebPreferences created: https://bugs.webkit.org/show_bug.cgi?id=23351</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>25104</attachid>
            <date>2008-11-12 15:02:35 -0800</date>
            <delta_ts>2008-12-02 12:38:04 -0800</delta_ts>
            <desc>Disables the word selection behavior for Chromium using an #ifdef. </desc>
            <filename>webkit_15279.patch</filename>
            <type>text/plain</type>
            <size>1614</size>
            <attacher name="Aaron Boodman">aa</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYkNvcmUvQ2hhbmdlTG9nCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIFdlYkNvcmUvQ2hhbmdlTG9n
CShyZXZpc2lvbiAzODMzOSkKKysrIFdlYkNvcmUvQ2hhbmdlTG9nCSh3b3JraW5nIGNvcHkpCkBA
IC0xLDMgKzEsMTIgQEAKKzIwMDgtMTEtMTIgIGFhICA8c2V0IEVNQUlMX0FERFJFU1MgZW52aXJv
bm1lbnQgdmFyaWFibGU+CisKKyAgICAgICAgUmV2aWV3ZWQgYnkgTk9CT0RZIChPT1BTISkuCisK
KyAgICAgICAgKiBwYWdlL0V2ZW50SGFuZGxlci5jcHA6CisgICAgICAgIChXZWJDb3JlOjpFdmVu
dEhhbmRsZXI6OnNlbmRDb250ZXh0TWVudUV2ZW50KToKKyAgICAgICAgCisgICAgICAgIERpc2Fi
bGUgd29yZCBzZWxlY3Rpb24gb24gY29udGV4dCBjbGljayBmb3IgUExBVEZPUk0oQ0hST01JVU0p
LgorCiAyMDA4LTExLTEyICBTaW1vbiBGcmFzZXIgIDxzaW1vbi5mcmFzZXJAYXBwbGUuY29tPgog
CiAgICAgICAgIFJldmlld2VkIGJ5IERhdmUgSHlhdHQKSW5kZXg6IFdlYkNvcmUvcGFnZS9FdmVu
dEhhbmRsZXIuY3BwCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIFdlYkNvcmUvcGFnZS9FdmVudEhhbmRsZXIuY3Bw
CShyZXZpc2lvbiAzODMxOCkKKysrIFdlYkNvcmUvcGFnZS9FdmVudEhhbmRsZXIuY3BwCSh3b3Jr
aW5nIGNvcHkpCkBAIC0xNjI3LDggKzE2MjcsOSBAQCBib29sIEV2ZW50SGFuZGxlcjo6c2VuZENv
bnRleHRNZW51RXZ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bXMK
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>25117</attachid>
            <date>2008-11-12 22:57:31 -0800</date>
            <delta_ts>2008-11-13 07:26:45 -0800</delta_ts>
            <desc>Disables the word selection behavior for Chromium, take 2</desc>
            <filename>webkit_15279.patch</filename>
            <type>text/plain</type>
            <size>1834</size>
            <attacher name="Aaron Boodman">aa</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYkNvcmUvQ2hhbmdlTG9nCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIFdlYkNvcmUvQ2hhbmdlTG9n
CShyZXZpc2lvbiAzODMzOSkKKysrIFdlYkNvcmUvQ2hhbmdlTG9nCSh3b3JraW5nIGNvcHkpCkBA
IC0xLDMgKzEsMTYgQEAKKzIwMDgtMTEtMTIgIGFhICBhYUBjaHJvbWl1bS5vcmcKKworICAgICAg
ICBSZXZpZXdlZCBieSBOT0JPRFkgKE9PUFMhKS4KKworICAgICAgICBodHRwczovL2J1Z3Mud2Vi
a2l0Lm9yZy9zaG93X2J1Zy5jZ2k/aWQ9MTUyNzkKKworICAgICAgICBDaHJvbWl1bSBmaXggZm9y
IEJ1ZyAxNTI3OTogUmlnaHQgY2xpY2tpbmcgb3ZlciB0ZXh0IChvciBtdWx0aXBsZSBzcGFjZXMp
IGF1dG8KKyAgICAgICAgc2VsZWN0cyB0aGUgd29yZCAob3IgbXVsdGlwbGUgc3BhY2VzKSB1bmRl
ciBpdAorCisgICAgICAgICogcGFnZS9FdmVudEhhbmRsZXIuY3BwOgorICAgICAgICAoV2ViQ29y
ZTo6RXZlbnRIYW5kbGVyOjpzZW5kQ29udGV4dE1lbnVFdmVudCk6CisgICAgICAgIERvbid0IHNl
bGVjdCB3b3JkcyBvbiByaWdodC1jbGljayBvbiBDaHJvbWl1bS4KKyAgICAgICAgCiAyMDA4LTEx
LTEyICBTaW1vbi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iBodHRwczovL2J1Z3Mud2Via2l0Lm9yZy9zaG93
X2J1Zy5jZ2k/aWQ9MTUyNzkKKyNpZiAhUExBVEZPUk0oR1RLKSAmJiAhUExBVEZPUk0oQ0hST01J
VU0pCiAgICAgaWYgKCFtX2ZyYW1lLT5zZWxlY3Rpb24oKS0+Y29udGFpbnModmlld3BvcnRQb3Mp
ICYmIAogICAgICAgICAvLyBGSVhNRTogSW4gdGhlIGVkaXRhYmxlIGNhc2UsIHdvcmQgc2VsZWN0
aW9uIHNvbWV0aW1lcyBzZWxlY3RzIGNvbnRlbnQgdGhhdCBpc24ndCB1bmRlcm5lYXRoIHRoZSBt
b3VzZS4KICAgICAgICAgLy8gSWYgdGhlIHNlbGVjdGlvbiBpcyBub24tZWRpdGFibGUsIHdlIGRv
IHdvcmQgc2VsZWN0aW9uIHRvIG1ha2UgaXQgZWFzaWVyIHRvIHVzZSB0aGUgY29udGV4dHVhbCBt
ZW51IGl0ZW1zCg==
</data>
<flag name="review"
          id="11567"
          type_id="1"
          status="+"
          setter="aroben"
    />
          </attachment>
      

    </bug>

</bugzilla>