<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Word transformations apply to a single word instead of entire selection if selection is made by triple-clicking"
   href="https://bugs.webkit.org/show_bug.cgi?id=164519">164519</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Word transformations apply to a single word instead of entire selection if selection is made by triple-clicking
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>WebKit
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>URL</th>
          <td>data:text/html,&lt;div%20contenteditable&gt;Triple-click%20this%20sentence,%20then%20control-click%20and%20choose%20Transformations%20&amp;gt;%20Make%20Upper%20Case
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Keywords</th>
          <td>InRadar
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P2
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>HTML Editing
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>webkit-unassigned&#64;lists.webkit.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>mitz&#64;webkit.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>&lt;rdar://problem/27487147&gt;

To reproduce:
Navigate to the URL, triple-click the sentence to select it, then control-click and choose Transformations &gt; Make Upper Case

Result:
Only the word in which the control-click occurred is transformed and stays selected

Note:
The implementation of word transformations begins with performing the SelectWord command. The intent is to expand the selection to encompass whole words (that’s how the command behaves in NSTextView). When made with a triple-click, the selection’s base and extent are the same (the position of the click). It then expands to a word around that position. This happens in the VisibleSelection::setStartAndEndFromBaseAndExtentRespectingGranularity call from VisibleSelection::validate. It seems like we need a different code path for expanding to a desired granularity.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>