LayoutTests:
authorjusting <justing@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 11 May 2006 22:21:59 +0000 (22:21 +0000)
committerjusting <justing@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 11 May 2006 22:21:59 +0000 (22:21 +0000)
        Reviewed by thatcher, levi

        Inserting an <hr> into <div>foo^bar</div> now produces
        <div>foo</div><hr><div>bar</div>, instead of <div>foo<hr>bar</div>,
        which means that removing an inserted <hr> programmatically from
        javascript produces a different visual result than before (the
        new result is arguably more correct):
        * editing/execCommand/insertHorizontalRule.html:
        * editing/execCommand/insertHorizontalRule-expected.checksum:
        * editing/execCommand/insertHorizontalRule-expected.png:
        * editing/execCommand/insertHorizontalRule-expected.txt:

        Equivalent render trees or changes in the editing delegate
        notifications that reflect the fact that we are doing an end
        merge more often:
        * editing/pasteboard/paste-text-001-expected.txt:
        * editing/pasteboard/paste-text-at-tabspan-001-expected.txt:
        * editing/pasteboard/paste-text-at-tabspan-002-expected.txt:
        * editing/pasteboard/paste-text-at-tabspan-003-expected.txt:
        * editing/pasteboard/smart-paste-003-expected.txt:
        * editing/pasteboard/smart-paste-004-expected.txt:
        * editing/pasteboard/smart-paste-005-expected.txt:
        * editing/pasteboard/smart-paste-006-expected.txt:
        * editing/pasteboard/smart-paste-007-expected.txt:
        * editing/style/smoosh-styles-001-expected.txt:
        * editing/style/smoosh-styles-002-expected.txt:

WebCore:

        Reviewed by thatcher, levi

        * editing/ReplaceSelectionCommand.cpp:
        (WebCore::ReplaceSelectionCommand::doApply):
        Removed a use fragment.hasMoreThanOneBlock to decide if the paragraph containing the
        position pasted into must be split to avoid block nesting.  We now split unnecessarily
        some times, but the end merge cleans up for us.

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

18 files changed:
LayoutTests/ChangeLog
LayoutTests/editing/execCommand/insertHorizontalRule-expected.checksum
LayoutTests/editing/execCommand/insertHorizontalRule-expected.png
LayoutTests/editing/execCommand/insertHorizontalRule-expected.txt
LayoutTests/editing/execCommand/insertHorizontalRule.html
LayoutTests/editing/pasteboard/paste-text-001-expected.txt
LayoutTests/editing/pasteboard/paste-text-at-tabspan-001-expected.txt
LayoutTests/editing/pasteboard/paste-text-at-tabspan-002-expected.txt
LayoutTests/editing/pasteboard/paste-text-at-tabspan-003-expected.txt
LayoutTests/editing/pasteboard/smart-paste-003-expected.txt
LayoutTests/editing/pasteboard/smart-paste-004-expected.txt
LayoutTests/editing/pasteboard/smart-paste-005-expected.txt
LayoutTests/editing/pasteboard/smart-paste-006-expected.txt
LayoutTests/editing/pasteboard/smart-paste-007-expected.txt
LayoutTests/editing/style/smoosh-styles-001-expected.txt
LayoutTests/editing/style/smoosh-styles-002-expected.txt
WebCore/ChangeLog
WebCore/editing/ReplaceSelectionCommand.cpp

index 2d85365db6d40b7b9cc95e832bad4b8b1a7319fa..5d95a8d9aea4fbfa7d66b2ccc6afc9d5b72a5a1e 100644 (file)
@@ -1,3 +1,32 @@
+2006-05-11  Justin Garcia  <justin.garcia@apple.com>
+
+        Reviewed by thatcher, levi
+        
+        Inserting an <hr> into <div>foo^bar</div> now produces 
+        <div>foo</div><hr><div>bar</div>, instead of <div>foo<hr>bar</div>, 
+        which means that removing an inserted <hr> programmatically from 
+        javascript produces a different visual result than before (the 
+        new result is arguably more correct):
+        * editing/execCommand/insertHorizontalRule.html:
+        * editing/execCommand/insertHorizontalRule-expected.checksum:
+        * editing/execCommand/insertHorizontalRule-expected.png:
+        * editing/execCommand/insertHorizontalRule-expected.txt:
+        
+        Equivalent render trees or changes in the editing delegate
+        notifications that reflect the fact that we are doing an end
+        merge more often:
+        * editing/pasteboard/paste-text-001-expected.txt:
+        * editing/pasteboard/paste-text-at-tabspan-001-expected.txt:
+        * editing/pasteboard/paste-text-at-tabspan-002-expected.txt:
+        * editing/pasteboard/paste-text-at-tabspan-003-expected.txt:
+        * editing/pasteboard/smart-paste-003-expected.txt:
+        * editing/pasteboard/smart-paste-004-expected.txt:
+        * editing/pasteboard/smart-paste-005-expected.txt:
+        * editing/pasteboard/smart-paste-006-expected.txt:
+        * editing/pasteboard/smart-paste-007-expected.txt:
+        * editing/style/smoosh-styles-001-expected.txt:
+        * editing/style/smoosh-styles-002-expected.txt:
+
 2006-05-11  Darin Adler  <darin@apple.com>
 
         - test for http://bugzilla.opendarwin.org/show_bug.cgi?id=8743
index 10442cf4621ede4f8cba0a05e91b0f02c20aacac..5138712c1d41acf9b97b322f6f3afe3767b7656e 100644 (file)
@@ -1 +1 @@
-85fc78d223f7af1d7a9a8acfffbb3e96
\ No newline at end of file
+e4b39ce4c1f9e167ad07bea9030bfd35
\ No newline at end of file
index ddb639dc1689ef70e9aacc0a97edbf8d8ce67753..33e4c139fd431d4c5efc760356ac1311e0429266 100644 (file)
Binary files a/LayoutTests/editing/execCommand/insertHorizontalRule-expected.png and b/LayoutTests/editing/execCommand/insertHorizontalRule-expected.png differ
index f658187d04f964aad44b9c68316890efa3b6b655..cda43f5b7a4da280f4b5ec83bd6f39f88a57dc6b 100644 (file)
@@ -4,7 +4,7 @@ EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotificatio
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 3 of #text > DIV > BODY > HTML > #document to 3 of #text > DIV > BODY > HTML > #document toDOMRange:range from 0 of HR > DIV > BODY > HTML > #document to 0 of HR > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of HR > DIV > BODY > HTML > #document to 0 of HR > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
 EDITING DELEGATE: shouldEndEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 3 of DIV > BODY > HTML > #document
@@ -15,7 +15,7 @@ EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotificatio
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 3 of #text > DIV > BODY > HTML > #document to 3 of #text > DIV > BODY > HTML > #document toDOMRange:range from 0 of HR > DIV > BODY > HTML > #document to 0 of HR > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of HR > DIV > BODY > HTML > #document to 0 of HR > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
 layer at (0,0) size 800x600
@@ -29,19 +29,21 @@ layer at (0,0) size 800x600
       RenderBlock {P} at (0,34) size 784x18
         RenderText {#text} at (0,0) size 282x18
           text run at (0,0) width 282: "This test inserts an hr between 'foo' and 'bar'."
-      RenderBlock {DIV} at (0,68) size 784x56 [border: (1px solid #0000FF)]
-        RenderBlock (anonymous) at (1,1) size 782x18
+      RenderBlock {DIV} at (0,68) size 784x54
+        RenderBlock (anonymous) at (0,0) size 784x18
           RenderText {#text} at (0,0) size 21x18
             text run at (0,0) width 21: "foo"
-        RenderBlock {HR} at (1,27) size 782x2 [border: (1px inset #000000)]
-        RenderBlock (anonymous) at (1,37) size 782x18
+        RenderBlock {HR} at (0,26) size 784x2 [border: (1px inset #000000)]
+        RenderBlock {DIV} at (0,36) size 784x18
           RenderText {#text} at (0,0) size 20x18
             text run at (0,0) width 20: "bar"
-      RenderBlock {P} at (0,140) size 784x18
+      RenderBlock {P} at (0,138) size 784x18
         RenderText {#text} at (0,0) size 634x18
           text run at (0,0) width 634: "This test inserts an hr with id=\"hr\" between 'foo' and 'bar', fetches the hr using its id, then removes it."
-      RenderBlock {DIV} at (0,174) size 784x20 [border: (1px solid #0000FF)]
-        RenderText {#text} at (1,1) size 21x18
-          text run at (1,1) width 21: "foo"
-        RenderText {#text} at (22,1) size 20x18
-          text run at (22,1) width 20: "bar"
+      RenderBlock {DIV} at (0,172) size 784x36
+        RenderBlock (anonymous) at (0,0) size 784x18
+          RenderText {#text} at (0,0) size 21x18
+            text run at (0,0) width 21: "foo"
+        RenderBlock {DIV} at (0,18) size 784x18
+          RenderText {#text} at (0,0) size 20x18
+            text run at (0,0) width 20: "bar"
index a5cfd85429d2fdb2d99dd6757740eab15ab4ff12..122d927d9ac2d9c4ffb831df60623b7c30690738 100644 (file)
@@ -1,5 +1,3 @@
-<style>div { border: 1px solid blue; }</style>
-
 <p>These are tests for execCommand(InsertHorizontalRule).</p>
 
 <p>This test inserts an hr between 'foo' and 'bar'.</p>
index bbfbf8df8a758c7587974d7d7ae366cab283b545..3da005d2301d5b688f5ef3a2c34509b4121417e9 100644 (file)
@@ -10,7 +10,7 @@ EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotificatio
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: shouldInsertNode:#document-fragment replacingDOMRange:range from 7 of #text > SPAN > DIV > BODY > HTML > #document to 7 of #text > SPAN > DIV > BODY > HTML > #document givenAction:WebViewInsertActionPasted
-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 3 of #text > SPAN > SPAN > DIV > BODY > HTML > #document to 3 of #text > SPAN > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 3 of #text > SPAN > SPAN > DIV > BODY > HTML > #document to 3 of #text > SPAN > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
 layer at (0,0) size 800x600
@@ -22,10 +22,10 @@ layer at (0,0) size 800x600
         RenderInline {SPAN} at (0,0) size 140x28
           RenderText {#text} at (14,14) size 69x28
             text run at (14,14) width 69: "foo bar"
-          RenderInline {SPAN} at (0,0) size 31x28
+          RenderInline {SPAN} at (0,0) size 71x28
             RenderText {#text} at (83,14) size 31x28
               text run at (83,14) width 31: "bar"
-          RenderText {#text} at (114,14) size 40x28
-            text run at (114,14) width 40: " baz"
-        RenderText {#text} at (0,0) size 0x0
+            RenderInline {SPAN} at (0,0) size 40x28
+              RenderText {#text} at (114,14) size 40x28
+                text run at (114,14) width 40: " baz"
 caret: position 3 of child 0 {#text} of child 1 {SPAN} of child 1 {SPAN} of child 1 {DIV} of child 1 {BODY} of child 0 {HTML} of document
index fed393fb8965c761630c98e0e8ee4629bb72fcbe..25d7f979131e5dbe3265a819ada87b212facb32f 100644 (file)
@@ -19,13 +19,14 @@ layer at (0,0) size 800x600
         RenderInline {SPAN} at (0,0) size 155x28
           RenderText {#text} at (14,14) size 11x28
             text run at (14,14) width 11: "a"
-          RenderInline {SPAN} at (0,0) size 23x28
+          RenderInline {SPAN} at (0,0) size 144x28
             RenderText {#text} at (25,14) size 23x28
               text run at (25,14) width 23: "ax"
-          RenderInline {SPAN} at (0,0) size 110x28
-            RenderText {#text} at (48,14) size 110x28
-              text run at (48,14) width 110: "\x{9}\x{9}\x{9}"
-          RenderText {#text} at (158,14) size 11x28
-            text run at (158,14) width 11: "z"
-        RenderText {#text} at (0,0) size 0x0
+            RenderInline {SPAN} at (0,0) size 121x28
+              RenderInline {SPAN} at (0,0) size 110x28
+                RenderText {#text} at (48,14) size 110x28
+                  text run at (48,14) width 110: "\x{9}\x{9}\x{9}"
+              RenderText {#text} at (158,14) size 11x28
+                text run at (158,14) width 11: "z"
+          RenderInline {SPAN} at (0,0) size 0x28
 caret: position 2 of child 0 {#text} of child 1 {SPAN} of child 1 {SPAN} of child 1 {DIV} of child 1 {BODY} of child 0 {HTML} of document
index 1c2e07192e97aeff53158610d10c93cec0a67d6d..5d3ffeb71f58e41549bd856a738b70b3233d68c6 100644 (file)
@@ -5,7 +5,7 @@ EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotificatio
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: shouldInsertNode:#document-fragment replacingDOMRange:range from 1 of #text > SPAN > SPAN > DIV > BODY > HTML > #document to 1 of #text > SPAN > SPAN > DIV > BODY > HTML > #document givenAction:WebViewInsertActionPasted
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > SPAN > SPAN > DIV > BODY > HTML > #document to 1 of #text > SPAN > SPAN > DIV > BODY > HTML > #document toDOMRange:range from 1 of #text > SPAN > SPAN > DIV > BODY > HTML > #document to 1 of #text > SPAN > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 1 of #text > SPAN > SPAN > DIV > BODY > HTML > #document to 1 of #text > SPAN > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > SPAN > SPAN > DIV > BODY > HTML > #document to 1 of #text > SPAN > SPAN > DIV > BODY > HTML > #document toDOMRange:range from 2 of #text > SPAN > SPAN > DIV > BODY > HTML > #document to 2 of #text > SPAN > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
@@ -23,13 +23,13 @@ layer at (0,0) size 800x600
           RenderInline {SPAN} at (0,0) size 37x28
             RenderText {#text} at (25,14) size 37x28
               text run at (25,14) width 37: "\x{9}"
-          RenderInline {SPAN} at (0,0) size 23x28
+          RenderInline {SPAN} at (0,0) size 107x28
             RenderText {#text} at (62,14) size 23x28
               text run at (62,14) width 23: "ax"
-          RenderInline {SPAN} at (0,0) size 73x28
-            RenderText {#text} at (85,14) size 73x28
-              text run at (85,14) width 73: "\x{9}\x{9}"
-          RenderText {#text} at (158,14) size 11x28
-            text run at (158,14) width 11: "z"
-        RenderText {#text} at (0,0) size 0x0
+            RenderInline {SPAN} at (0,0) size 84x28
+              RenderInline {SPAN} at (0,0) size 73x28
+                RenderText {#text} at (85,14) size 73x28
+                  text run at (85,14) width 73: "\x{9}\x{9}"
+              RenderText {#text} at (158,14) size 11x28
+                text run at (158,14) width 11: "z"
 caret: position 2 of child 0 {#text} of child 2 {SPAN} of child 1 {SPAN} of child 1 {DIV} of child 1 {BODY} of child 0 {HTML} of document
index 8d7329ccdc1982b0bfd6877a174d44c7f5a930ea..8ff9aaff78de8edbd6447e7082168324c3d98010 100644 (file)
@@ -25,10 +25,10 @@ layer at (0,0) size 800x600
           RenderInline {SPAN} at (0,0) size 133x28
             RenderText {#text} at (25,14) size 133x28
               text run at (25,14) width 133: "\x{9}\x{9}\x{9}"
-          RenderInline {SPAN} at (0,0) size 23x28
+          RenderInline {SPAN} at (0,0) size 34x28
             RenderText {#text} at (158,14) size 23x28
               text run at (158,14) width 23: "ax"
-          RenderText {#text} at (181,14) size 11x28
-            text run at (181,14) width 11: "z"
-        RenderText {#text} at (0,0) size 0x0
+            RenderInline {SPAN} at (0,0) size 11x28
+              RenderText {#text} at (181,14) size 11x28
+                text run at (181,14) width 11: "z"
 caret: position 2 of child 0 {#text} of child 2 {SPAN} of child 1 {SPAN} of child 1 {DIV} of child 1 {BODY} of child 0 {HTML} of document
index cdbc608d01c167022be5bd3bf8101dbab7e7a405..fc3615ee8c7ecd822a61d7495fbcec53c7c6286d 100644 (file)
@@ -4,7 +4,7 @@ EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotificatio
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: shouldInsertNode:#document-fragment replacingDOMRange:range from 5 of #text > DIV > DIV > BODY > HTML > #document to 5 of #text > DIV > DIV > BODY > HTML > #document givenAction:WebViewInsertActionPasted
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 5 of #text > DIV > DIV > BODY > HTML > #document to 5 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 5 of #text > DIV > DIV > BODY > HTML > #document to 5 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) 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: webViewDidChange:WebViewDidChangeNotification
 layer at (0,0) size 800x600
index e1ff3d01d802268ca2eb012d0e1cf5c003327a79..b5fc81fdabeda6d5129de03bdbc18e06af6291b2 100644 (file)
@@ -5,7 +5,7 @@ EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotificatio
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: shouldInsertNode:#document-fragment replacingDOMRange:range from 6 of #text > DIV > DIV > BODY > HTML > #document to 6 of #text > DIV > DIV > BODY > HTML > #document givenAction:WebViewInsertActionPasted
-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 5 of #text > DIV > DIV > BODY > HTML > #document to 5 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) 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: webViewDidChange:WebViewDidChangeNotification
 layer at (0,0) size 800x600
index 79d402ea3230fa463d730d3ae21436a8e14e1acc..dd64838a8e9fa1fd6c2b0dc2c96854beb5c5fee0 100644 (file)
@@ -6,7 +6,7 @@ EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotificatio
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: shouldInsertNode:#document-fragment replacingDOMRange:range from 3 of #text > DIV > DIV > BODY > HTML > #document to 3 of #text > DIV > DIV > BODY > HTML > #document givenAction:WebViewInsertActionPasted
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 2 of #text > DIV > DIV > BODY > HTML > #document to 2 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 6 of #text > DIV > DIV > BODY > HTML > #document to 6 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 6 of #text > DIV > DIV > BODY > HTML > #document to 6 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
 layer at (0,0) size 800x600
index 234624bb7c83bb19b58dac99251e4b0c82cf05b1..21927ae519a0fce61209ab5986d6fad508533c63 100644 (file)
@@ -14,7 +14,7 @@ EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotificatio
 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: shouldInsertNode:#document-fragment replacingDOMRange:range from 1 of #text > DIV > DIV > BODY > HTML > #document to 1 of #text > DIV > DIV > BODY > HTML > #document givenAction:WebViewInsertActionPasted
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > DIV > DIV > BODY > HTML > #document to 1 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: shouldChangeSelectedDOMRange:(null) 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
 layer at (0,0) size 800x600
index 0621ee35a50c91b17fdf2d10769b7526f0613cef..5539cbb911947d76cf3671110a38afeb724687c9 100644 (file)
@@ -14,7 +14,7 @@ EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotificatio
 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: shouldInsertNode:#document-fragment replacingDOMRange:range from 1 of #text > DIV > DIV > BODY > HTML > #document to 1 of #text > DIV > DIV > BODY > HTML > #document givenAction:WebViewInsertActionPasted
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > DIV > DIV > BODY > HTML > #document to 1 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 5 of #text > DIV > DIV > BODY > HTML > #document to 5 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) 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: webViewDidChange:WebViewDidChangeNotification
 layer at (0,0) size 800x600
index fd55c583ed7e955eda02afb040af04a0258caf1b..bd77ccd192f587fe886d6a56a65bbbfeef92f597 100644 (file)
@@ -14,7 +14,7 @@ EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotificatio
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: shouldInsertNode:#document-fragment replacingDOMRange:range from 2 of #text > SPAN > DIV > DIV > BODY > HTML > #document to 2 of #text > SPAN > DIV > DIV > BODY > HTML > #document givenAction:WebViewInsertActionPasted
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 2 of #text > SPAN > DIV > DIV > BODY > HTML > #document to 2 of #text > SPAN > DIV > DIV > BODY > HTML > #document toDOMRange:range from 3 of #text > FONT > SPAN > DIV > DIV > BODY > HTML > #document to 3 of #text > FONT > SPAN > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 3 of #text > FONT > SPAN > DIV > DIV > BODY > HTML > #document to 3 of #text > FONT > SPAN > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
 layer at (0,0) size 800x600
@@ -50,9 +50,11 @@ layer at (0,0) size 800x600
           RenderInline {SPAN} at (0,0) size 77x28 [color=#FF0000]
             RenderText {#text} at (2,2) size 23x28
               text run at (2,2) width 23: "ab"
-            RenderInline {FONT} at (0,0) size 34x28 [color=#000000]
+            RenderInline {FONT} at (0,0) size 54x28 [color=#000000]
               RenderText {#text} at (25,2) size 34x28
                 text run at (25,2) width 34: "cde"
-            RenderText {#text} at (59,2) size 20x28
-              text run at (59,2) width 20: "fg"
+              RenderInline {SPAN} at (0,0) size 20x28
+                RenderInline {FONT} at (0,0) size 20x28 [color=#FF0000]
+                  RenderText {#text} at (59,2) size 20x28
+                    text run at (59,2) width 20: "fg"
 caret: position 3 of child 0 {#text} of child 1 {FONT} of child 1 {SPAN} of child 1 {DIV} of child 3 {DIV} of child 1 {BODY} of child 0 {HTML} of document
index d0c0270278ac6ed087649ad630ef2bbeac86a4f9..e8e1ea25434ad3ff6cb2bc0c5f5ce894ce63ec3b 100644 (file)
@@ -14,7 +14,7 @@ EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotificatio
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: shouldInsertNode:#document-fragment replacingDOMRange:range from 2 of #text > SPAN > DIV > DIV > BODY > HTML > #document to 2 of #text > SPAN > DIV > DIV > BODY > HTML > #document givenAction:WebViewInsertActionPasted
-EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 2 of #text > SPAN > DIV > DIV > BODY > HTML > #document to 2 of #text > SPAN > DIV > DIV > BODY > HTML > #document toDOMRange:range from 3 of #text > B > SPAN > FONT > SPAN > DIV > DIV > BODY > HTML > #document to 3 of #text > B > SPAN > FONT > SPAN > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 3 of #text > B > SPAN > FONT > SPAN > DIV > DIV > BODY > HTML > #document to 3 of #text > B > SPAN > FONT > SPAN > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
 layer at (0,0) size 800x600
@@ -49,11 +49,14 @@ layer at (0,0) size 800x600
           RenderInline {SPAN} at (0,0) size 99x28 [color=#FF0000]
             RenderText {#text} at (2,8) size 29x28
               text run at (2,8) width 29: "ab"
-            RenderInline {FONT} at (0,0) size 46x37 [color=#000000]
-              RenderInline {SPAN} at (0,0) size 46x37
-                RenderInline {B} at (0,0) size 46x37
+            RenderInline {FONT} at (0,0) size 70x37 [color=#000000]
+              RenderInline {SPAN} at (0,0) size 70x37
+                RenderInline {B} at (0,0) size 70x37
                   RenderText {#text} at (31,2) size 46x37
                     text run at (31,2) width 46: "cde"
-            RenderText {#text} at (77,8) size 24x28
-              text run at (77,8) width 24: "fg"
+                  RenderInline {SPAN} at (0,0) size 24x37
+                    RenderInline {FONT} at (0,0) size 24x37 [color=#FF0000]
+                      RenderInline {SPAN} at (0,0) size 24x28
+                        RenderText {#text} at (77,8) size 24x28
+                          text run at (77,8) width 24: "fg"
 caret: position 3 of child 0 {#text} of child 0 {B} of child 0 {SPAN} of child 1 {FONT} of child 1 {SPAN} of child 1 {DIV} of child 3 {DIV} of child 1 {BODY} of child 0 {HTML} of document
index c4ea797849aa1165256a7a7409daab58dbfb3469..ec72cc8fa6af2f7250c2e7c2be1050bdd420f71c 100644 (file)
@@ -1,3 +1,13 @@
+2006-05-10  Justin Garcia  <justin.garcia@apple.com>
+
+        Reviewed by thatcher, levi
+
+        * editing/ReplaceSelectionCommand.cpp:
+        (WebCore::ReplaceSelectionCommand::doApply):
+        Removed a use fragment.hasMoreThanOneBlock to decide if the paragraph containing the
+        position pasted into must be split to avoid block nesting.  We now split unnecessarily
+        some times, but the end merge cleans up for us.
+
 2006-05-11  David Hyatt  <hyatt@apple.com>
 
         This patch makes drawHighlightForText a completely cross-platform method
         clobber it.
         
         (WebCore::ReplaceSelectionCommand::removeEndBRIfNeeded):
-        brs where [br, 0] is at the end of a block and not at the start of the paragraph
+        brs where [br, 0] is at the end of a block and not at the start of a paragraph
         are the ones that are collapsed because of quirks mode.
 
 2006-05-10  David Hyatt  <hyatt@apple.com>
index 3910d1c9add177eb1ca9107206b64c6a327f227f..1205f28c0086529562edc87e4952b1e9004e92fb 100644 (file)
@@ -577,7 +577,7 @@ void ReplaceSelectionCommand::doApply()
         // FIXME: If this code is really about preventing block nesting, then the check should be !isEndOfBlock(visibleStart) and we 
         // should split the block in two, instead of inserting a paragraph separator. In the meantime, it appears that code below 
         // depends on this split happening when the paste position is not the start or end of a paragraph.
-        if (fragment.hasMoreThanOneBlock() && !isEndOfParagraph(visibleStart) && !isStartOfParagraph(visibleStart)) {
+        if (!isEndOfParagraph(visibleStart) && !isStartOfParagraph(visibleStart)) {
             insertParagraphSeparator();
             setEndingSelection(VisiblePosition(endingSelection().start(), VP_DEFAULT_AFFINITY).previous());
         }