Reviewed by John
authorkocienda <kocienda@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 5 Jan 2005 15:59:36 +0000 (15:59 +0000)
committerkocienda <kocienda@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 5 Jan 2005 15:59:36 +0000 (15:59 +0000)
        Fix for this bug:

        <rdar://problem/3926522> Pressing return in a quoted block inserts too many newlines

        * khtml/editing/htmlediting.cpp:
        (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply): Call to insertBlockPlaceholderIfNeeded()
        for the block we are adding was being done at the wrong time, which led to the placeholder remaining
        in the document when it was not needed. This resulted in the extra space reported in the bug.

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

WebCore/ChangeLog-2005-08-23
WebCore/khtml/editing/htmlediting.cpp

index cb0aa0b..73d4888 100644 (file)
@@ -1,3 +1,16 @@
+2005-01-04  Ken Kocienda  <kocienda@apple.com>
+
+        Reviewed by John
+
+        Fix for this bug:
+        
+        <rdar://problem/3926522> Pressing return in a quoted block inserts too many newlines
+
+        * khtml/editing/htmlediting.cpp:
+        (khtml::InsertParagraphSeparatorInQuotedContentCommand::doApply): Call to insertBlockPlaceholderIfNeeded()
+        for the block we are adding was being done at the wrong time, which led to the placeholder remaining
+        in the document when it was not needed. This resulted in the extra space reported in the bug.
+
 2005-01-04  Kevin Decker  <kdecker@apple.com>
 
         Reviewed by Hyatt.
index fe4299f..0e199e4 100644 (file)
@@ -2525,7 +2525,6 @@ void InsertParagraphSeparatorInQuotedContentCommand::doApply()
         clonedBlockquote->ref();
         clonedNodes.append(clonedBlockquote);
         insertNodeAfter(clonedBlockquote, m_breakNode);
-        insertBlockPlaceholderIfNeeded(clonedBlockquote);
         
         // Make clones of ancestors in between the start node and the top blockquote.
         NodeImpl *parent = clonedBlockquote;
@@ -2576,6 +2575,9 @@ void InsertParagraphSeparatorInQuotedContentCommand::doApply()
             }
             leftParent = leftParent->parentNode();
         }
+        
+        // Make sure the cloned block quote renders.
+        insertBlockPlaceholderIfNeeded(clonedBlockquote);
     }
     
     // Put the selection right before the break.