WebCore:
authoradele@apple.com <adele@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Mar 2009 00:57:49 +0000 (00:57 +0000)
committeradele@apple.com <adele@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Mar 2009 00:57:49 +0000 (00:57 +0000)
2009-03-24  Adele Peterson  <adele@apple.com>

        Reviewed by Darin Adler.

        Fix for https://bugs.webkit.org/show_bug.cgi?id=24707
        <rdar://problem/6593021> Deleting with a caret in a blank, quoted line decreases the quoting, but does not delete the line

        * editing/TypingCommand.cpp: (WebCore::TypingCommand::deleteKeyPressed):
        After breaking out of an empty mail blockquote, we still want continue with the deletion
        so actual content will get deleted, and not just the quote style.

LayoutTests:

2009-03-24  Adele Peterson  <adele@apple.com>

        Reviewed by Darin Adler.

        Updated tests for https://bugs.webkit.org/show_bug.cgi?id=24707
        <rdar://problem/6593021> Deleting with a caret in a blank, quoted line decreases the quoting, but does not delete the line

        * editing/deleting/2610675-1-expected.txt:
        * editing/deleting/2610675-1.html:
        * editing/deleting/2610675-2-expected.txt:
        * editing/deleting/2610675-2.html:

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

LayoutTests/ChangeLog
LayoutTests/editing/deleting/2610675-1-expected.txt
LayoutTests/editing/deleting/2610675-1.html
LayoutTests/editing/deleting/2610675-2-expected.txt
LayoutTests/editing/deleting/2610675-2.html
WebCore/ChangeLog
WebCore/editing/TypingCommand.cpp

index 757860f..1489136 100644 (file)
@@ -1,3 +1,15 @@
+2009-03-24  Adele Peterson  <adele@apple.com>
+
+        Reviewed by Darin Adler.
+
+        Updated tests for https://bugs.webkit.org/show_bug.cgi?id=24707
+        <rdar://problem/6593021> Deleting with a caret in a blank, quoted line decreases the quoting, but does not delete the line
+
+        * editing/deleting/2610675-1-expected.txt:
+        * editing/deleting/2610675-1.html:
+        * editing/deleting/2610675-2-expected.txt:
+        * editing/deleting/2610675-2.html:
+
 2009-03-24  Mark Rowe  <mrowe@apple.com>
 
         Rubber-stamped by Sam Weinig.
index be7bd52..e0fa5dc 100644 (file)
@@ -1,7 +1,6 @@
-This tests to see that if the caret is in an empty quoted paragraph, that paragraph is in content that preserve newlines, and there's no quoted content before that paragraph, then pressing delete removes that paragraph's quoting. Below you should see the attribution line, an empty paragraph, an unquoted paragraph, and then a quoted paragraph with "quoted" in it.
+This tests to see that if the caret is in an empty quoted paragraph, that paragraph is in content that preserve newlines, and there's no quoted content before that paragraph, then pressing delete removes that paragraph's quoting and removes the empty line. Below you should see the attribution line, an unquoted paragraph, and then a quoted paragraph with "quoted" in it.
 
 <div><br></div>
 <div>On Tuesday, Justin wrote:</div>
-<div><br></div>
-not&nbsp;quoted<br><blockquote type="cite" id="blockquote"><div style="white-space: pre;">quoted</div></blockquote>
+<div>not&nbsp;quoted</div><blockquote type="cite" id="blockquote"><div style="white-space: pre;">quoted</div></blockquote>
 
index e1eef0f..3d968d0 100644 (file)
@@ -10,7 +10,7 @@ blockquote[type="cite"] {
 </style>
 </head>
 <body>
-<div id="description">This tests to see that if the caret is in an empty quoted paragraph, that paragraph is in content that preserve newlines, and there's no quoted content before that paragraph, then pressing delete removes that paragraph's quoting.  Below you should see the attribution line, an empty paragraph, an unquoted paragraph, and then a quoted paragraph with "quoted" in it.</div>
+<div id="description">This tests to see that if the caret is in an empty quoted paragraph, that paragraph is in content that preserve newlines, and there's no quoted content before that paragraph, then pressing delete removes that paragraph's quoting and removes the empty line.  Below you should see the attribution line, an unquoted paragraph, and then a quoted paragraph with "quoted" in it.</div>
 <div id="edit" contentEditable="true">
 <div><br></div>
 <div>On Tuesday, Justin wrote:</div>
index d8b4c37..febd837 100644 (file)
@@ -1,7 +1,6 @@
-This tests to see that if the caret is in an empty quoted paragraph, and there's no quoted content before that paragraph, then pressing delete removes that paragraph's quoting. Below you should see the attribution line, an empty paragraph, an unquoted paragraph, and then two quoted paragraphs with "quoted" in them.
+This tests to see that if the caret is in an empty quoted paragraph, and there's no quoted content before that paragraph, then pressing delete removes that paragraph's quoting and the empty line. Below you should see the attribution line, an unquoted paragraph, and then two quoted paragraphs with "quoted" in them.
 
 <div><br></div>
 <div>On Tuesday, Justin wrote:</div>
-<div><br></div>
-not&nbsp;quoted<br><blockquote type="cite" id="blockquote">quoted<br>quoted</blockquote>
+<div>not&nbsp;quoted</div><blockquote type="cite" id="blockquote">quoted<br>quoted</blockquote>
 
index 4ae0dc9..eeb420d 100644 (file)
@@ -10,7 +10,7 @@ blockquote[type="cite"] {
 </style>
 </head>
 <body>
-<div id="description">This tests to see that if the caret is in an empty quoted paragraph, and there's no quoted content before that paragraph, then pressing delete removes that paragraph's quoting.  Below you should see the attribution line, an empty paragraph, an unquoted paragraph, and then two quoted paragraphs with "quoted" in them.</div>
+<div id="description">This tests to see that if the caret is in an empty quoted paragraph, and there's no quoted content before that paragraph, then pressing delete removes that paragraph's quoting and the empty line.  Below you should see the attribution line, an unquoted paragraph, and then two quoted paragraphs with "quoted" in them.</div>
 <div id="edit" contentEditable="true">
 <div><br></div>
 <div>On Tuesday, Justin wrote:</div>
index 74d09a9..bbebf71 100644 (file)
@@ -1,3 +1,14 @@
+2009-03-24  Adele Peterson  <adele@apple.com>
+
+        Reviewed by Darin Adler.
+
+        Fix for https://bugs.webkit.org/show_bug.cgi?id=24707
+        <rdar://problem/6593021> Deleting with a caret in a blank, quoted line decreases the quoting, but does not delete the line
+
+        * editing/TypingCommand.cpp: (WebCore::TypingCommand::deleteKeyPressed):
+        After breaking out of an empty mail blockquote, we still want continue with the deletion
+        so actual content will get deleted, and not just the quote style.
+
 2009-03-24  Darin Adler  <darin@apple.com>
 
         Reviewed by Brady Eidson.
index 1e1a732..6235f7a 100644 (file)
@@ -373,10 +373,10 @@ void TypingCommand::deleteKeyPressed(TextGranularity granularity, bool killRing)
             selectionAfterUndo = selectionToDelete;
             break;
         case VisibleSelection::CaretSelection: {
-            if (breakOutOfEmptyMailBlockquotedParagraph()) {
+            // After breaking out of an empty mail blockquote, we still want continue with the deletion
+            // so actual content will get deleted, and not just the quote style.
+            if (breakOutOfEmptyMailBlockquotedParagraph())
                 typingAddedToOpenCommand();
-                return;
-            }
         
             m_smartDelete = false;