[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

ojan at chromium.org ojan at chromium.org
Thu Apr 8 02:20:57 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 0b530eb8cbbf2cebfbb6a43e1b9d30441a1a376c
Author: ojan at chromium.org <ojan at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Mar 12 18:18:40 2010 +0000

    2010-03-05  Ojan Vafai  <ojan at chromium.org>
    
            Reviewed by David Levin.
    
            Tests for smartdelete should only occur after double-click
            https://bugs.webkit.org/show_bug.cgi?id=35314
    
            Fixes the tests to make selections using the mouse in order
            to force smart-delete. It also adds/modifies tests to have them correctly
            identify cases where we are smart-deleting, but shouldn't be.
    
            Fixing to smart-delete only on mouse-based selections will be a followup patch.
    
            * editing/deleting/5390681-2.html:
            * editing/deleting/non-smart-delete.html: Added.
            * editing/deleting/smart-delete-001.html:
            * editing/deleting/smart-delete-002.html:
            * editing/deleting/smart-delete-003.html:
            * editing/deleting/smart-delete-004.html:
            * editing/editing.js:
            (doubleClick):
            (doubleClickAtSelectionStart):
            * editing/pasteboard/4944770-2.html:
            * editing/pasteboard/drag-drop-modifies-page.html:
            * editing/pasteboard/smart-drag-drop.html: Added.
            * editing/pasteboard/smart-paste-001.html:
            * editing/pasteboard/smart-paste-002.html:
            * editing/pasteboard/smart-paste-003.html:
            * editing/pasteboard/smart-paste-004.html:
            * editing/pasteboard/smart-paste-005.html:
            * editing/pasteboard/smart-paste-007.html:
            * editing/pasteboard/smart-paste-008.html:
            * editing/selection/delete-word-granularity-text-control-expected.txt: Added.
            * editing/selection/delete-word-granularity-text-control.html: Added.
            * editing/selection/script-tests/delete-word-granularity-text-control.js: Added.
            * editing/style/style-boundary-005.html:
            * platform/mac/editing/deleting/non-smart-delete-expected.checksum: Added.
            * platform/mac/editing/deleting/non-smart-delete-expected.png: Added.
            * platform/mac/editing/deleting/non-smart-delete-expected.txt: Added.
            * platform/mac/editing/deleting/smart-delete-001-expected.txt:
            * platform/mac/editing/deleting/smart-delete-002-expected.txt:
            * platform/mac/editing/deleting/smart-delete-003-expected.txt:
            * platform/mac/editing/deleting/smart-delete-004-expected.txt:
            * platform/mac/editing/pasteboard/drag-drop-modifies-page-expected.checksum:
            * platform/mac/editing/pasteboard/drag-drop-modifies-page-expected.png:
            * platform/mac/editing/pasteboard/drag-drop-modifies-page-expected.txt:
            * platform/mac/editing/pasteboard/smart-drag-drop-expected.checksum: Added.
            * platform/mac/editing/pasteboard/smart-drag-drop-expected.png: Added.
            * platform/mac/editing/pasteboard/smart-drag-drop-expected.txt: Added.
            * platform/mac/editing/pasteboard/smart-paste-001-expected.txt:
            * platform/mac/editing/pasteboard/smart-paste-002-expected.txt:
            * platform/mac/editing/pasteboard/smart-paste-003-expected.txt:
            * platform/mac/editing/pasteboard/smart-paste-004-expected.txt:
            * platform/mac/editing/pasteboard/smart-paste-005-expected.txt:
            * platform/mac/editing/pasteboard/smart-paste-007-expected.txt:
            * platform/mac/editing/pasteboard/smart-paste-008-expected.txt:
            * platform/mac/editing/style/style-boundary-005-expected.checksum:
            * platform/mac/editing/style/style-boundary-005-expected.png:
            * platform/mac/editing/style/style-boundary-005-expected.txt:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55913 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 18c4937..fce7bfb 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,63 @@
+2010-03-05  Ojan Vafai  <ojan at chromium.org>
+
+        Reviewed by David Levin.
+
+        Tests for smartdelete should only occur after double-click
+        https://bugs.webkit.org/show_bug.cgi?id=35314
+
+        Fixes the tests to make selections using the mouse in order
+        to force smart-delete. It also adds/modifies tests to have them correctly
+        identify cases where we are smart-deleting, but shouldn't be.
+
+        Fixing to smart-delete only on mouse-based selections will be a followup patch.
+
+        * editing/deleting/5390681-2.html:
+        * editing/deleting/non-smart-delete.html: Added.
+        * editing/deleting/smart-delete-001.html:
+        * editing/deleting/smart-delete-002.html:
+        * editing/deleting/smart-delete-003.html:
+        * editing/deleting/smart-delete-004.html:
+        * editing/editing.js:
+        (doubleClick):
+        (doubleClickAtSelectionStart):
+        * editing/pasteboard/4944770-2.html:
+        * editing/pasteboard/drag-drop-modifies-page.html:
+        * editing/pasteboard/smart-drag-drop.html: Added.
+        * editing/pasteboard/smart-paste-001.html:
+        * editing/pasteboard/smart-paste-002.html:
+        * editing/pasteboard/smart-paste-003.html:
+        * editing/pasteboard/smart-paste-004.html:
+        * editing/pasteboard/smart-paste-005.html:
+        * editing/pasteboard/smart-paste-007.html:
+        * editing/pasteboard/smart-paste-008.html:
+        * editing/selection/delete-word-granularity-text-control-expected.txt: Added.
+        * editing/selection/delete-word-granularity-text-control.html: Added.
+        * editing/selection/script-tests/delete-word-granularity-text-control.js: Added.
+        * editing/style/style-boundary-005.html:
+        * platform/mac/editing/deleting/non-smart-delete-expected.checksum: Added.
+        * platform/mac/editing/deleting/non-smart-delete-expected.png: Added.
+        * platform/mac/editing/deleting/non-smart-delete-expected.txt: Added.
+        * platform/mac/editing/deleting/smart-delete-001-expected.txt:
+        * platform/mac/editing/deleting/smart-delete-002-expected.txt:
+        * platform/mac/editing/deleting/smart-delete-003-expected.txt:
+        * platform/mac/editing/deleting/smart-delete-004-expected.txt:
+        * platform/mac/editing/pasteboard/drag-drop-modifies-page-expected.checksum:
+        * platform/mac/editing/pasteboard/drag-drop-modifies-page-expected.png:
+        * platform/mac/editing/pasteboard/drag-drop-modifies-page-expected.txt:
+        * platform/mac/editing/pasteboard/smart-drag-drop-expected.checksum: Added.
+        * platform/mac/editing/pasteboard/smart-drag-drop-expected.png: Added.
+        * platform/mac/editing/pasteboard/smart-drag-drop-expected.txt: Added.
+        * platform/mac/editing/pasteboard/smart-paste-001-expected.txt:
+        * platform/mac/editing/pasteboard/smart-paste-002-expected.txt:
+        * platform/mac/editing/pasteboard/smart-paste-003-expected.txt:
+        * platform/mac/editing/pasteboard/smart-paste-004-expected.txt:
+        * platform/mac/editing/pasteboard/smart-paste-005-expected.txt:
+        * platform/mac/editing/pasteboard/smart-paste-007-expected.txt:
+        * platform/mac/editing/pasteboard/smart-paste-008-expected.txt:
+        * platform/mac/editing/style/style-boundary-005-expected.checksum:
+        * platform/mac/editing/style/style-boundary-005-expected.png:
+        * platform/mac/editing/style/style-boundary-005-expected.txt:
+
 2010-03-12  Dan Bernstein  <mitz at apple.com>
 
         Reviewed by Darin Adler.
diff --git a/LayoutTests/editing/deleting/5390681-2.html b/LayoutTests/editing/deleting/5390681-2.html
index e3b06a8..997707e 100644
--- a/LayoutTests/editing/deleting/5390681-2.html
+++ b/LayoutTests/editing/deleting/5390681-2.html
@@ -4,8 +4,12 @@
 
 <script>
 var div = document.getElementById("div");
-var sel = window.getSelection();
-sel.setPosition(div, 0);
-sel.modify("extend", "forward", "word");
+var x = div.offsetLeft;
+var y = div.offsetTop;
+eventSender.mouseMoveTo(x, y);
+eventSender.mouseDown();
+eventSender.mouseUp();
+eventSender.mouseDown();
+eventSender.mouseUp();
 document.execCommand("Delete");
 </script>
diff --git a/LayoutTests/editing/deleting/non-smart-delete.html b/LayoutTests/editing/deleting/non-smart-delete.html
new file mode 100644
index 0000000..bb7b002
--- /dev/null
+++ b/LayoutTests/editing/deleting/non-smart-delete.html
@@ -0,0 +1,60 @@
+<html> 
+<head>
+
+<style>
+.editing { 
+    border: 2px solid red; 
+    font-size: 24px; 
+}
+.explanation { 
+    border: 2px solid blue; 
+    padding: 12px; 
+    font-size: 24px; 
+    margin-bottom: 24px;
+}
+.scenario { margin-bottom: 16px;}
+.scenario:first-line { font-weight: bold; margin-bottom: 16px;}
+.expected-results:first-line { font-weight: bold }
+</style>
+<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
+
+<script>
+
+function editingTest() {
+    extendSelectionForwardByWordCommand();
+    deleteCommand();
+}
+
+</script>
+
+<title>Editing Test</title> 
+</head> 
+<body>
+
+<div class="explanation">
+<div class="scenario">
+Tests: 
+<br>
+Non-smart delete when deleting a word selected via the keyboard.
+</div>
+<div class="expected-results">
+Expected Results:
+<br>
+The first word should be deleted. The space following it should remain. It should look like this (currently this is broken and the space is deleted https://bugs.webkit.org/show_bug.cgi?id=35314):
+<BR>
+" bar baz"
+</div>
+</div>
+
+<div contenteditable id="root" style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space;">
+<div id="test" class="editing">
+foo bar baz
+</div>
+</div>
+
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>
diff --git a/LayoutTests/editing/deleting/smart-delete-001.html b/LayoutTests/editing/deleting/smart-delete-001.html
index b48ec24..9b8adc1 100644
--- a/LayoutTests/editing/deleting/smart-delete-001.html
+++ b/LayoutTests/editing/deleting/smart-delete-001.html
@@ -21,7 +21,7 @@
 <script>
 
 function editingTest() {
-    extendSelectionForwardByWordCommand();
+    doubleClickAtSelectionStart();
     deleteCommand();
 }
 
diff --git a/LayoutTests/editing/deleting/smart-delete-002.html b/LayoutTests/editing/deleting/smart-delete-002.html
index 54a550d..be23f2c 100644
--- a/LayoutTests/editing/deleting/smart-delete-002.html
+++ b/LayoutTests/editing/deleting/smart-delete-002.html
@@ -23,7 +23,7 @@
 function editingTest() {
     moveSelectionForwardByWordCommand();
     moveSelectionForwardByCharacterCommand();
-    extendSelectionForwardByWordCommand();
+    doubleClickAtSelectionStart();
     deleteCommand();
 }
 
diff --git a/LayoutTests/editing/deleting/smart-delete-003.html b/LayoutTests/editing/deleting/smart-delete-003.html
index cebcb07..b4a6874 100644
--- a/LayoutTests/editing/deleting/smart-delete-003.html
+++ b/LayoutTests/editing/deleting/smart-delete-003.html
@@ -2,18 +2,14 @@
 if (window.layoutTestController)
      layoutTestController.dumpEditingCallbacks();
 </script>
-<p>This tests deleting a selection created with a word granularity.  To run it manually, double click on 'bar' and hit delete.  You should see 'foo bar'.</p>
-<div id="div" contenteditable="true">foo bar baz</div>
+<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
+<p>This tests deleting a selection created with a word granularity.  To run it manually, double click on 'bar' and hit delete.  You should see 'foo baz'.</p>
+<div id="div" contenteditable="true">foo b<span id="target">a</span>r baz</div>
 
 <script>
 if (window.layoutTestController) {
-    var div = document.getElementById("div");
-    var sel = window.getSelection();
-    
-    sel.setPosition(div, 0);
-    sel.modify("move", "forward", "word");
-    sel.modify("move", "forward", "word");
-    sel.modify("extend", "backward", "word");
+    var target = document.getElementById("target");
+    doubleClick(target.offsetLeft, target.offsetTop);
     layoutTestController.execCommand("DeleteBackward");
 }
 </script>
diff --git a/LayoutTests/editing/deleting/smart-delete-004.html b/LayoutTests/editing/deleting/smart-delete-004.html
index 580fcf0..da70c47 100644
--- a/LayoutTests/editing/deleting/smart-delete-004.html
+++ b/LayoutTests/editing/deleting/smart-delete-004.html
@@ -2,18 +2,14 @@
 if (window.layoutTestController)
      layoutTestController.dumpEditingCallbacks();
 </script>
-<p>This tests deleting a selection created with a word granularity.  To run it manually, double click on 'bar' and hit forward delete.  You should see 'foo bar'.</p>
-<div id="div" contenteditable="true">foo bar baz</div>
+<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
+<p>This tests deleting a selection created with a word granularity.  To run it manually, double click on 'bar' and hit forward delete.  You should see 'foo baz'.</p>
+<div id="div" contenteditable="true">foo b<span id="target">a</span>r baz</div>
 
 <script>
 if (window.layoutTestController) {
-    var div = document.getElementById("div");
-    var sel = window.getSelection();
-    
-    sel.setPosition(div, 0);
-    sel.modify("move", "forward", "word");
-    sel.modify("move", "forward", "word");
-    sel.modify("extend", "backward", "word");
+    var target = document.getElementById("target");
+    doubleClick(target.offsetLeft, target.offsetTop);
     layoutTestController.execCommand("DeleteForward");
 }
 </script>
diff --git a/LayoutTests/editing/editing.js b/LayoutTests/editing/editing.js
index f1b80dd..53b32f6 100644
--- a/LayoutTests/editing/editing.js
+++ b/LayoutTests/editing/editing.js
@@ -339,6 +339,23 @@ function moveSelectionBackwardByLineBoundaryCommand() {
 
 //-------------------------------------------------------------------------------------------------------
 
+function doubleClick(x, y) {
+    eventSender.mouseMoveTo(x, y);
+    eventSender.mouseDown();
+    eventSender.mouseUp();
+    eventSender.mouseDown();
+    eventSender.mouseUp();
+}
+
+function doubleClickAtSelectionStart() {
+    var rects = window.getSelection().getRangeAt(0).getClientRects();
+    var x = rects[0].left;
+    var y = rects[0].top;
+    doubleClick(x, y);
+}
+
+//-------------------------------------------------------------------------------------------------------
+
 function execBoldCommand() {
     document.execCommand("Bold");
     debugForDumpAsText("execBoldCommand");
diff --git a/LayoutTests/editing/pasteboard/4944770-2.html b/LayoutTests/editing/pasteboard/4944770-2.html
index bbb3ca2..afcee76 100644
--- a/LayoutTests/editing/pasteboard/4944770-2.html
+++ b/LayoutTests/editing/pasteboard/4944770-2.html
@@ -1,16 +1,16 @@
+<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
+
 <p>This tests smart paste of a fragment that ends in a select element.  There should be spaces added before and after the inserted content.</p>
 <div contenteditable="true" id="copy"><select><option>1</option><option>2</option><option>3</option></select></div>
 <div contenteditable="true" id="paste">xx</div>
 
 <script>
 var copy = document.getElementById("copy");
-var paste = document.getElementById("paste");
-var sel = window.getSelection();
-
-sel.setPosition(copy, 0);
-sel.modify("extend", "forward", "word");
+doubleClick(copy.offsetLeft, copy.offsetTop);
 document.execCommand("Copy");
 
+var paste = document.getElementById("paste");
+var sel = window.getSelection();
 sel.setPosition(paste, 0);
 sel.modify("move", "forward", "character");
 document.execCommand("Paste");
diff --git a/LayoutTests/editing/pasteboard/drag-drop-modifies-page.html b/LayoutTests/editing/pasteboard/drag-drop-modifies-page.html
index 710821a..71baf46 100644
--- a/LayoutTests/editing/pasteboard/drag-drop-modifies-page.html
+++ b/LayoutTests/editing/pasteboard/drag-drop-modifies-page.html
@@ -28,7 +28,9 @@ function editingTest() {
 <title>Drag and drop within a text input field modifies page</title> 
 </head> 
 <body>
-<p>This test does a drag and drop such that the selection around the dragged word is no longer in the document on the drop.</p>
+<p>This tests non-smartmove drag/drop. The space should be deleted on move,
+but not reinserted on drop, resulting in "worldhello". Currently there's a bug
+(https://bugs.webkit.org/show_bug.cgi?id=35314) where the space is reinserted on drop.</p>
 <div contenteditable="true" id="test"><span id="dragme">hello</span> world</div>
 <script>runEditingTest();</script>
 </body>
diff --git a/LayoutTests/editing/pasteboard/smart-drag-drop.html b/LayoutTests/editing/pasteboard/smart-drag-drop.html
new file mode 100644
index 0000000..213045d
--- /dev/null
+++ b/LayoutTests/editing/pasteboard/smart-drag-drop.html
@@ -0,0 +1,30 @@
+<html> 
+<head>
+<script src=../editing.js type="text/javascript"></script>
+<script>
+function editingTest() {
+  
+    if (!window.eventSender)
+        return;
+    doubleClickAtSelectionStart();
+
+    // Drag 'hello'
+    var e = document.getElementById("dragme");
+    x = e.offsetLeft;
+    y = e.offsetTop + e.offsetHeight / 2;
+    eventSender.mouseMoveTo(x, y);
+    eventSender.mouseDown();
+    // and drop it off to the right somewhere.
+    eventSender.leapForward(500);
+    eventSender.mouseMoveTo(x + 300, y);
+    eventSender.mouseUp();
+}
+</script>
+<title>Drag and drop within a text input field modifies page</title> 
+</head> 
+<body>
+<p>Tests that drag/drop after double-click does a smart drag. Specifically the end result should have a space: "world hello". To test manually double click on the "hello" and drag it to after "world".</p>
+<div contenteditable="true" id="test"><span id="dragme">hello</span> world</div>
+<script>runEditingTest();</script>
+</body>
+</html>
diff --git a/LayoutTests/editing/pasteboard/smart-paste-001.html b/LayoutTests/editing/pasteboard/smart-paste-001.html
index 86a9e47..4465a73 100644
--- a/LayoutTests/editing/pasteboard/smart-paste-001.html
+++ b/LayoutTests/editing/pasteboard/smart-paste-001.html
@@ -21,7 +21,7 @@
 <script>
 
 function editingTest() {
-    extendSelectionForwardByWordCommand();
+    doubleClickAtSelectionStart();
     copyCommand();
     moveSelectionForwardByCharacterCommand();
     pasteCommand();
diff --git a/LayoutTests/editing/pasteboard/smart-paste-002.html b/LayoutTests/editing/pasteboard/smart-paste-002.html
index e401f1e..3847a3c 100644
--- a/LayoutTests/editing/pasteboard/smart-paste-002.html
+++ b/LayoutTests/editing/pasteboard/smart-paste-002.html
@@ -21,7 +21,7 @@
 <script>
 
 function editingTest() {
-    extendSelectionForwardByWordCommand();
+    doubleClickAtSelectionStart();
     copyCommand();
     moveSelectionBackwardByWordCommand();
     pasteCommand();
diff --git a/LayoutTests/editing/pasteboard/smart-paste-003.html b/LayoutTests/editing/pasteboard/smart-paste-003.html
index ae68d76..0f60f39 100644
--- a/LayoutTests/editing/pasteboard/smart-paste-003.html
+++ b/LayoutTests/editing/pasteboard/smart-paste-003.html
@@ -21,7 +21,7 @@
 <script>
 
 function editingTest() {
-    extendSelectionForwardByWordCommand();
+    doubleClickAtSelectionStart();
     copyCommand();
     moveSelectionForwardByCharacterCommand();
     pasteCommand();
diff --git a/LayoutTests/editing/pasteboard/smart-paste-004.html b/LayoutTests/editing/pasteboard/smart-paste-004.html
index 3c2257a..02b73f5 100644
--- a/LayoutTests/editing/pasteboard/smart-paste-004.html
+++ b/LayoutTests/editing/pasteboard/smart-paste-004.html
@@ -21,7 +21,7 @@
 <script>
 
 function editingTest() {
-    extendSelectionForwardByWordCommand();
+    doubleClickAtSelectionStart();
     copyCommand();
     moveSelectionForwardByCharacterCommand();
     moveSelectionForwardByCharacterCommand();
diff --git a/LayoutTests/editing/pasteboard/smart-paste-005.html b/LayoutTests/editing/pasteboard/smart-paste-005.html
index 17d1c15..6a35699 100644
--- a/LayoutTests/editing/pasteboard/smart-paste-005.html
+++ b/LayoutTests/editing/pasteboard/smart-paste-005.html
@@ -21,7 +21,7 @@
 <script>
 
 function editingTest() {
-    extendSelectionForwardByWordCommand();
+    doubleClickAtSelectionStart();
     copyCommand();
     moveSelectionBackwardByWordCommand();
     moveSelectionForwardByCharacterCommand();
diff --git a/LayoutTests/editing/pasteboard/smart-paste-007.html b/LayoutTests/editing/pasteboard/smart-paste-007.html
index bcc85d5..79aa070 100644
--- a/LayoutTests/editing/pasteboard/smart-paste-007.html
+++ b/LayoutTests/editing/pasteboard/smart-paste-007.html
@@ -21,7 +21,7 @@
 <script>
 
 function editingTest() {
-    extendSelectionForwardByWordCommand();
+    doubleClickAtSelectionStart();
     cutCommand();
     typeCharacterCommand('.');
     typeCharacterCommand('.');
diff --git a/LayoutTests/editing/pasteboard/smart-paste-008.html b/LayoutTests/editing/pasteboard/smart-paste-008.html
index de879ed..68cc8db 100644
--- a/LayoutTests/editing/pasteboard/smart-paste-008.html
+++ b/LayoutTests/editing/pasteboard/smart-paste-008.html
@@ -12,7 +12,7 @@ var s = window.getSelection();
 var e = document.getElementById("test");
 
 setSelectionCommand(e, 0, e, 0);
-extendSelectionForwardByWordCommand();
+doubleClickAtSelectionStart();
 copyCommand();
 moveSelectionBackwardByCharacterCommand();
 moveSelectionForwardByCharacterCommand();
diff --git a/LayoutTests/editing/selection/delete-word-granularity-text-control-expected.txt b/LayoutTests/editing/selection/delete-word-granularity-text-control-expected.txt
new file mode 100644
index 0000000..682266a
--- /dev/null
+++ b/LayoutTests/editing/selection/delete-word-granularity-text-control-expected.txt
@@ -0,0 +1,10 @@
+Test that setSelectedRange resets the selection granularity to CharacterGranularity.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS PASSED
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/editing/selection/delete-word-granularity-text-control.html b/LayoutTests/editing/selection/delete-word-granularity-text-control.html
new file mode 100644
index 0000000..65bdd7d
--- /dev/null
+++ b/LayoutTests/editing/selection/delete-word-granularity-text-control.html
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+<script src="resources/js-test-selection-shared.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/delete-word-granularity-text-control.js"></script>
+<script src="../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/editing/selection/script-tests/delete-word-granularity-text-control.js b/LayoutTests/editing/selection/script-tests/delete-word-granularity-text-control.js
new file mode 100644
index 0000000..b77ff1e
--- /dev/null
+++ b/LayoutTests/editing/selection/script-tests/delete-word-granularity-text-control.js
@@ -0,0 +1,28 @@
+description("Test that setSelectedRange resets the selection granularity to CharacterGranularity.");
+
+var textarea = document.createElement('textarea');
+textarea.value = "foo bar baz";
+document.body.appendChild(textarea);
+
+var rect = textarea.getBoundingClientRect();
+var x = rect.left + 10;
+var y = rect.top + 10;
+if (window.eventSender) {
+    eventSender.mouseMoveTo(x, y);
+    eventSender.mouseDown();
+    eventSender.mouseUp();
+    eventSender.mouseDown();
+    eventSender.mouseUp();
+}
+
+textarea.setSelectionRange(0, 3);
+document.execCommand('delete');
+
+// Calling setSelectionRange should reset the granularity to CharacterGranularity, which means
+// execCommand('delete') should *not* do a smart delete.
+if (textarea.value == " bar baz")
+    testPassed("PASSED");
+else
+    testFailed("FAILED. textarea value should be \" bar baz\" and was \"" + textarea.value + "\"");
+    
+var successfullyParsed = true;
diff --git a/LayoutTests/editing/style/style-boundary-005.html b/LayoutTests/editing/style/style-boundary-005.html
index dd75d99..232cc00 100644
--- a/LayoutTests/editing/style/style-boundary-005.html
+++ b/LayoutTests/editing/style/style-boundary-005.html
@@ -51,7 +51,9 @@ Pasting at style boundary does not crash or produce empty style span(s).
 <div class="expected-results">
 Expected Results:
 <br>
-Should see this content in the red box below: <br><div>one two three <b>four</b> one</div>
+Should see this content in the red box below (currently there's a bug where
+there is an extra space after the bold element https://bugs.webkit.org/show_bug.cgi?id=35314):
+<br><div>one two three <b>four</b>one</div>
 </div>
 </div>
 
diff --git a/LayoutTests/platform/mac/editing/deleting/non-smart-delete-expected.checksum b/LayoutTests/platform/mac/editing/deleting/non-smart-delete-expected.checksum
new file mode 100644
index 0000000..cb42068
--- /dev/null
+++ b/LayoutTests/platform/mac/editing/deleting/non-smart-delete-expected.checksum
@@ -0,0 +1 @@
+25614efd3493758eb76da8f4748cdd48
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/editing/deleting/non-smart-delete-expected.png b/LayoutTests/platform/mac/editing/deleting/non-smart-delete-expected.png
new file mode 100644
index 0000000..1323c3d
Binary files /dev/null and b/LayoutTests/platform/mac/editing/deleting/non-smart-delete-expected.png differ
diff --git a/LayoutTests/platform/mac/editing/deleting/non-smart-delete-expected.txt b/LayoutTests/platform/mac/editing/deleting/non-smart-delete-expected.txt
new file mode 100644
index 0000000..17bec17
--- /dev/null
+++ b/LayoutTests/platform/mac/editing/deleting/non-smart-delete-expected.txt
@@ -0,0 +1,36 @@
+EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 3 of DIV > BODY > HTML > #document
+EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: shouldDeleteDOMRange:range from 1 of #text > DIV > DIV > BODY > HTML > #document to 4 of #text > DIV > DIV > BODY > HTML > #document
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > DIV > DIV > BODY > HTML > #document to 4 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderBlock {DIV} at (0,0) size 784x240 [border: (2px solid #0000FF)]
+        RenderBlock {DIV} at (14,14) size 756x56
+          RenderText {#text} at (0,0) size 67x28
+            text run at (0,0) width 67: "Tests: "
+          RenderBR {BR} at (0,0) size 0x0
+          RenderText {#text} at (0,28) size 642x28
+            text run at (0,28) width 642: "Non-smart delete when deleting a word selected via the keyboard."
+        RenderBlock {DIV} at (14,86) size 756x140
+          RenderText {#text} at (0,0) size 189x28
+            text run at (0,0) width 189: "Expected Results: "
+          RenderBR {BR} at (189,22) size 0x0
+          RenderText {#text} at (0,28) size 715x84
+            text run at (0,28) width 715: "The first word should be deleted. The space following it should remain. It"
+            text run at (0,56) width 671: "should look like this (currently this is broken and the space is deleted"
+            text run at (0,84) width 489: "https://bugs.webkit.org/show_bug.cgi?id=35314): "
+          RenderBR {BR} at (489,106) size 0x0
+          RenderText {#text} at (0,112) size 97x28
+            text run at (0,112) width 97: "\" bar baz\""
+      RenderBlock {DIV} at (0,264) size 784x32
+        RenderBlock {DIV} at (0,0) size 784x32 [border: (2px solid #FF0000)]
+          RenderText {#text} at (2,2) size 71x28
+            text run at (2,2) width 71: "bar baz"
+caret: position 0 of child 0 {#text} of child 1 {DIV} of child 3 {DIV} of child 1 {BODY} of child 0 {HTML} of document
diff --git a/LayoutTests/platform/mac/editing/deleting/smart-delete-001-expected.txt b/LayoutTests/platform/mac/editing/deleting/smart-delete-001-expected.txt
index d5e0dd1..9226eda 100644
--- a/LayoutTests/platform/mac/editing/deleting/smart-delete-001-expected.txt
+++ b/LayoutTests/platform/mac/editing/deleting/smart-delete-001-expected.txt
@@ -1,6 +1,8 @@
 EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 3 of DIV > BODY > HTML > #document
 EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document toDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document toDOMRange:range from 1 of #text > DIV > DIV > BODY > HTML > #document to 4 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: shouldDeleteDOMRange:range from 1 of #text > DIV > DIV > BODY > HTML > #document to 4 of #text > DIV > DIV > BODY > HTML > #document
 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > DIV > DIV > BODY > HTML > #document to 4 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
diff --git a/LayoutTests/platform/mac/editing/deleting/smart-delete-002-expected.txt b/LayoutTests/platform/mac/editing/deleting/smart-delete-002-expected.txt
index 94ad28f..5fd78bc 100644
--- a/LayoutTests/platform/mac/editing/deleting/smart-delete-002-expected.txt
+++ b/LayoutTests/platform/mac/editing/deleting/smart-delete-002-expected.txt
@@ -3,6 +3,8 @@ EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 5 of #text > DIV > DIV > BODY > HTML > #document to 5 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 5 of #text > DIV > DIV > BODY > HTML > #document to 5 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 5 of #text > DIV > DIV > BODY > HTML > #document to 5 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 5 of #text > DIV > DIV > BODY > HTML > #document to 8 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: shouldDeleteDOMRange:range from 5 of #text > DIV > DIV > BODY > HTML > #document to 8 of #text > DIV > DIV > BODY > HTML > #document
 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 5 of #text > DIV > DIV > BODY > HTML > #document to 8 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 4 of #text > DIV > DIV > BODY > HTML > #document to 4 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
diff --git a/LayoutTests/platform/mac/editing/deleting/smart-delete-003-expected.checksum b/LayoutTests/platform/mac/editing/deleting/smart-delete-003-expected.checksum
index 2eebb53..64f1675 100644
--- a/LayoutTests/platform/mac/editing/deleting/smart-delete-003-expected.checksum
+++ b/LayoutTests/platform/mac/editing/deleting/smart-delete-003-expected.checksum
@@ -1 +1 @@
-86e094b3faeb114b143eeb37b7da99c3
\ No newline at end of file
+332417cd71caff5eba3d201c46fd3e9e
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/editing/deleting/smart-delete-003-expected.png b/LayoutTests/platform/mac/editing/deleting/smart-delete-003-expected.png
index 3f5aa42..a56a707 100644
Binary files a/LayoutTests/platform/mac/editing/deleting/smart-delete-003-expected.png and b/LayoutTests/platform/mac/editing/deleting/smart-delete-003-expected.png differ
diff --git a/LayoutTests/platform/mac/editing/deleting/smart-delete-003-expected.txt b/LayoutTests/platform/mac/editing/deleting/smart-delete-003-expected.txt
index f83c73a..9d360d9 100644
--- a/LayoutTests/platform/mac/editing/deleting/smart-delete-003-expected.txt
+++ b/LayoutTests/platform/mac/editing/deleting/smart-delete-003-expected.txt
@@ -1,11 +1,11 @@
-EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 1 of DIV > BODY > HTML > #document
+EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 3 of DIV > BODY > HTML > #document
 EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
+EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 5 of #text > DIV > BODY > HTML > #document to 5 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 5 of #text > DIV > BODY > HTML > #document to 5 of #text > DIV > BODY > HTML > #document toDOMRange:range from 4 of #text > DIV > BODY > HTML > #document to 1 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: shouldDeleteDOMRange:range from 4 of #text > DIV > BODY > HTML > #document to 7 of #text > DIV > BODY > HTML > #document
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 4 of #text > DIV > BODY > HTML > #document to 7 of #text > DIV > BODY > HTML > #document toDOMRange:range from 3 of #text > DIV > BODY > HTML > #document to 3 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: shouldDeleteDOMRange:range from 4 of #text > DIV > BODY > HTML > #document to 1 of #text > DIV > BODY > HTML > #document
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of #text > DIV > BODY > HTML > #document to 1 of #text > DIV > BODY > HTML > #document toDOMRange:range from 3 of #text > DIV > BODY > HTML > #document to 3 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
 layer at (0,0) size 800x600
@@ -18,8 +18,10 @@ layer at (0,0) size 800x600
           text run at (0,0) width 392: "This tests deleting a selection created with a word granularity. "
           text run at (392,0) width 348: "To run it manually, double click on 'bar' and hit delete. "
           text run at (740,0) width 28: "You"
-          text run at (0,18) width 125: "should see 'foo bar'."
+          text run at (0,18) width 127: "should see 'foo baz'."
       RenderBlock {DIV} at (0,52) size 784x18
-        RenderText {#text} at (0,0) size 47x18
-          text run at (0,0) width 47: "foo baz"
+        RenderText {#text} at (0,0) size 21x18
+          text run at (0,0) width 21: "foo"
+        RenderText {#text} at (21,0) size 26x18
+          text run at (21,0) width 26: " baz"
 caret: position 3 of child 0 {#text} of child 2 {DIV} of child 1 {BODY} of child 0 {HTML} of document
diff --git a/LayoutTests/platform/mac/editing/deleting/smart-delete-004-expected.checksum b/LayoutTests/platform/mac/editing/deleting/smart-delete-004-expected.checksum
index 4ac8716..7614eb1 100644
--- a/LayoutTests/platform/mac/editing/deleting/smart-delete-004-expected.checksum
+++ b/LayoutTests/platform/mac/editing/deleting/smart-delete-004-expected.checksum
@@ -1 +1 @@
-0a5c2b2b7bad40c81b0e4debae824225
\ No newline at end of file
+525ceb25cf121ec5a32160f68cfef2b8
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/editing/deleting/smart-delete-004-expected.png b/LayoutTests/platform/mac/editing/deleting/smart-delete-004-expected.png
index 83cd895..136a793 100644
Binary files a/LayoutTests/platform/mac/editing/deleting/smart-delete-004-expected.png and b/LayoutTests/platform/mac/editing/deleting/smart-delete-004-expected.png differ
diff --git a/LayoutTests/platform/mac/editing/deleting/smart-delete-004-expected.txt b/LayoutTests/platform/mac/editing/deleting/smart-delete-004-expected.txt
index fd10089..0f29713 100644
--- a/LayoutTests/platform/mac/editing/deleting/smart-delete-004-expected.txt
+++ b/LayoutTests/platform/mac/editing/deleting/smart-delete-004-expected.txt
@@ -1,11 +1,11 @@
-EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 1 of DIV > BODY > HTML > #document
+EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 3 of DIV > BODY > HTML > #document
 EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
+EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 5 of #text > DIV > BODY > HTML > #document to 5 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 5 of #text > DIV > BODY > HTML > #document to 5 of #text > DIV > BODY > HTML > #document toDOMRange:range from 4 of #text > DIV > BODY > HTML > #document to 1 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: shouldDeleteDOMRange:range from 4 of #text > DIV > BODY > HTML > #document to 7 of #text > DIV > BODY > HTML > #document
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 4 of #text > DIV > BODY > HTML > #document to 7 of #text > DIV > BODY > HTML > #document toDOMRange:range from 3 of #text > DIV > BODY > HTML > #document to 3 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: shouldDeleteDOMRange:range from 4 of #text > DIV > BODY > HTML > #document to 1 of #text > DIV > BODY > HTML > #document
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of #text > DIV > BODY > HTML > #document to 1 of #text > DIV > BODY > HTML > #document toDOMRange:range from 3 of #text > DIV > BODY > HTML > #document to 3 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
 layer at (0,0) size 800x600
@@ -18,8 +18,10 @@ layer at (0,0) size 800x600
           text run at (0,0) width 392: "This tests deleting a selection created with a word granularity. "
           text run at (392,0) width 353: "To run it manually, double click on 'bar' and hit forward"
           text run at (0,18) width 45: "delete. "
-          text run at (45,18) width 157: "You should see 'foo bar'."
+          text run at (45,18) width 159: "You should see 'foo baz'."
       RenderBlock {DIV} at (0,52) size 784x18
-        RenderText {#text} at (0,0) size 47x18
-          text run at (0,0) width 47: "foo baz"
+        RenderText {#text} at (0,0) size 21x18
+          text run at (0,0) width 21: "foo"
+        RenderText {#text} at (21,0) size 26x18
+          text run at (21,0) width 26: " baz"
 caret: position 3 of child 0 {#text} of child 2 {DIV} of child 1 {BODY} of child 0 {HTML} of document
diff --git a/LayoutTests/platform/mac/editing/pasteboard/drag-drop-modifies-page-expected.checksum b/LayoutTests/platform/mac/editing/pasteboard/drag-drop-modifies-page-expected.checksum
index 05ee4df..3aa29a0 100644
--- a/LayoutTests/platform/mac/editing/pasteboard/drag-drop-modifies-page-expected.checksum
+++ b/LayoutTests/platform/mac/editing/pasteboard/drag-drop-modifies-page-expected.checksum
@@ -1 +1 @@
-92646eb03b7f57331e21b2307263446e
\ No newline at end of file
+3d3191296d52f9a79e4d6cc041582b91
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/editing/pasteboard/drag-drop-modifies-page-expected.png b/LayoutTests/platform/mac/editing/pasteboard/drag-drop-modifies-page-expected.png
index 075a1fa..e4348a5 100644
Binary files a/LayoutTests/platform/mac/editing/pasteboard/drag-drop-modifies-page-expected.png and b/LayoutTests/platform/mac/editing/pasteboard/drag-drop-modifies-page-expected.png differ
diff --git a/LayoutTests/platform/mac/editing/pasteboard/drag-drop-modifies-page-expected.txt b/LayoutTests/platform/mac/editing/pasteboard/drag-drop-modifies-page-expected.txt
index 7072fc5..f08e9ca 100644
--- a/LayoutTests/platform/mac/editing/pasteboard/drag-drop-modifies-page-expected.txt
+++ b/LayoutTests/platform/mac/editing/pasteboard/drag-drop-modifies-page-expected.txt
@@ -12,10 +12,12 @@ layer at (0,0) size 800x600
 layer at (0,0) size 800x600
   RenderBlock {HTML} at (0,0) size 800x600
     RenderBody {BODY} at (8,8) size 784x584
-      RenderBlock {P} at (0,0) size 784x18
-        RenderText {#text} at (0,0) size 757x18
-          text run at (0,0) width 757: "This test does a drag and drop such that the selection around the dragged word is no longer in the document on the drop."
-      RenderBlock {DIV} at (0,34) size 784x18
+      RenderBlock {P} at (0,0) size 784x54
+        RenderText {#text} at (0,0) size 756x54
+          text run at (0,0) width 719: "This tests non-smartmove drag/drop. The space should be deleted on move, but not reinserted on drop, resulting in"
+          text run at (0,18) width 756: "\"worldhello\". Currently there's a bug (https://bugs.webkit.org/show_bug.cgi?id=35314) where the space is reinserted on"
+          text run at (0,36) width 33: "drop."
+      RenderBlock {DIV} at (0,70) size 784x18
         RenderText {#text} at (0,0) size 37x18
           text run at (0,0) width 37: "world"
         RenderText {#text} at (37,0) size 35x18
diff --git a/LayoutTests/platform/mac/editing/pasteboard/smart-drag-drop-expected.checksum b/LayoutTests/platform/mac/editing/pasteboard/smart-drag-drop-expected.checksum
new file mode 100644
index 0000000..acedfe9
--- /dev/null
+++ b/LayoutTests/platform/mac/editing/pasteboard/smart-drag-drop-expected.checksum
@@ -0,0 +1 @@
+93a06d387a10b55c782bdf48c33b2f82
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/editing/pasteboard/smart-drag-drop-expected.png b/LayoutTests/platform/mac/editing/pasteboard/smart-drag-drop-expected.png
new file mode 100644
index 0000000..f5741b9
Binary files /dev/null and b/LayoutTests/platform/mac/editing/pasteboard/smart-drag-drop-expected.png differ
diff --git a/LayoutTests/platform/mac/editing/pasteboard/smart-drag-drop-expected.txt b/LayoutTests/platform/mac/editing/pasteboard/smart-drag-drop-expected.txt
new file mode 100644
index 0000000..d6fcded
--- /dev/null
+++ b/LayoutTests/platform/mac/editing/pasteboard/smart-drag-drop-expected.txt
@@ -0,0 +1,27 @@
+EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 2 of DIV > BODY > HTML > #document
+EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document toDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document toDOMRange:range from 0 of #text > SPAN > DIV > BODY > HTML > #document to 5 of #text > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: shouldInsertNode:#document-fragment replacingDOMRange:range from 6 of #text > DIV > BODY > HTML > #document to 6 of #text > DIV > BODY > HTML > #document givenAction:WebViewInsertActionDropped
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of #text > DIV > BODY > HTML > #document to 6 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderBlock {P} at (0,0) size 784x36
+        RenderText {#text} at (0,0) size 773x36
+          text run at (0,0) width 773: "Tests that drag/drop after double-click does a smart drag. Specifically the end result should have a space: \"world hello\". To"
+          text run at (0,18) width 434: "test manually double click on the \"hello\" and drag it to after \"world\"."
+      RenderBlock {DIV} at (0,52) size 784x18
+        RenderText {#text} at (0,0) size 37x18
+          text run at (0,0) width 37: "world"
+        RenderText {#text} at (37,0) size 35x18
+          text run at (37,0) width 35: " hello"
+selection start: position 0 of child 1 {#text} of child 3 {DIV} of child 1 {BODY} of child 0 {HTML} of document
+selection end:   position 6 of child 1 {#text} of child 3 {DIV} of child 1 {BODY} of child 0 {HTML} of document
diff --git a/LayoutTests/platform/mac/editing/pasteboard/smart-paste-001-expected.txt b/LayoutTests/platform/mac/editing/pasteboard/smart-paste-001-expected.txt
index 694d7e4..cbd5af3 100644
--- a/LayoutTests/platform/mac/editing/pasteboard/smart-paste-001-expected.txt
+++ b/LayoutTests/platform/mac/editing/pasteboard/smart-paste-001-expected.txt
@@ -1,6 +1,8 @@
 EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 3 of DIV > BODY > HTML > #document
 EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document toDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document toDOMRange:range from 1 of #text > DIV > DIV > BODY > HTML > #document to 5 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: shouldInsertNode:#document-fragment replacingDOMRange:range from 5 of #text > DIV > DIV > BODY > HTML > #document to 5 of #text > DIV > DIV > BODY > HTML > #document givenAction:WebViewInsertActionPasted
diff --git a/LayoutTests/platform/mac/editing/pasteboard/smart-paste-002-expected.txt b/LayoutTests/platform/mac/editing/pasteboard/smart-paste-002-expected.txt
index cc82773..fa36802 100644
--- a/LayoutTests/platform/mac/editing/pasteboard/smart-paste-002-expected.txt
+++ b/LayoutTests/platform/mac/editing/pasteboard/smart-paste-002-expected.txt
@@ -1,6 +1,8 @@
 EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 3 of DIV > BODY > HTML > #document
 EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document toDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document toDOMRange:range from 1 of #text > DIV > DIV > BODY > HTML > #document to 5 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: shouldInsertNode:#document-fragment replacingDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document givenAction:WebViewInsertActionPasted
diff --git a/LayoutTests/platform/mac/editing/pasteboard/smart-paste-003-expected.txt b/LayoutTests/platform/mac/editing/pasteboard/smart-paste-003-expected.txt
index 50212ac..9440347 100644
--- a/LayoutTests/platform/mac/editing/pasteboard/smart-paste-003-expected.txt
+++ b/LayoutTests/platform/mac/editing/pasteboard/smart-paste-003-expected.txt
@@ -1,6 +1,8 @@
 EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 3 of DIV > BODY > HTML > #document
 EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document toDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document toDOMRange:range from 1 of #text > DIV > DIV > BODY > HTML > #document to 5 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: shouldInsertNode:#document-fragment replacingDOMRange:range from 5 of #text > DIV > DIV > BODY > HTML > #document to 5 of #text > DIV > DIV > BODY > HTML > #document givenAction:WebViewInsertActionPasted
diff --git a/LayoutTests/platform/mac/editing/pasteboard/smart-paste-004-expected.txt b/LayoutTests/platform/mac/editing/pasteboard/smart-paste-004-expected.txt
index 02f0f1d..24a19c9 100644
--- a/LayoutTests/platform/mac/editing/pasteboard/smart-paste-004-expected.txt
+++ b/LayoutTests/platform/mac/editing/pasteboard/smart-paste-004-expected.txt
@@ -1,6 +1,8 @@
 EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 3 of DIV > BODY > HTML > #document
 EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document toDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document toDOMRange:range from 1 of #text > DIV > DIV > BODY > HTML > #document to 5 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
diff --git a/LayoutTests/platform/mac/editing/pasteboard/smart-paste-005-expected.txt b/LayoutTests/platform/mac/editing/pasteboard/smart-paste-005-expected.txt
index ededf3a..fa70073 100644
--- a/LayoutTests/platform/mac/editing/pasteboard/smart-paste-005-expected.txt
+++ b/LayoutTests/platform/mac/editing/pasteboard/smart-paste-005-expected.txt
@@ -1,6 +1,8 @@
 EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 3 of DIV > BODY > HTML > #document
 EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document toDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document toDOMRange:range from 1 of #text > DIV > DIV > BODY > HTML > #document to 5 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
diff --git a/LayoutTests/platform/mac/editing/pasteboard/smart-paste-007-expected.txt b/LayoutTests/platform/mac/editing/pasteboard/smart-paste-007-expected.txt
index c5aad1a..a6a040f 100644
--- a/LayoutTests/platform/mac/editing/pasteboard/smart-paste-007-expected.txt
+++ b/LayoutTests/platform/mac/editing/pasteboard/smart-paste-007-expected.txt
@@ -1,6 +1,8 @@
 EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 3 of DIV > BODY > HTML > #document
 EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document toDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document toDOMRange:range from 1 of #text > DIV > DIV > BODY > HTML > #document to 5 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: shouldDeleteDOMRange:range from 1 of #text > DIV > DIV > BODY > HTML > #document to 5 of #text > DIV > DIV > BODY > HTML > #document
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
diff --git a/LayoutTests/platform/mac/editing/pasteboard/smart-paste-008-expected.txt b/LayoutTests/platform/mac/editing/pasteboard/smart-paste-008-expected.txt
index 107b16a..d4cac04 100644
--- a/LayoutTests/platform/mac/editing/pasteboard/smart-paste-008-expected.txt
+++ b/LayoutTests/platform/mac/editing/pasteboard/smart-paste-008-expected.txt
@@ -1,6 +1,8 @@
 EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 2 of DIV > BODY > HTML > #document
 EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document toDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document toDOMRange:range from 0 of #text > DIV > DIV > BODY > HTML > #document to 3 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
diff --git a/LayoutTests/platform/mac/editing/style/style-boundary-005-expected.checksum b/LayoutTests/platform/mac/editing/style/style-boundary-005-expected.checksum
index c1fbf6b..fd11f1f 100644
--- a/LayoutTests/platform/mac/editing/style/style-boundary-005-expected.checksum
+++ b/LayoutTests/platform/mac/editing/style/style-boundary-005-expected.checksum
@@ -1 +1 @@
-b276bd0abdda5ac38b70e8a2db0577ef
\ No newline at end of file
+28d32961a9388737065e99d4c3cb04a2
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/editing/style/style-boundary-005-expected.png b/LayoutTests/platform/mac/editing/style/style-boundary-005-expected.png
index 7ac06e1..c093c93 100644
Binary files a/LayoutTests/platform/mac/editing/style/style-boundary-005-expected.png and b/LayoutTests/platform/mac/editing/style/style-boundary-005-expected.png differ
diff --git a/LayoutTests/platform/mac/editing/style/style-boundary-005-expected.txt b/LayoutTests/platform/mac/editing/style/style-boundary-005-expected.txt
index aee8ae9..1576ae6 100644
--- a/LayoutTests/platform/mac/editing/style/style-boundary-005-expected.txt
+++ b/LayoutTests/platform/mac/editing/style/style-boundary-005-expected.txt
@@ -32,30 +32,32 @@ layer at (0,0) size 800x600
 layer at (0,0) size 800x600
   RenderBlock {HTML} at (0,0) size 800x600
     RenderBody {BODY} at (8,8) size 784x584
-      RenderBlock {DIV} at (0,0) size 784x184 [border: (2px solid #0000FF)]
+      RenderBlock {DIV} at (0,0) size 784x240 [border: (2px solid #0000FF)]
         RenderBlock {DIV} at (14,14) size 756x56
           RenderText {#text} at (0,0) size 67x28
             text run at (0,0) width 67: "Tests: "
           RenderBR {BR} at (0,0) size 0x0
           RenderText {#text} at (0,28) size 698x28
             text run at (0,28) width 698: "Pasting at style boundary does not crash or produce empty style span(s)."
-        RenderBlock {DIV} at (14,86) size 756x84
-          RenderBlock (anonymous) at (0,0) size 756x56
+        RenderBlock {DIV} at (14,86) size 756x140
+          RenderBlock (anonymous) at (0,0) size 756x112
             RenderText {#text} at (0,0) size 189x28
               text run at (0,0) width 189: "Expected Results: "
             RenderBR {BR} at (189,22) size 0x0
-            RenderText {#text} at (0,28) size 442x28
-              text run at (0,28) width 442: "Should see this content in the red box below: "
-            RenderBR {BR} at (442,50) size 0x0
-          RenderBlock {DIV} at (0,56) size 756x28
+            RenderText {#text} at (0,28) size 723x84
+              text run at (0,28) width 723: "Should see this content in the red box below (currently there's a bug where"
+              text run at (0,56) width 435: "there is an extra space after the bold element"
+              text run at (0,84) width 489: "https://bugs.webkit.org/show_bug.cgi?id=35314): "
+            RenderBR {BR} at (489,106) size 0x0
+          RenderBlock {DIV} at (0,112) size 756x28
             RenderText {#text} at (0,0) size 138x28
               text run at (0,0) width 138: "one two three "
             RenderInline {B} at (0,0) size 44x28
               RenderText {#text} at (138,0) size 44x28
                 text run at (138,0) width 44: "four"
-            RenderText {#text} at (182,0) size 41x28
-              text run at (182,0) width 41: " one"
-      RenderBlock {DIV} at (0,208) size 784x22
+            RenderText {#text} at (182,0) size 35x28
+              text run at (182,0) width 35: "one"
+      RenderBlock {DIV} at (0,264) size 784x22
         RenderBlock {DIV} at (0,0) size 784x22 [border: (2px solid #FF0000)]
           RenderText {#text} at (2,2) size 86x18
             text run at (2,2) width 86: "one two three"

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list