Turn On Smart Delete
authormegan_gardner@apple.com <megan_gardner@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 18 Feb 2019 16:53:32 +0000 (16:53 +0000)
committermegan_gardner@apple.com <megan_gardner@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 18 Feb 2019 16:53:32 +0000 (16:53 +0000)
https://bugs.webkit.org/show_bug.cgi?id=194320

Reviewed by Ryosuke Niwa.

Source/WebCore:

Updated the following tests to work with iOS:
* 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/deleting/smart-delete-across-editable-boundaries-2.html:
* editing/selection/delete-word-granularity-text-control.html:

Turn on Smart delete for iOS at all times. Modify checks to allow Mac and iOS and other
platforms to turn on smart delete when desired.

* editing/Editor.cpp:
(WebCore::Editor::shouldSmartDelete):
Allow platfroms to determine if smart delete should be on.
On mac, this is via word granularity, on iOS this is just on all the time.
(WebCore::Editor::canSmartCopyOrDelete):
(WebCore::Editor::performCutOrCopy):
* editing/Editor.h:
* editing/EditorCommand.cpp:
(WebCore::executeDelete):
* editing/ios/EditorIOS.mm:
(WebCore::Editor::shouldSmartDelete):
* editing/mac/EditorMac.mm:
(WebCore::Editor::shouldSmartDelete):

LayoutTests:

Update smart-delete-* tests, and rebase many other tests to work with the new smart delete setting.

* editing/deleting/smart-delete-001-expected.txt: Added.
* editing/deleting/smart-delete-001.html:
* editing/deleting/smart-delete-002-expected.txt:
* editing/deleting/smart-delete-002.html:
* editing/deleting/smart-delete-003-expected.txt: Copied from LayoutTests/platform/mac/editing/deleting/smart-delete-003-expected.txt.
* editing/deleting/smart-delete-003.html:
* editing/deleting/smart-delete-004-expected.txt: Renamed from LayoutTests/platform/mac/editing/deleting/smart-delete-004-expected.txt.
* editing/deleting/smart-delete-004.html:
* editing/deleting/smart-delete-across-editable-boundaries-2-expected.txt:
* editing/deleting/smart-delete-across-editable-boundaries-2.html:
* editing/selection/delete-word-granularity-text-control.html:
* platform/ios-wk1/editing/deleting/smart-delete-003-expected.txt: Removed.
* platform/ios-wk1/editing/deleting/smart-delete-004-expected.txt: Removed.
* platform/ios-wk2/editing/deleting/smart-delete-003-expected.txt: Removed.
* platform/ios-wk2/editing/pasteboard/cut-text-001-expected.png: Removed.
* platform/ios/TestExpectations:
* platform/ios/editing/deleting/5206311-1-expected.txt:
* platform/ios/editing/deleting/delete-across-editable-content-boundaries-2-expected.txt: Added.
* platform/ios/editing/deleting/delete-across-editable-content-boundaries-3-expected.txt: Added.
* platform/ios/editing/deleting/delete-and-undo-expected.txt:
* platform/ios/editing/deleting/delete-block-merge-contents-012-expected.txt:
* platform/ios/editing/deleting/delete-block-merge-contents-017-expected.txt:
* platform/ios/editing/deleting/delete-contiguous-ws-001-expected.txt:
* platform/ios/editing/deleting/delete-image-003-expected.txt:
* platform/ios/editing/deleting/delete-leading-ws-001-expected.txt:
* platform/ios/editing/deleting/delete-selection-001-expected.txt:
* platform/ios/editing/deleting/delete-trailing-ws-001-expected.txt:
* platform/ios/editing/deleting/delete-ws-fixup-002-expected.txt:
* platform/ios/editing/deleting/delete-ws-fixup-003-expected.txt:
* platform/ios/editing/deleting/delete-ws-fixup-004-expected.txt:
* platform/ios/editing/deleting/smart-delete-001-expected.txt:
* platform/ios/editing/deleting/smart-delete-002-expected.txt: Added.
* platform/ios/editing/deleting/smart-delete-003-expected.txt: Copied from LayoutTests/platform/mac/editing/deleting/smart-delete-003-expected.txt.
* platform/ios/editing/deleting/smart-delete-004-expected.txt: Renamed from LayoutTests/platform/mac/editing/deleting/smart-delete-003-expected.txt.
* platform/ios/editing/deleting/smart-delete-across-editable-boundaries-2-expected.txt: Added.
* platform/ios/editing/deleting/table-cells-expected.txt:
* platform/ios/editing/execCommand/delete-line-and-insert-text-in-font-inside-blockquote-expected.txt: Added.
* platform/ios/editing/pasteboard/cut-text-001-expected.txt: Renamed from LayoutTests/platform/ios-wk2/editing/pasteboard/cut-text-001-expected.txt.
* platform/ios/editing/pasteboard/paste-2-expected.txt:
* platform/mac/editing/deleting/smart-delete-001-expected.png: Removed.
* platform/mac/editing/deleting/smart-delete-001-expected.txt: Removed.
* platform/mac/editing/deleting/smart-delete-002-expected.png: Removed.
* platform/mac/editing/deleting/smart-delete-003-expected.png: Removed.
* platform/mac/editing/deleting/smart-delete-004-expected.png: Removed.
* resources/ui-helper.js:
(window.UIHelper.async.doubleActivateAt):
(window.UIHelper.async.doubleActivateAtSelectionStart):
(window.UIHelper.async.selectWordByDoubleTapOrClick):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@241719 268f45cc-cd09-0410-ab3c-d52691b4dbfc

57 files changed:
LayoutTests/ChangeLog
LayoutTests/editing/deleting/smart-delete-001-expected.txt [new file with mode: 0644]
LayoutTests/editing/deleting/smart-delete-001.html
LayoutTests/editing/deleting/smart-delete-002-expected.txt
LayoutTests/editing/deleting/smart-delete-002.html
LayoutTests/editing/deleting/smart-delete-003-expected.txt [moved from LayoutTests/platform/mac/editing/deleting/smart-delete-003-expected.txt with 56% similarity]
LayoutTests/editing/deleting/smart-delete-003.html
LayoutTests/editing/deleting/smart-delete-004-expected.txt [moved from LayoutTests/platform/mac/editing/deleting/smart-delete-004-expected.txt with 56% similarity]
LayoutTests/editing/deleting/smart-delete-004.html
LayoutTests/editing/deleting/smart-delete-across-editable-boundaries-2-expected.txt
LayoutTests/editing/deleting/smart-delete-across-editable-boundaries-2.html
LayoutTests/editing/selection/delete-word-granularity-text-control.html
LayoutTests/platform/ios-wk1/editing/deleting/smart-delete-003-expected.txt [deleted file]
LayoutTests/platform/ios-wk1/editing/deleting/smart-delete-004-expected.txt [deleted file]
LayoutTests/platform/ios-wk2/editing/deleting/smart-delete-002-expected.png [deleted file]
LayoutTests/platform/ios-wk2/editing/deleting/smart-delete-003-expected.txt [deleted file]
LayoutTests/platform/ios-wk2/editing/deleting/smart-delete-004-expected.txt [deleted file]
LayoutTests/platform/ios-wk2/editing/pasteboard/cut-text-001-expected.png [deleted file]
LayoutTests/platform/ios/TestExpectations
LayoutTests/platform/ios/editing/deleting/5206311-1-expected.txt
LayoutTests/platform/ios/editing/deleting/delete-across-editable-content-boundaries-2-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios/editing/deleting/delete-across-editable-content-boundaries-3-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios/editing/deleting/delete-and-undo-expected.txt
LayoutTests/platform/ios/editing/deleting/delete-block-merge-contents-012-expected.txt
LayoutTests/platform/ios/editing/deleting/delete-block-merge-contents-017-expected.txt
LayoutTests/platform/ios/editing/deleting/delete-contiguous-ws-001-expected.txt
LayoutTests/platform/ios/editing/deleting/delete-image-003-expected.txt
LayoutTests/platform/ios/editing/deleting/delete-leading-ws-001-expected.txt
LayoutTests/platform/ios/editing/deleting/delete-selection-001-expected.txt
LayoutTests/platform/ios/editing/deleting/delete-trailing-ws-001-expected.txt
LayoutTests/platform/ios/editing/deleting/delete-ws-fixup-002-expected.txt
LayoutTests/platform/ios/editing/deleting/delete-ws-fixup-003-expected.txt
LayoutTests/platform/ios/editing/deleting/delete-ws-fixup-004-expected.txt
LayoutTests/platform/ios/editing/deleting/smart-delete-001-expected.txt
LayoutTests/platform/ios/editing/deleting/smart-delete-002-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios/editing/deleting/smart-delete-003-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios/editing/deleting/smart-delete-004-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios/editing/deleting/smart-delete-across-editable-boundaries-2-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios/editing/deleting/table-cells-expected.txt
LayoutTests/platform/ios/editing/execCommand/delete-line-and-insert-text-in-font-inside-blockquote-expected.txt [new file with mode: 0644]
LayoutTests/platform/ios/editing/pasteboard/cut-text-001-expected.txt [moved from LayoutTests/platform/ios-wk2/editing/pasteboard/cut-text-001-expected.txt with 77% similarity]
LayoutTests/platform/ios/editing/pasteboard/paste-2-expected.txt
LayoutTests/platform/mac/editing/deleting/smart-delete-001-expected.png [deleted file]
LayoutTests/platform/mac/editing/deleting/smart-delete-001-expected.txt [deleted file]
LayoutTests/platform/mac/editing/deleting/smart-delete-002-expected.png [deleted file]
LayoutTests/platform/mac/editing/deleting/smart-delete-003-expected.png [deleted file]
LayoutTests/platform/mac/editing/deleting/smart-delete-004-expected.png [deleted file]
LayoutTests/platform/win/editing/deleting/smart-delete-001-expected.txt
LayoutTests/platform/win/editing/deleting/smart-delete-002-expected.txt
LayoutTests/platform/win/editing/deleting/smart-delete-003-expected.txt
LayoutTests/platform/win/editing/deleting/smart-delete-004-expected.txt
LayoutTests/resources/ui-helper.js
Source/WebCore/ChangeLog
Source/WebCore/editing/EditingBehavior.h
Source/WebCore/editing/Editor.cpp
Source/WebCore/editing/Editor.h
Source/WebCore/editing/EditorCommand.cpp

index aff6228..cbd0e8c 100644 (file)
@@ -1,3 +1,61 @@
+2019-02-18  Megan Gardner  <megan_gardner@apple.com>
+
+        Turn On Smart Delete
+        https://bugs.webkit.org/show_bug.cgi?id=194320
+
+        Reviewed by Ryosuke Niwa.
+
+        Update smart-delete-* tests, and rebase many other tests to work with the new smart delete setting.
+
+        * editing/deleting/smart-delete-001-expected.txt: Added.
+        * editing/deleting/smart-delete-001.html:
+        * editing/deleting/smart-delete-002-expected.txt:
+        * editing/deleting/smart-delete-002.html:
+        * editing/deleting/smart-delete-003-expected.txt: Copied from LayoutTests/platform/mac/editing/deleting/smart-delete-003-expected.txt.
+        * editing/deleting/smart-delete-003.html:
+        * editing/deleting/smart-delete-004-expected.txt: Renamed from LayoutTests/platform/mac/editing/deleting/smart-delete-004-expected.txt.
+        * editing/deleting/smart-delete-004.html:
+        * editing/deleting/smart-delete-across-editable-boundaries-2-expected.txt:
+        * editing/deleting/smart-delete-across-editable-boundaries-2.html:
+        * editing/selection/delete-word-granularity-text-control.html:
+        * platform/ios-wk1/editing/deleting/smart-delete-003-expected.txt: Removed.
+        * platform/ios-wk1/editing/deleting/smart-delete-004-expected.txt: Removed.
+        * platform/ios-wk2/editing/deleting/smart-delete-003-expected.txt: Removed.
+        * platform/ios-wk2/editing/pasteboard/cut-text-001-expected.png: Removed.
+        * platform/ios/TestExpectations:
+        * platform/ios/editing/deleting/5206311-1-expected.txt:
+        * platform/ios/editing/deleting/delete-across-editable-content-boundaries-2-expected.txt: Added.
+        * platform/ios/editing/deleting/delete-across-editable-content-boundaries-3-expected.txt: Added.
+        * platform/ios/editing/deleting/delete-and-undo-expected.txt:
+        * platform/ios/editing/deleting/delete-block-merge-contents-012-expected.txt:
+        * platform/ios/editing/deleting/delete-block-merge-contents-017-expected.txt:
+        * platform/ios/editing/deleting/delete-contiguous-ws-001-expected.txt:
+        * platform/ios/editing/deleting/delete-image-003-expected.txt:
+        * platform/ios/editing/deleting/delete-leading-ws-001-expected.txt:
+        * platform/ios/editing/deleting/delete-selection-001-expected.txt:
+        * platform/ios/editing/deleting/delete-trailing-ws-001-expected.txt:
+        * platform/ios/editing/deleting/delete-ws-fixup-002-expected.txt:
+        * platform/ios/editing/deleting/delete-ws-fixup-003-expected.txt:
+        * platform/ios/editing/deleting/delete-ws-fixup-004-expected.txt:
+        * platform/ios/editing/deleting/smart-delete-001-expected.txt:
+        * platform/ios/editing/deleting/smart-delete-002-expected.txt: Added.
+        * platform/ios/editing/deleting/smart-delete-003-expected.txt: Copied from LayoutTests/platform/mac/editing/deleting/smart-delete-003-expected.txt.
+        * platform/ios/editing/deleting/smart-delete-004-expected.txt: Renamed from LayoutTests/platform/mac/editing/deleting/smart-delete-003-expected.txt.
+        * platform/ios/editing/deleting/smart-delete-across-editable-boundaries-2-expected.txt: Added.
+        * platform/ios/editing/deleting/table-cells-expected.txt:
+        * platform/ios/editing/execCommand/delete-line-and-insert-text-in-font-inside-blockquote-expected.txt: Added.
+        * platform/ios/editing/pasteboard/cut-text-001-expected.txt: Renamed from LayoutTests/platform/ios-wk2/editing/pasteboard/cut-text-001-expected.txt.
+        * platform/ios/editing/pasteboard/paste-2-expected.txt:
+        * platform/mac/editing/deleting/smart-delete-001-expected.png: Removed.
+        * platform/mac/editing/deleting/smart-delete-001-expected.txt: Removed.
+        * platform/mac/editing/deleting/smart-delete-002-expected.png: Removed.
+        * platform/mac/editing/deleting/smart-delete-003-expected.png: Removed.
+        * platform/mac/editing/deleting/smart-delete-004-expected.png: Removed.
+        * resources/ui-helper.js:
+        (window.UIHelper.async.doubleActivateAt):
+        (window.UIHelper.async.doubleActivateAtSelectionStart):
+        (window.UIHelper.async.selectWordByDoubleTapOrClick):
+
 2019-02-17  Fujii Hironori  <Hironori.Fujii@sony.com>
 
         Use dumpJSConsoleLogInStdErr=true webkit-test-runner option for non-imported tests instead of using DumpJSConsoleLogInStdErr expectation in TestExpectations
diff --git a/LayoutTests/editing/deleting/smart-delete-001-expected.txt b/LayoutTests/editing/deleting/smart-delete-001-expected.txt
new file mode 100644 (file)
index 0000000..0ddff38
--- /dev/null
@@ -0,0 +1,16 @@
+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 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: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
+Tests: 
+Smart delete when deleting the first word on a line.
+Expected Results: 
+The first word and the space following the first word should be deleted. It should like this this: 
+bar baz
+bar baz
+execDeleteCommand: <div id="test" class="editing">bar baz </div>
index 9b8adc1..5c1f904 100644 (file)
@@ -1,3 +1,4 @@
+<!DOCTYPE html>
 <html> 
 <head>
 
 .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 src="../editing.js"></script>
+<script src="../../resources/ui-helper.js"></script>
 
 <script>
 
-function editingTest() {
-    doubleClickAtSelectionStart();
+async function editingTest() {
+    await UIHelper.selectWordByDoubleTapOrClick(document.getElementById('test'));
     deleteCommand();
 }
 
@@ -53,7 +55,7 @@ foo bar baz
 </div>
 
 <script>
-runEditingTest();
+runDumpAsTextEditingTest(true);
 </script>
 
 </body>
index e39d591..1b752f8 100644 (file)
@@ -9,30 +9,10 @@ EDITING DELEGATE: shouldDeleteDOMRange:range from 5 of #text > DIV > DIV > BODY
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 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 784x212 [border: (2px solid #0000FF)]
-        RenderBlock {DIV} at (14,14) size 756x56
-          RenderText {#text} at (0,0) size 66x28
-            text run at (0,0) width 66: "Tests: "
-          RenderBR {BR} at (0,0) size 0x0
-          RenderText {#text} at (0,28) size 516x28
-            text run at (0,28) width 516: "Smart delete when deleting the second word of a line."
-        RenderBlock {DIV} at (14,86) size 756x112
-          RenderText {#text} at (0,0) size 190x28
-            text run at (0,0) width 190: "Expected Results: "
-          RenderBR {BR} at (189,22) size 1x0
-          RenderText {#text} at (0,28) size 732x56
-            text run at (0,28) width 732: "The second word and the space before the second word should be deleted. It"
-            text run at (0,56) width 201: "should like this this: "
-          RenderBR {BR} at (200,78) size 1x0
-          RenderText {#text} at (0,84) size 72x28
-            text run at (0,84) width 72: "foo baz"
-      RenderBlock {DIV} at (0,236) size 784x32
-        RenderBlock {DIV} at (0,0) size 784x32 [border: (2px solid #FF0000)]
-          RenderText {#text} at (2,2) size 72x28
-            text run at (2,2) width 72: "foo baz"
-caret: position 4 of child 0 {#text} of child 1 {DIV} of child 3 {DIV} of body
+Tests: 
+Smart delete when deleting the second word of a line.
+Expected Results: 
+The second word and the space before the second word should be deleted. It should like this this: 
+foo baz
+foo baz
+execDeleteCommand: <div id="test" class="editing"> foo baz </div>
index 9430ee2..7580cb3 100644 (file)
@@ -1,3 +1,4 @@
+<!DOCTYPE html>
 <html> 
 <head>
 
 .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 src="../editing.js"></script>
+<script src="../../resources/ui-helper.js"></script>
 <script>
 
-function editingTest() {
-    if (window.internals)
-        internals.settings.setEditingBehavior('mac');
+async function editingTest() {
     moveSelectionForwardByWordCommand();
     moveSelectionForwardByCharacterCommand();
-    doubleClickAtSelectionStart();
+    await UIHelper.doubleActivateAtSelectionStart();
     deleteCommand();
 }
 
@@ -57,7 +56,7 @@ foo bar baz
 </div>
 
 <script>
-runEditingTest();
+runDumpAsTextEditingTest(true);
 </script>
 
 </body>
@@ -1,6 +1,7 @@
 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 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document 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
@@ -10,20 +11,10 @@ EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotificatio
 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 3 of #text > DIV > BODY > HTML > #document to 0 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
-  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 779x36
-          text run at (0,0) width 401: "This tests deleting a selection created with a word granularity. "
-          text run at (400,0) width 353: "To run it manually, double click on 'bar' and hit delete. "
-          text run at (752,0) width 27: "You"
-          text run at (0,18) width 129: "should see 'foo baz'."
-      RenderBlock {DIV} at (0,52) size 784x18
-        RenderText {#text} at (0,0) size 22x18
-          text run at (0,0) width 22: "foo"
-        RenderText {#text} at (21,0) size 27x18
-          text run at (21,0) width 27: " baz"
-caret: position 3 of child 0 {#text} of child 2 {DIV} of body
+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'.
+
+Expected Results: 
+The second word and the space before the second word should be deleted. It should like this this: 
+foo baz
+foo baz
+
index 82ca373..5e2990c 100644 (file)
@@ -1,15 +1,43 @@
-<script>
-if (window.testRunner)
-     testRunner.dumpEditingCallbacks();
-</script>
-<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
+<!DOCTYPE html>
+<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"></script>
+<script src="../../resources/ui-helper.js"></script>
+<div class="scenario">
 <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>
+</div>
+<div class="expected-results">
+Expected Results:
+<br>
+The second word and the space before the second word should be deleted. It should like this this:
+<BR>
+foo baz
+</div>
+<div id="test" class="editing" contenteditable="true">foo b<span id="target">a</span>r baz</div>
 
 <script>
-if (window.testRunner) {
+async function editingTest() {
     var target = document.getElementById("target");
-    doubleClick(target.offsetLeft, target.offsetTop);
+    await UIHelper.selectWordByDoubleTapOrClick(target);
     testRunner.execCommand("DeleteBackward");
 }
+
+runDumpAsTextEditingTest(true);
+
 </script>
@@ -1,6 +1,7 @@
 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 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document 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
@@ -10,20 +11,10 @@ EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotificatio
 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 3 of #text > DIV > BODY > HTML > #document to 0 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
-  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 758x36
-          text run at (0,0) width 401: "This tests deleting a selection created with a word granularity. "
-          text run at (400,0) width 358: "To run it manually, double click on 'bar' and hit forward"
-          text run at (0,18) width 47: "delete. "
-          text run at (46,18) width 159: "You should see 'foo baz'."
-      RenderBlock {DIV} at (0,52) size 784x18
-        RenderText {#text} at (0,0) size 22x18
-          text run at (0,0) width 22: "foo"
-        RenderText {#text} at (21,0) size 27x18
-          text run at (21,0) width 27: " baz"
-caret: position 3 of child 0 {#text} of child 2 {DIV} of body
+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'.
+
+Expected Results: 
+The second word and the space before the second word should be deleted. It should like this this: 
+foo baz
+foo baz
+
index 117e5b8..f03445d 100644 (file)
@@ -1,15 +1,43 @@
-<script>
-if (window.testRunner)
-     testRunner.dumpEditingCallbacks();
-</script>
-<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
+<!DOCTYPE html>
+<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" ></script>
+<script src="../../resources/ui-helper.js"></script>
+<div class="scenario">
 <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>
+</div>
+<div class="expected-results">
+Expected Results:
+<br>
+The second word and the space before the second word should be deleted. It should like this this:
+<BR>
+foo baz
+</div>
+<div id="test" class="editing" contenteditable="true">foo b<span id="target">a</span>r baz</div>
 
 <script>
-if (window.testRunner) {
+async function editingTest() {
     var target = document.getElementById("target");
-    doubleClick(target.offsetLeft, target.offsetTop + target.offsetHeight / 2);
+    await UIHelper.selectWordByDoubleTapOrClick(target);
     testRunner.execCommand("DeleteForward");
 }
-</script>
+
+runDumpAsTextEditingTest(true);
+
+</script>
\ No newline at end of file
index c7452a7..1ceb416 100644 (file)
@@ -1,5 +1,15 @@
+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 1 of #text > DIV > BODY > HTML > #document to 1 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > DIV > BODY > HTML > #document to 1 of #text > DIV > BODY > HTML > #document toDOMRange:range from 0 of #text > DIV > BODY > HTML > #document to 3 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: shouldDeleteDOMRange:range from 0 of #text > DIV > BODY > HTML > #document to 3 of #text > DIV > BODY > HTML > #document
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
 This tests for a bug where expansion for smart delete would not consider editable boundaries. Only 'foo' should be deleted. You should see ' bar'. <radr://problem/5390681>
-| <#selection-caret>
-| <span>
-|   contenteditable="false"
-|   " bar"
+
+bar
+
index bdf6130..fbc1e5f 100644 (file)
@@ -2,22 +2,19 @@
 <html>
 <body>
 <p id="description">This tests for a bug where expansion for smart delete would not consider editable boundaries. Only 'foo' should be deleted. You should see ' bar'. &lt;radr://problem/5390681&gt;</p>
-<div contenteditable="true" id="div">foo
+<div contenteditable="true" id="test">foo
 <span contenteditable="false"> bar</span></div>
 
-<script src="../../resources/dump-as-markup.js"></script>
+<script src="../editing.js"></script>
+<script src="../../resources/ui-helper.js"></script>
 <script>
-var div = document.getElementById("div");
-var x = div.offsetLeft;
-var y = div.offsetTop;
-eventSender.mouseMoveTo(x, y);
-eventSender.mouseDown();
-eventSender.mouseUp();
-eventSender.mouseDown();
-eventSender.mouseUp();
-document.execCommand("Delete");
-Markup.description(description.textContent);
-Markup.dump(div);
+
+async function editingTest() {
+       await UIHelper.selectWordByDoubleTapOrClick(document.getElementById('test'));
+       document.execCommand("Delete");
+}
+
+runDumpAsTextEditingTest(true);
 </script>
 </body>
 </html>
index 88c48fb..cbb79a0 100644 (file)
@@ -3,11 +3,15 @@
 <head>
 <script src="../../resources/js-test-pre.js"></script>
 <script src="resources/js-test-selection-shared.js"></script>
+<script src="../../resources/ui-helper.js"></script>
 </head>
 <body>
 <p id="description"></p>
 <div id="console"></div>
 <script>
+if (window.internals)
+    internals.settings.setEditingBehavior('mac');
+
 description("Test that setSelectedRange resets the selection granularity to CharacterGranularity.");
 
 var textarea = document.createElement('textarea');
diff --git a/LayoutTests/platform/ios-wk1/editing/deleting/smart-delete-003-expected.txt b/LayoutTests/platform/ios-wk1/editing/deleting/smart-delete-003-expected.txt
deleted file mode 100644 (file)
index ddb0abb..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-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: shouldDeleteDOMRange:range from 4 of #text > DIV > BODY > HTML > #document to 5 of #text > DIV > BODY > HTML > #document
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-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 784x40
-        RenderText {#text} at (0,0) size 779x39
-          text run at (0,0) width 401: "This tests deleting a selection created with a word granularity. "
-          text run at (400,0) width 353: "To run it manually, double click on 'bar' and hit delete. "
-          text run at (752,0) width 27: "You"
-          text run at (0,20) width 129: "should see 'foo baz'."
-      RenderBlock {DIV} at (0,56) size 784x20
-        RenderText {#text} at (0,0) size 26x19
-          text run at (0,0) width 26: "foo "
-        RenderInline {SPAN} at (0,0) size 8x19
-          RenderText {#text} at (25,0) size 8x19
-            text run at (25,0) width 8: "a"
-        RenderText {#text} at (32,0) size 32x19
-          text run at (32,0) width 32: "r baz"
-caret: position 4 of child 0 {#text} of child 2 {DIV} of body
diff --git a/LayoutTests/platform/ios-wk1/editing/deleting/smart-delete-004-expected.txt b/LayoutTests/platform/ios-wk1/editing/deleting/smart-delete-004-expected.txt
deleted file mode 100644 (file)
index 79bec2f..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-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: shouldDeleteDOMRange:range from 0 of #text > SPAN > DIV > BODY > HTML > #document to 1 of #text > SPAN > DIV > BODY > HTML > #document
-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 784x40
-        RenderText {#text} at (0,0) size 758x39
-          text run at (0,0) width 401: "This tests deleting a selection created with a word granularity. "
-          text run at (400,0) width 358: "To run it manually, double click on 'bar' and hit forward"
-          text run at (0,20) width 47: "delete. "
-          text run at (46,20) width 159: "You should see 'foo baz'."
-      RenderBlock {DIV} at (0,56) size 784x20
-        RenderText {#text} at (0,0) size 34x19
-          text run at (0,0) width 34: "foo b"
-        RenderText {#text} at (33,0) size 32x19
-          text run at (33,0) width 32: "r baz"
-caret: position 5 of child 0 {#text} of child 2 {DIV} of body
diff --git a/LayoutTests/platform/ios-wk2/editing/deleting/smart-delete-002-expected.png b/LayoutTests/platform/ios-wk2/editing/deleting/smart-delete-002-expected.png
deleted file mode 100644 (file)
index 620ba1a..0000000
Binary files a/LayoutTests/platform/ios-wk2/editing/deleting/smart-delete-002-expected.png and /dev/null differ
diff --git a/LayoutTests/platform/ios-wk2/editing/deleting/smart-delete-003-expected.txt b/LayoutTests/platform/ios-wk2/editing/deleting/smart-delete-003-expected.txt
deleted file mode 100644 (file)
index dc81946..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-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 784x40
-        RenderText {#text} at (0,0) size 779x39
-          text run at (0,0) width 401: "This tests deleting a selection created with a word granularity. "
-          text run at (400,0) width 353: "To run it manually, double click on 'bar' and hit delete. "
-          text run at (752,0) width 27: "You"
-          text run at (0,20) width 129: "should see 'foo baz'."
-      RenderBlock {DIV} at (0,56) size 784x20
-        RenderText {#text} at (0,0) size 34x19
-          text run at (0,0) width 34: "foo b"
-        RenderInline {SPAN} at (0,0) size 8x19
-          RenderText {#text} at (33,0) size 8x19
-            text run at (33,0) width 8: "a"
-        RenderText {#text} at (40,0) size 32x19
-          text run at (40,0) width 32: "r baz"
diff --git a/LayoutTests/platform/ios-wk2/editing/deleting/smart-delete-004-expected.txt b/LayoutTests/platform/ios-wk2/editing/deleting/smart-delete-004-expected.txt
deleted file mode 100644 (file)
index b61a3b5..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-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 784x40
-        RenderText {#text} at (0,0) size 758x39
-          text run at (0,0) width 401: "This tests deleting a selection created with a word granularity. "
-          text run at (400,0) width 358: "To run it manually, double click on 'bar' and hit forward"
-          text run at (0,20) width 47: "delete. "
-          text run at (46,20) width 159: "You should see 'foo baz'."
-      RenderBlock {DIV} at (0,56) size 784x20
-        RenderText {#text} at (0,0) size 34x19
-          text run at (0,0) width 34: "foo b"
-        RenderInline {SPAN} at (0,0) size 8x19
-          RenderText {#text} at (33,0) size 8x19
-            text run at (33,0) width 8: "a"
-        RenderText {#text} at (40,0) size 32x19
-          text run at (40,0) width 32: "r baz"
diff --git a/LayoutTests/platform/ios-wk2/editing/pasteboard/cut-text-001-expected.png b/LayoutTests/platform/ios-wk2/editing/pasteboard/cut-text-001-expected.png
deleted file mode 100644 (file)
index f3927aa..0000000
Binary files a/LayoutTests/platform/ios-wk2/editing/pasteboard/cut-text-001-expected.png and /dev/null differ
index fce871b..db52d67 100644 (file)
@@ -1340,7 +1340,6 @@ webkit.org/b/178963 fast/css/sticky/sticky-writing-mode-vertical-rl.html [ Image
 # editing/deleting tests to triage
 editing/deleting/delete-all-text-in-text-field-assertion.html [ Failure ]
 editing/deleting/delete-cell-contents.html [ Failure ]
-editing/deleting/smart-delete-002.html [ Failure ]
 editing/deleting/smart-delete-across-editable-boundaries.html [ Failure ]
 editing/deleting/smart-editing-disabled-mac.html [ Failure ]
 
index b6936f5..581efee 100644 (file)
@@ -63,9 +63,8 @@ layer at (0,0) size 800x600
           text run at (0,0) width 311: "This empties the first row, it should be removed."
       RenderBlock {DIV} at (0,298) size 784x76
         RenderBlock {DIV} at (0,0) size 784x20
-          RenderText {#text} at (0,0) size 40x19
+          RenderText {#text} at (0,0) size 36x19
             text run at (0,0) width 36: "Hello"
-            text run at (35,0) width 5: " "
         RenderTable {TABLE} at (0,20) size 46x56 [border: (1px outset #808080)]
           RenderTableSection {TBODY} at (1,1) size 44x54
             RenderTableRow {TR} at (0,2) size 44x24
@@ -84,4 +83,4 @@ layer at (0,0) size 800x600
               RenderTableCell {TD} at (30,28) size 12x24 [border: (1px inset #808080)] [r=1 c=2 rs=1 cs=1]
                 RenderText {#text} at (2,2) size 8x19
                   text run at (2,2) width 8: "9"
-caret: position 6 of child 0 {#text} of child 1 {DIV} of child 14 {DIV} of body
+caret: position 5 of child 0 {#text} of child 1 {DIV} of child 14 {DIV} of body
diff --git a/LayoutTests/platform/ios/editing/deleting/delete-across-editable-content-boundaries-2-expected.txt b/LayoutTests/platform/ios/editing/deleting/delete-across-editable-content-boundaries-2-expected.txt
new file mode 100644 (file)
index 0000000..f1a0e7b
--- /dev/null
@@ -0,0 +1,26 @@
+This tests to see that selected non-editable nodes that are not in both the start and end editable root are preserved during a deletion.  You should see two 'Non-editable' pieces on either side of the editable piece below. <radr://problem/5026848>
+| "
+"
+| <table>
+|   contenteditable="false"
+|   "
+    "
+|   <tbody>
+|     <tr>
+|       "
+        "
+|       <td>
+|         "Non-editable"
+|       "
+        "
+|       <td>
+|         contenteditable="true"
+|         "Editable<#selection-caret>content"
+|       "
+        "
+|       <td>
+|         "Non-editable"
+|       "
+    "
+|     "
+"
diff --git a/LayoutTests/platform/ios/editing/deleting/delete-across-editable-content-boundaries-3-expected.txt b/LayoutTests/platform/ios/editing/deleting/delete-across-editable-content-boundaries-3-expected.txt
new file mode 100644 (file)
index 0000000..06e56d3
--- /dev/null
@@ -0,0 +1,34 @@
+This tests to see that selected editable nodes that are not in both the start and end editable roots are cleared.  You should see one non-editable piece and an editable one and then two empty table cells.  The table cells are editable but are preserved and not removed because they are in a non-editable region.  They should be completely cleared out, even the second one that contains a non-editable piece. <radr://problem/5026848>
+| "
+"
+| <table>
+|   border="1"
+|   contenteditable="false"
+|   "
+    "
+|   <tbody>
+|     <tr>
+|       "
+        "
+|       <td>
+|         "Non-editable"
+|       "
+        "
+|       <td>
+|         contenteditable="true"
+|         "Editable<#selection-caret>content"
+|       "
+        "
+|       <!--  The following cell should be removed, even though it contains non-editable pieces.  -->
+|       "
+        "
+|       <td>
+|         contenteditable="true"
+|       "
+        "
+|       <td>
+|         contenteditable="true"
+|       "
+    "
+|     "
+"
index 6405ab8..17dd25b 100644 (file)
@@ -12,11 +12,6 @@ EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotificatio
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: shouldDeleteDOMRange:range from 4 of #text > DIV > DIV > BODY > HTML > #document to 9 of #text > DIV > DIV > BODY > HTML > #document
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 4 of #text > DIV > DIV > BODY > HTML > #document to 4 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
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldDeleteDOMRange:range from 3 of #text > DIV > DIV > BODY > HTML > #document to 4 of #text > DIV > DIV > BODY > HTML > #document
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 3 of #text > DIV > DIV > BODY > HTML > #document to 3 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 3 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: webViewDidChange:WebViewDidChangeNotification
index 92301a2..0164252 100644 (file)
@@ -30,7 +30,7 @@ EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotificatio
 EDITING DELEGATE: shouldDeleteDOMRange:range from 8 of #text > DIV > DIV > DIV > BODY > HTML > #document to 7 of #text > DIV > DIV > DIV > BODY > HTML > #document
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 7 of #text > DIV > DIV > DIV > BODY > HTML > #document to 2 of DIV > DIV > BODY > HTML > #document toDOMRange:range from 8 of #text > DIV > DIV > DIV > BODY > HTML > #document to 8 of #text > DIV > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 7 of #text > DIV > DIV > DIV > BODY > HTML > #document to 2 of DIV > DIV > BODY > HTML > #document toDOMRange:range from 7 of #text > DIV > DIV > DIV > BODY > HTML > #document to 7 of #text > DIV > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
 layer at (0,0) size 800x600
@@ -41,6 +41,6 @@ layer at (0,0) size 800x600
       RenderBlock {DIV} at (0,0) size 784x58 [border: (2px solid #FF0000)]
         RenderBlock {DIV} at (14,14) size 756x30
           RenderBlock {DIV} at (0,0) size 756x30
-            RenderText {#text} at (0,1) size 176x28
-              text run at (0,1) width 176: "This is  some text."
-caret: position 8 of child 0 {#text} of child 1 {DIV} of child 1 {DIV} of child 1 {DIV} of body
+            RenderText {#text} at (0,1) size 170x28
+              text run at (0,1) width 170: "This is some text."
+caret: position 7 of child 0 {#text} of child 1 {DIV} of child 1 {DIV} of child 1 {DIV} of body
index a0e01db..82351e9 100644 (file)
@@ -30,8 +30,7 @@ EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotificatio
 EDITING DELEGATE: shouldDeleteDOMRange:range from 15 of #text > DIV > DIV > DIV > BODY > HTML > #document to 7 of #text > DIV > DIV > DIV > BODY > HTML > #document
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 7 of #text > DIV > DIV > DIV > BODY > HTML > #document to 2 of DIV > DIV > BODY > HTML > #document toDOMRange:range from 8 of #text > DIV > DIV > DIV > BODY > HTML > #document to 8 of #text > DIV > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 7 of #text > DIV > DIV > DIV > BODY > HTML > #document to 2 of DIV > DIV > BODY > HTML > #document toDOMRange:range from 7 of #text > DIV > DIV > DIV > BODY > HTML > #document to 7 of #text > DIV > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
 layer at (0,0) size 800x600
@@ -42,6 +41,6 @@ layer at (0,0) size 800x600
       RenderBlock {DIV} at (0,0) size 784x58 [border: (2px solid #FF0000)]
         RenderBlock {DIV} at (14,14) size 756x30
           RenderBlock {DIV} at (0,0) size 756x30
-            RenderText {#text} at (0,1) size 176x28
-              text run at (0,1) width 176: "This is  some text."
-caret: position 8 of child 0 {#text} of child 1 {DIV} of child 1 {DIV} of child 1 {DIV} of body
+            RenderText {#text} at (0,1) size 170x28
+              text run at (0,1) width 170: "This is some text."
+caret: position 7 of child 0 {#text} of child 1 {DIV} of child 1 {DIV} of child 1 {DIV} of body
index bdb81fc..d0e658d 100644 (file)
@@ -10,7 +10,7 @@ EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotificatio
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: shouldDeleteDOMRange:range from 7 of #text > SPAN > DIV > BODY > HTML > #document to 10 of #text > SPAN > DIV > BODY > HTML > #document
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 4 of #text > SPAN > DIV > BODY > HTML > #document to 4 of #text > SPAN > DIV > BODY > HTML > #document toDOMRange:range from 4 of #text > SPAN > DIV > BODY > HTML > #document to 4 of #text > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 3 of #text > SPAN > DIV > BODY > HTML > #document to 3 of #text > SPAN > DIV > BODY > HTML > #document toDOMRange:range from 3 of #text > SPAN > DIV > BODY > HTML > #document to 3 of #text > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
 layer at (0,0) size 800x600
@@ -19,8 +19,8 @@ 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 784x58 [border: (2px solid #FF0000)]
-        RenderInline {SPAN} at (0,0) size 78x28
-          RenderText {#text} at (14,15) size 78x28
-            text run at (14,15) width 78: "foo  baz"
+        RenderInline {SPAN} at (0,0) size 72x28
+          RenderText {#text} at (14,15) size 72x28
+            text run at (14,15) width 72: "foo baz"
         RenderText {#text} at (0,0) size 0x0
-caret: position 4 of child 0 {#text} of child 1 {SPAN} of child 1 {DIV} of body
+caret: position 3 of child 0 {#text} of child 1 {SPAN} of child 1 {DIV} of body
index efe2370..a7889c8 100644 (file)
@@ -5,7 +5,7 @@ EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotificatio
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: shouldDeleteDOMRange:range from 1 of SPAN > DIV > BODY > HTML > #document to 3 of SPAN > DIV > BODY > HTML > #document
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of #text > SPAN > DIV > BODY > HTML > #document to 8 of #text > SPAN > DIV > BODY > HTML > #document toDOMRange:range from 1 of #text > SPAN > DIV > BODY > HTML > #document to 1 of #text > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of #text > SPAN > DIV > BODY > HTML > #document to 7 of #text > SPAN > DIV > BODY > HTML > #document toDOMRange:range from 1 of #text > SPAN > DIV > BODY > HTML > #document to 1 of #text > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
 layer at (0,0) size 800x600
@@ -14,10 +14,10 @@ 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 784x58 [border: (2px solid #FF0000)]
-        RenderInline {SPAN} at (0,0) size 84x28
+        RenderInline {SPAN} at (0,0) size 78x28
           RenderText {#text} at (14,15) size 11x28
             text run at (14,15) width 11: "a"
-          RenderText {#text} at (24,15) size 74x28
-            text run at (24,15) width 74: " lincoln"
+          RenderText {#text} at (24,15) size 68x28
+            text run at (24,15) width 68: "lincoln"
         RenderText {#text} at (0,0) size 0x0
 caret: position 1 of child 0 {#text} of child 1 {SPAN} of child 1 {DIV} of body
index 265f63c..432b7d9 100644 (file)
@@ -8,8 +8,7 @@ EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotificatio
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: shouldDeleteDOMRange:range from 4 of #text > SPAN > DIV > BODY > HTML > #document to 7 of #text > SPAN > DIV > BODY > HTML > #document
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > SPAN > DIV > BODY > HTML > #document to 1 of #text > SPAN > DIV > BODY > HTML > #document toDOMRange:range from 2 of #text > SPAN > DIV > BODY > HTML > #document to 2 of #text > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > SPAN > DIV > BODY > HTML > #document to 1 of #text > SPAN > DIV > BODY > HTML > #document toDOMRange:range from 1 of #text > SPAN > DIV > BODY > HTML > #document to 1 of #text > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
 layer at (0,0) size 800x600
@@ -18,8 +17,7 @@ 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 784x58 [border: (2px solid #FF0000)]
-        RenderInline {SPAN} at (0,0) size 14x28
-          RenderText {#text} at (14,15) size 14x28
+        RenderInline {SPAN} at (0,0) size 8x28
+          RenderText {#text} at (14,15) size 8x28
             text run at (14,15) width 8: "f"
-            text run at (21,15) width 7: " "
-caret: position 2 of child 0 {#text} of child 1 {SPAN} of child 1 {DIV} of body
+caret: position 1 of child 0 {#text} of child 1 {SPAN} of child 1 {DIV} of body
index 84880db..760b0fd 100644 (file)
@@ -15,9 +15,9 @@ 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 784x58 [border: (2px solid #FF0000)]
-        RenderInline {SPAN} at (0,0) size 76x28
-          RenderText {#text} at (14,15) size 76x28
-            text run at (14,15) width 43: " bar "
-            text run at (56,15) width 34: "baz"
+        RenderInline {SPAN} at (0,0) size 70x28
+          RenderText {#text} at (14,15) size 70x28
+            text run at (14,15) width 37: "bar "
+            text run at (50,15) width 34: "baz"
         RenderText {#text} at (0,0) size 0x0
 caret: position 0 of child 0 {#text} of child 0 {SPAN} of child 1 {DIV} of body
index 84880db..760b0fd 100644 (file)
@@ -15,9 +15,9 @@ 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 784x58 [border: (2px solid #FF0000)]
-        RenderInline {SPAN} at (0,0) size 76x28
-          RenderText {#text} at (14,15) size 76x28
-            text run at (14,15) width 43: " bar "
-            text run at (56,15) width 34: "baz"
+        RenderInline {SPAN} at (0,0) size 70x28
+          RenderText {#text} at (14,15) size 70x28
+            text run at (14,15) width 37: "bar "
+            text run at (50,15) width 34: "baz"
         RenderText {#text} at (0,0) size 0x0
 caret: position 0 of child 0 {#text} of child 0 {SPAN} of child 1 {DIV} of body
index 8391b69..cd10f5e 100644 (file)
@@ -33,7 +33,8 @@ EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotificatio
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: shouldDeleteDOMRange:range from 2 of #text > B > SPAN > DIV > BODY > HTML > #document to 4 of #text > B > SPAN > DIV > BODY > HTML > #document
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 7 of #text > SPAN > DIV > BODY > HTML > #document to 0 of #text > B > SPAN > DIV > BODY > HTML > #document toDOMRange:range from 7 of #text > SPAN > DIV > BODY > HTML > #document to 7 of #text > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 6 of #text > SPAN > DIV > BODY > HTML > #document to 0 of #text > B > SPAN > DIV > BODY > HTML > #document toDOMRange:range from 6 of #text > SPAN > DIV > BODY > HTML > #document to 6 of #text > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
 layer at (0,0) size 800x600
@@ -48,23 +49,23 @@ layer at (0,0) size 800x600
           text run at (718,0) width 48: "Editing"
           text run at (0,20) width 543: "produces a tree that should result in two spaces, but for some reason it isn't rendered."
       RenderBlock {DIV} at (0,56) size 784x88 [border: (2px solid #FF0000)]
-        RenderInline {SPAN} at (0,0) size 734x58
+        RenderInline {SPAN} at (0,0) size 728x58
           RenderText {#text} at (14,15) size 96x28
             text run at (14,15) width 96: "in Liberty"
           RenderInline {I} at (0,0) size 117x28
             RenderText {#text} at (109,15) size 117x28
               text run at (109,15) width 21: "F "
               text run at (129,15) width 97: "and seven"
-          RenderText {#text} at (225,15) size 63x28
-            text run at (225,15) width 63: " years "
+          RenderText {#text} at (225,15) size 57x28
+            text run at (225,15) width 57: " years"
           RenderInline {B} at (0,0) size 7x28
-            RenderText {#text} at (287,15) size 7x28
-              text run at (287,15) width 7: " "
-          RenderText {#text} at (293,15) size 734x58
-            text run at (293,15) width 111: "our fathers "
-            text run at (403,15) width 339: "f upon this continent, a new nation,"
-            text run at (741,15) width 7: " "
+            RenderText {#text} at (281,15) size 7x28
+              text run at (281,15) width 7: " "
+          RenderText {#text} at (287,15) size 728x58
+            text run at (287,15) width 111: "our fathers "
+            text run at (397,15) width 339: "f upon this continent, a new nation,"
+            text run at (735,15) width 7: " "
             text run at (14,45) width 228: "conceived    in Liberty, "
             text run at (241,45) width 380: "and dedicated to the proposition that all"
         RenderText {#text} at (0,0) size 0x0
-caret: position 7 of child 2 {#text} of child 1 {SPAN} of child 3 {DIV} of body
+caret: position 6 of child 2 {#text} of child 1 {SPAN} of child 3 {DIV} of body
index 8bbd979..6514261 100644 (file)
@@ -10,7 +10,7 @@ EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotificatio
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: shouldDeleteDOMRange:range from 4 of #text > SPAN > DIV > BODY > HTML > #document to 7 of #text > SPAN > DIV > BODY > HTML > #document
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 4 of #text > SPAN > DIV > BODY > HTML > #document to 4 of #text > SPAN > DIV > BODY > HTML > #document toDOMRange:range from 4 of #text > SPAN > DIV > BODY > HTML > #document to 4 of #text > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 3 of #text > SPAN > DIV > BODY > HTML > #document to 3 of #text > SPAN > DIV > BODY > HTML > #document toDOMRange:range from 3 of #text > SPAN > DIV > BODY > HTML > #document to 3 of #text > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
 layer at (0,0) size 800x600
@@ -19,13 +19,13 @@ 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 784x58 [border: (2px solid #FF0000)]
-        RenderInline {SPAN} at (0,0) size 75x28
-          RenderText {#text} at (14,15) size 37x28
-            text run at (14,15) width 37: "bar "
+        RenderInline {SPAN} at (0,0) size 69x28
+          RenderText {#text} at (14,15) size 31x28
+            text run at (14,15) width 31: "bar"
           RenderInline {SPAN} at (0,0) size 7x28
-            RenderText {#text} at (50,15) size 7x28
-              text run at (50,15) width 7: " "
-          RenderText {#text} at (56,15) size 33x28
-            text run at (56,15) width 33: "foo"
+            RenderText {#text} at (44,15) size 7x28
+              text run at (44,15) width 7: " "
+          RenderText {#text} at (50,15) size 33x28
+            text run at (50,15) width 33: "foo"
         RenderText {#text} at (0,0) size 0x0
-caret: position 4 of child 0 {#text} of child 1 {SPAN} of child 1 {DIV} of body
+caret: position 3 of child 0 {#text} of child 1 {SPAN} of child 1 {DIV} of body
index 17faa71..2be6d9a 100644 (file)
@@ -10,7 +10,7 @@ EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotificatio
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: shouldDeleteDOMRange:range from 4 of #text > SPAN > DIV > BODY > HTML > #document to 7 of #text > SPAN > DIV > BODY > HTML > #document
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 4 of #text > SPAN > DIV > BODY > HTML > #document to 4 of #text > SPAN > DIV > BODY > HTML > #document toDOMRange:range from 4 of #text > SPAN > DIV > BODY > HTML > #document to 4 of #text > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 3 of #text > SPAN > DIV > BODY > HTML > #document to 3 of #text > SPAN > DIV > BODY > HTML > #document toDOMRange:range from 3 of #text > SPAN > DIV > BODY > HTML > #document to 3 of #text > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
 layer at (0,0) size 800x600
@@ -19,13 +19,13 @@ 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 784x58 [border: (2px solid #FF0000)]
-        RenderInline {SPAN} at (0,0) size 87x28
-          RenderText {#text} at (14,15) size 37x28
-            text run at (14,15) width 37: "bar "
+        RenderInline {SPAN} at (0,0) size 81x28
+          RenderText {#text} at (14,15) size 31x28
+            text run at (14,15) width 31: "bar"
           RenderInline {SPAN} at (0,0) size 19x28
-            RenderText {#text} at (50,15) size 19x28
-              text run at (50,15) width 19: "   "
-          RenderText {#text} at (68,15) size 33x28
-            text run at (68,15) width 33: "foo"
+            RenderText {#text} at (44,15) size 19x28
+              text run at (44,15) width 19: "   "
+          RenderText {#text} at (62,15) size 33x28
+            text run at (62,15) width 33: "foo"
         RenderText {#text} at (0,0) size 0x0
-caret: position 4 of child 0 {#text} of child 1 {SPAN} of child 1 {DIV} of body
+caret: position 3 of child 0 {#text} of child 1 {SPAN} of child 1 {DIV} of body
index ea874c7..2b4c9e2 100644 (file)
@@ -1,30 +1,17 @@
 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
-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 784x224 [border: (2px solid #0000FF)]
-        RenderBlock {DIV} at (14,14) size 756x60
-          RenderText {#text} at (0,1) size 66x28
-            text run at (0,1) width 66: "Tests: "
-          RenderBR {BR} at (0,0) size 0x0
-          RenderText {#text} at (0,31) size 492x28
-            text run at (0,31) width 492: "Smart delete when deleting the first word on a line."
-        RenderBlock {DIV} at (14,90) size 756x120
-          RenderText {#text} at (0,1) size 190x28
-            text run at (0,1) width 190: "Expected Results: "
-          RenderBR {BR} at (189,23) size 1x0
-          RenderText {#text} at (0,31) size 708x58
-            text run at (0,31) width 708: "The first word and the space following the first word should be deleted. It"
-            text run at (0,61) width 201: "should like this this: "
-          RenderBR {BR} at (200,83) size 1x0
-          RenderText {#text} at (0,91) size 70x28
-            text run at (0,91) width 70: "bar baz"
-      RenderBlock {DIV} at (0,248) size 784x34
-        RenderBlock {DIV} at (0,0) size 784x34 [border: (2px solid #FF0000)]
-          RenderText {#text} at (2,3) size 108x28
-            text run at (2,3) width 108: "foo bar baz"
-caret: position 1 of child 0 {#text} of child 1 {DIV} of child 3 {DIV} of body
+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: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
+Tests: 
+Smart delete when deleting the first word on a line.
+Expected Results: 
+The first word and the space following the first word should be deleted. It should like this this: 
+bar baz
+bar baz
+execDeleteCommand: <div id="test" class="editing">bar baz </div>
diff --git a/LayoutTests/platform/ios/editing/deleting/smart-delete-002-expected.txt b/LayoutTests/platform/ios/editing/deleting/smart-delete-002-expected.txt
new file mode 100644 (file)
index 0000000..d0d8aaf
--- /dev/null
@@ -0,0 +1,20 @@
+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: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 6 of #text > DIV > DIV > BODY > HTML > #document to 6 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: 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 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: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
+Tests: 
+Smart delete when deleting the second word of a line.
+Expected Results: 
+The second word and the space before the second word should be deleted. It should like this this: 
+foo baz
+foo baz
+execDeleteCommand: <div id="test" class="editing"> foo baz </div>
diff --git a/LayoutTests/platform/ios/editing/deleting/smart-delete-003-expected.txt b/LayoutTests/platform/ios/editing/deleting/smart-delete-003-expected.txt
new file mode 100644 (file)
index 0000000..d02e431
--- /dev/null
@@ -0,0 +1,20 @@
+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 > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document toDOMRange:range from 4 of #text > DIV > BODY > HTML > #document to 4 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 4 of #text > DIV > BODY > HTML > #document to 4 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: shouldDeleteDOMRange:range from 4 of #text > DIV > BODY > HTML > #document to 1 of #text > DIV > BODY > HTML > #document
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 3 of #text > DIV > BODY > HTML > #document to 0 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
+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'.
+
+Expected Results: 
+The second word and the space before the second word should be deleted. It should like this this: 
+foo baz
+foo baz
+
diff --git a/LayoutTests/platform/ios/editing/deleting/smart-delete-004-expected.txt b/LayoutTests/platform/ios/editing/deleting/smart-delete-004-expected.txt
new file mode 100644 (file)
index 0000000..2599304
--- /dev/null
@@ -0,0 +1,20 @@
+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 > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document toDOMRange:range from 4 of #text > DIV > BODY > HTML > #document to 4 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 4 of #text > DIV > BODY > HTML > #document to 4 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: shouldDeleteDOMRange:range from 4 of #text > DIV > BODY > HTML > #document to 1 of #text > DIV > BODY > HTML > #document
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 3 of #text > DIV > BODY > HTML > #document to 0 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
+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'.
+
+Expected Results: 
+The second word and the space before the second word should be deleted. It should like this this: 
+foo baz
+foo baz
+
diff --git a/LayoutTests/platform/ios/editing/deleting/smart-delete-across-editable-boundaries-2-expected.txt b/LayoutTests/platform/ios/editing/deleting/smart-delete-across-editable-boundaries-2-expected.txt
new file mode 100644 (file)
index 0000000..d88e5bf
--- /dev/null
@@ -0,0 +1,14 @@
+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 > DIV > BODY > HTML > #document to 3 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: shouldDeleteDOMRange:range from 0 of #text > DIV > BODY > HTML > #document to 3 of #text > DIV > BODY > HTML > #document
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
+This tests for a bug where expansion for smart delete would not consider editable boundaries. Only 'foo' should be deleted. You should see ' bar'. <radr://problem/5390681>
+
+bar
+
index 4d84c06..b3431c3 100644 (file)
@@ -15,15 +15,15 @@ layer at (0,0) size 800x600
           text run at (0,0) width 372: "This tests deletion of a selection that spans multiple cells. "
           text run at (371,0) width 366: "Just table content should be removed, not table structure."
       RenderBlock {DIV} at (0,36) size 784x30
-        RenderTable {TABLE} at (0,0) size 350x30 [border: (1px outset #808080)]
-          RenderTableSection {TBODY} at (1,1) size 348x28
-            RenderTableRow {TR} at (0,2) size 348x24
+        RenderTable {TABLE} at (0,0) size 346x30 [border: (1px outset #808080)]
+          RenderTableSection {TBODY} at (1,1) size 344x28
+            RenderTableRow {TR} at (0,2) size 344x24
               RenderTableCell {TD} at (2,2) size 160x24 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
                 RenderBlock {DIV} at (2,2) size 156x20
                   RenderText {#text} at (0,0) size 156x19
                     text run at (0,0) width 156: "These two pieces of text"
-              RenderTableCell {TD} at (163,2) size 183x24 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
-                RenderBlock {DIV} at (2,2) size 179x20
-                  RenderText {#text} at (0,0) size 179x19
-                    text run at (0,0) width 179: " should be in different cells."
+              RenderTableCell {TD} at (163,2) size 179x24 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
+                RenderBlock {DIV} at (2,2) size 175x20
+                  RenderText {#text} at (0,0) size 175x19
+                    text run at (0,0) width 175: "should be in different cells."
 caret: position 24 of child 0 {#text} of child 0 {DIV} of child 0 {TD} of child 0 {TR} of child 0 {TBODY} of child 0 {TABLE} of child 2 {DIV} of body
diff --git a/LayoutTests/platform/ios/editing/execCommand/delete-line-and-insert-text-in-font-inside-blockquote-expected.txt b/LayoutTests/platform/ios/editing/execCommand/delete-line-and-insert-text-in-font-inside-blockquote-expected.txt
new file mode 100644 (file)
index 0000000..5782ec0
--- /dev/null
@@ -0,0 +1,14 @@
+This tests deleting a line inside a font element inside a blockquote.
+
+There should be exactly one blockquote and you should see "hello world" below:
+| "
+"
+| <blockquote>
+|   style="background-color:yellow"
+|   <br>
+|   <font>
+|     style="color:blue"
+|     "hello<#selection-caret>world
+"
+| "
+"
@@ -10,7 +10,7 @@ EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotificatio
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: shouldDeleteDOMRange:range from 4 of #text > SPAN > DIV > BODY > HTML > #document to 7 of #text > SPAN > DIV > BODY > HTML > #document
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 4 of #text > SPAN > DIV > BODY > HTML > #document to 4 of #text > SPAN > DIV > BODY > HTML > #document toDOMRange:range from 4 of #text > SPAN > DIV > BODY > HTML > #document to 4 of #text > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 3 of #text > SPAN > DIV > BODY > HTML > #document to 3 of #text > SPAN > DIV > BODY > HTML > #document toDOMRange:range from 3 of #text > SPAN > DIV > BODY > HTML > #document to 3 of #text > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
 layer at (0,0) size 800x600
@@ -19,8 +19,8 @@ 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 784x58 [border: (2px solid #FF0000)]
-        RenderInline {SPAN} at (0,0) size 78x28
-          RenderText {#text} at (14,15) size 78x28
-            text run at (14,15) width 78: "foo  baz"
+        RenderInline {SPAN} at (0,0) size 72x28
+          RenderText {#text} at (14,15) size 72x28
+            text run at (14,15) width 72: "foo baz"
         RenderText {#text} at (0,0) size 0x0
-caret: position 4 of child 0 {#text} of child 1 {SPAN} of child 1 {DIV} of body
+caret: position 3 of child 0 {#text} of child 1 {SPAN} of child 1 {DIV} of body
index e7e198f..b436b46 100644 (file)
@@ -5,12 +5,11 @@ EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: shouldDeleteDOMRange:range from 8 of #text > BODY > HTML > #document to 11 of #text > BODY > HTML > #document
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 7 of #text > BODY > HTML > #document to 7 of #text > BODY > HTML > #document toDOMRange:range from 8 of #text > BODY > HTML > #document to 8 of #text > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 7 of #text > BODY > HTML > #document to 7 of #text > BODY > HTML > #document toDOMRange:range from 7 of #text > BODY > HTML > #document to 7 of #text > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
-EDITING DELEGATE: shouldInsertNode:#document-fragment replacingDOMRange:range from 8 of #text > BODY > HTML > #document to 8 of #text > BODY > HTML > #document givenAction:WebViewInsertActionPasted
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 8 of #text > BODY > HTML > #document to 8 of #text > BODY > HTML > #document toDOMRange:range from 11 of #text > BODY > HTML > #document to 11 of #text > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: shouldInsertNode:#document-fragment replacingDOMRange:range from 7 of #text > BODY > HTML > #document to 7 of #text > BODY > HTML > #document givenAction:WebViewInsertActionPasted
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 7 of #text > BODY > HTML > #document to 7 of #text > BODY > HTML > #document toDOMRange:range from 11 of #text > BODY > HTML > #document to 11 of #text > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
 layer at (0,0) size 800x600
diff --git a/LayoutTests/platform/mac/editing/deleting/smart-delete-001-expected.png b/LayoutTests/platform/mac/editing/deleting/smart-delete-001-expected.png
deleted file mode 100644 (file)
index 1a6a68f..0000000
Binary files a/LayoutTests/platform/mac/editing/deleting/smart-delete-001-expected.png and /dev/null differ
diff --git a/LayoutTests/platform/mac/editing/deleting/smart-delete-001-expected.txt b/LayoutTests/platform/mac/editing/deleting/smart-delete-001-expected.txt
deleted file mode 100644 (file)
index 7b3e9f1..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-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 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: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-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 784x212 [border: (2px solid #0000FF)]
-        RenderBlock {DIV} at (14,14) size 756x56
-          RenderText {#text} at (0,0) size 66x28
-            text run at (0,0) width 66: "Tests: "
-          RenderBR {BR} at (0,0) size 0x0
-          RenderText {#text} at (0,28) size 491x28
-            text run at (0,28) width 491: "Smart delete when deleting the first word on a line."
-        RenderBlock {DIV} at (14,86) size 756x112
-          RenderText {#text} at (0,0) size 190x28
-            text run at (0,0) width 190: "Expected Results: "
-          RenderBR {BR} at (189,22) size 1x0
-          RenderText {#text} at (0,28) size 706x56
-            text run at (0,28) width 706: "The first word and the space following the first word should be deleted. It"
-            text run at (0,56) width 201: "should like this this: "
-          RenderBR {BR} at (200,78) size 1x0
-          RenderText {#text} at (0,84) size 70x28
-            text run at (0,84) width 70: "bar baz"
-      RenderBlock {DIV} at (0,236) size 784x32
-        RenderBlock {DIV} at (0,0) size 784x32 [border: (2px solid #FF0000)]
-          RenderText {#text} at (2,2) size 70x28
-            text run at (2,2) width 70: "bar baz"
-caret: position 0 of child 0 {#text} of child 1 {DIV} of child 3 {DIV} of body
diff --git a/LayoutTests/platform/mac/editing/deleting/smart-delete-002-expected.png b/LayoutTests/platform/mac/editing/deleting/smart-delete-002-expected.png
deleted file mode 100644 (file)
index d3bbcbf..0000000
Binary files a/LayoutTests/platform/mac/editing/deleting/smart-delete-002-expected.png and /dev/null differ
diff --git a/LayoutTests/platform/mac/editing/deleting/smart-delete-003-expected.png b/LayoutTests/platform/mac/editing/deleting/smart-delete-003-expected.png
deleted file mode 100644 (file)
index 6f02110..0000000
Binary files a/LayoutTests/platform/mac/editing/deleting/smart-delete-003-expected.png and /dev/null differ
diff --git a/LayoutTests/platform/mac/editing/deleting/smart-delete-004-expected.png b/LayoutTests/platform/mac/editing/deleting/smart-delete-004-expected.png
deleted file mode 100644 (file)
index 48476df..0000000
Binary files a/LayoutTests/platform/mac/editing/deleting/smart-delete-004-expected.png and /dev/null differ
index c7204bf..0ddff38 100644 (file)
@@ -7,30 +7,10 @@ EDITING DELEGATE: shouldDeleteDOMRange:range from 1 of #text > DIV > DIV > BODY
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 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 784x212 [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 498x28
-            text run at (0,28) width 498: "Smart delete when deleting the first word on a line."
-        RenderBlock {DIV} at (14,86) 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 714x56
-            text run at (0,28) width 714: "The first word and the space following the first word should be deleted. It"
-            text run at (0,56) width 202: "should like this this: "
-          RenderBR {BR} at (202,78) size 0x0
-          RenderText {#text} at (0,84) size 71x28
-            text run at (0,84) width 71: "bar baz"
-      RenderBlock {DIV} at (0,236) 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 body
+Tests: 
+Smart delete when deleting the first word on a line.
+Expected Results: 
+The first word and the space following the first word should be deleted. It should like this this: 
+bar baz
+bar baz
+execDeleteCommand: <div id="test" class="editing">bar baz </div>
index 6b5a94e..1b752f8 100644 (file)
@@ -9,30 +9,10 @@ EDITING DELEGATE: shouldDeleteDOMRange:range from 5 of #text > DIV > DIV > BODY
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 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 784x212 [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 522x28
-            text run at (0,28) width 522: "Smart delete when deleting the second word of a line."
-        RenderBlock {DIV} at (14,86) 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 738x56
-            text run at (0,28) width 738: "The second word and the space before the second word should be deleted. It"
-            text run at (0,56) width 202: "should like this this: "
-          RenderBR {BR} at (202,78) size 0x0
-          RenderText {#text} at (0,84) size 72x28
-            text run at (0,84) width 72: "foo baz"
-      RenderBlock {DIV} at (0,236) size 784x32
-        RenderBlock {DIV} at (0,0) size 784x32 [border: (2px solid #FF0000)]
-          RenderText {#text} at (2,2) size 72x28
-            text run at (2,2) width 72: "foo baz"
-caret: position 4 of child 0 {#text} of child 1 {DIV} of child 3 {DIV} of body
+Tests: 
+Smart delete when deleting the second word of a line.
+Expected Results: 
+The second word and the space before the second word should be deleted. It should like this this: 
+foo baz
+foo baz
+execDeleteCommand: <div id="test" class="editing"> foo baz </div>
index ebe381d..e93e8e2 100644 (file)
@@ -1,6 +1,7 @@
 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 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document 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
@@ -10,20 +11,10 @@ EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotificatio
 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 3 of #text > DIV > BODY > HTML > #document to 0 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
-  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 768x36
-          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 127: "should see 'foo baz'."
-      RenderBlock {DIV} at (0,52) size 784x18
-        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 body
+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'.
+
+Expected Results: 
+The second word and the space before the second word should be deleted. It should like this this: 
+foo baz
+foo baz
+
index f998451..4f739fe 100644 (file)
@@ -1,6 +1,7 @@
 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 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document 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
@@ -10,20 +11,10 @@ EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotificatio
 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 3 of #text > DIV > BODY > HTML > #document to 0 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
-  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 745x36
-          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 159: "You should see 'foo baz'."
-      RenderBlock {DIV} at (0,52) size 784x18
-        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 body
+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'.
+
+Expected Results: 
+The second word and the space before the second word should be deleted. It should like this this: 
+foo baz
+foo baz
+
index ef93f3c..4de0d14 100644 (file)
@@ -124,13 +124,36 @@ window.UIHelper = class UIHelper {
         return UIHelper.activateAt(x, y);
     }
 
+    static async doubleActivateAt(x, y)
+    {
+        if (this.isIOS())
+            await UIHelper.doubleTapAt(x, y);
+        else
+            await UIHelper.doubleClickAt(x, y);
+    }
+
+    static async doubleActivateAtSelectionStart()
+    {
+        const rects = window.getSelection().getRangeAt(0).getClientRects();
+        const x = rects[0].left;
+        const y = rects[0].top;
+        if (this.isIOS()) {
+            await UIHelper.activateAndWaitForInputSessionAt(x, y);
+            await UIHelper.doubleTapAt(x, y);
+            // This is only here to deal with async/sync copy/paste calls, so
+            // once <rdar://problem/16207002> is resolved, should be able to remove for faster tests.
+            await new Promise(resolve => testRunner.runUIScript("uiController.uiScriptComplete()", resolve));
+        } else
+            await UIHelper.doubleClickAt(x, y);
+    }
+
     static async selectWordByDoubleTapOrClick(element, relativeX = 5, relativeY = 5)
     {
         const boundingRect = element.getBoundingClientRect();
         const x = boundingRect.x + relativeX;
         const y = boundingRect.y + relativeY;
         if (this.isIOS()) {
-            await UIHelper.tapAt(x, y);
+            await UIHelper.activateAndWaitForInputSessionAt(x, y);
             await UIHelper.doubleTapAt(x, y);
             // This is only here to deal with async/sync copy/paste calls, so
             // once <rdar://problem/16207002> is resolved, should be able to remove for faster tests.
index 2141a8f..8da12a9 100644 (file)
@@ -1,3 +1,35 @@
+2019-02-18  Megan Gardner  <megan_gardner@apple.com>
+
+        Turn On Smart Delete
+        https://bugs.webkit.org/show_bug.cgi?id=194320
+
+        Reviewed by Ryosuke Niwa.
+
+        Updated the following tests to work with iOS:
+        * 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/deleting/smart-delete-across-editable-boundaries-2.html:
+        * editing/selection/delete-word-granularity-text-control.html:
+
+        Turn on Smart delete for iOS at all times. Modify checks to allow Mac and iOS and other 
+        platforms to turn on smart delete when desired.
+
+        * editing/Editor.cpp:
+        (WebCore::Editor::shouldSmartDelete):
+        Allow platfroms to determine if smart delete should be on.
+        On mac, this is via word granularity, on iOS this is just on all the time.
+        (WebCore::Editor::canSmartCopyOrDelete):
+        (WebCore::Editor::performCutOrCopy):
+        * editing/Editor.h:
+        * editing/EditorCommand.cpp:
+        (WebCore::executeDelete):
+        * editing/ios/EditorIOS.mm:
+        (WebCore::Editor::shouldSmartDelete):
+        * editing/mac/EditorMac.mm:
+        (WebCore::Editor::shouldSmartDelete):
+
 2019-02-17  David Kilzer  <ddkilzer@apple.com>
 
         Unreviewed, rolling out r241620.
index 655c4ed..d54020f 100644 (file)
@@ -95,6 +95,9 @@ public:
 
     // On iOS, we don't want to select all the text when focusing a field. Instead, match platform behavior by going to the end of the line.
     bool shouldMoveSelectionToEndWhenFocusingTextInput() const { return m_type == EditingIOSBehavior; }
+    
+    // On iOS, when smart delete is on, it is always on, and should do not additional checks (i.e. WordGranularity).
+    bool shouldAlwaysSmartDelete() const { return m_type == EditingIOSBehavior; }
 
 private:
     EditingBehaviorType m_type;
index df190e5..5abdbf8 100644 (file)
@@ -512,6 +512,13 @@ bool Editor::canDeleteRange(Range* range) const
     return true;
 }
 
+bool Editor::shouldSmartDelete()
+{
+    if (behavior().shouldAlwaysSmartDelete())
+        return true;
+    return m_frame.selection().granularity() == WordGranularity;
+}
+
 bool Editor::smartInsertDeleteEnabled()
 {   
     return client() && client()->smartInsertDeleteEnabled();
@@ -519,7 +526,7 @@ bool Editor::smartInsertDeleteEnabled()
     
 bool Editor::canSmartCopyOrDelete()
 {
-    return client() && client()->smartInsertDeleteEnabled() && m_frame.selection().granularity() == WordGranularity;
+    return client() && client()->smartInsertDeleteEnabled() && shouldSmartDelete();
 }
 
 bool Editor::isSelectTrailingWhitespaceEnabled() const
index 4547d47..3b4a6d2 100644 (file)
@@ -165,7 +165,8 @@ public:
     WEBCORE_EXPORT bool canCopy() const;
     WEBCORE_EXPORT bool canPaste() const;
     WEBCORE_EXPORT bool canDelete() const;
-    bool canSmartCopyOrDelete();
+    WEBCORE_EXPORT bool canSmartCopyOrDelete();
+    bool shouldSmartDelete();
 
     WEBCORE_EXPORT void cut();
     WEBCORE_EXPORT void copy();
index 9494709..b460b94 100644 (file)
@@ -297,7 +297,7 @@ static bool executeDelete(Frame& frame, Event*, EditorCommandSource source, cons
     case CommandFromDOMWithUserInterface:
         // If the current selection is a caret, delete the preceding character. IE performs forwardDelete, but we currently side with Firefox.
         // Doesn't scroll to make the selection visible, or modify the kill ring (this time, siding with IE, not Firefox).
-        TypingCommand::deleteKeyPressed(*frame.document(), frame.selection().granularity() == WordGranularity ? TypingCommand::SmartDelete : 0);
+        TypingCommand::deleteKeyPressed(*frame.document(), frame.editor().shouldSmartDelete() ? TypingCommand::SmartDelete : 0);
         return true;
     }
     ASSERT_NOT_REACHED();