<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 - Selection.deleteFromDocument should not leave a selection character"
   href="https://bugs.webkit.org/show_bug.cgi?id=151442">151442</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Selection.deleteFromDocument should not leave a selection character
          </td>
        </tr>

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

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

        <tr>
          <th>Version</th>
          <td>WebKit Local Build
          </td>
        </tr>

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

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

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

        <tr>
          <th>Keywords</th>
          <td>Gtk, LayoutTestFailure
          </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>cgarcia&#64;igalia.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>darin&#64;apple.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>This is what happens with test imported/blink/editing/selection/deleteFromDocument-crash.html. It first run selectAll in the focused text area, and removeFromDocument() leaves the last character of the selection in the text area. This is what is causing a failure in GTK+ and win ports. The reason why it passes for mac is because the mac editor behaviour considers selections as not directional. For non directional selections, FrameSelection::willBeModified() when direction is backwards switches the selection base extent. So, when the caret is moved once character backwards in the case of mac, the cursor position is 0 and it doesn't have any effect. For the other ports, the position is the last one (extent). This was fixed in blink r172511, so we could just merge it in WebKit.</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>