Copying and pasting two paragraphs with a newline between them results in stray paragraph with newline inside.
https://bugs.webkit.org/show_bug.cgi?id=201306
Reviewed by Wenson Hsieh.
Source/WebCore:
Test: editing/pasteboard/paste-without-nesting.html
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplaceSelectionCommand::moveNodeOutOfAncestor): Consider the ancestor node safe to remove
if there is no rendered text inside, not just if there are any child nodes.
LayoutTests:
* editing/pasteboard/paste-without-nesting-expected.txt: Updated results.
* editing/pasteboard/paste-without-nesting.html: Added new test case.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@249307 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/editing/pasteboard/paste-without-nesting-expected.txt b/LayoutTests/editing/pasteboard/paste-without-nesting-expected.txt
index faad122..f303a36 100644
--- a/LayoutTests/editing/pasteboard/paste-without-nesting-expected.txt
+++ b/LayoutTests/editing/pasteboard/paste-without-nesting-expected.txt
@@ -6,6 +6,7 @@
PASS confirmedMarkup is '<div>Hello</div><div>world</div>'
PASS confirmedMarkup is '<div><b><i>Hello</i></b></div><div><b><i>world</i></b></div>'
PASS confirmedMarkup is '<div style="text-align: center;"><div><font color="#ff0000"><b><i>hello</i></b></font></div><div><font color="#ff0000"><b><i>world</i></b></font></div></div>'
+PASS confirmedMarkup is '<p>Line One</p><p>Line Two</p>'
PASS successfullyParsed is true
TEST COMPLETE