Span element gets produced using backspace/delete to merge header with paragraph
https://bugs.webkit.org/show_bug.cgi?id=68413
Reviewed by Darin Adler.
Source/WebCore:
Add p element to the list of elements to retain appearance. Also modified removeStyleFromNode
(and renamed to removeStyleFromRules) not to remove inline style declarations because
inline styles need to stay on copy.
Test: editing/deleting/merge-paragraph-from-p-with-style.html
* editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::saveTypingStyleState):
* editing/EditingStyle.cpp:
(WebCore::EditingStyle::removeStyleFromRules): Renamed from removeStyleFromNode.
* editing/EditingStyle.h:
* editing/markup.cpp:
(WebCore::isBlockNodeToRetainAppearance):
(WebCore::StyledMarkupAccumulator::serializeNodes):
LayoutTests:
Add a test to remove the line break before a p element. WebKit should not preserve
the font color from the style rule but should preserve the font style from inline style declaration.
Also fix merge-paragraph-from-h6* to actually h6 instead of h1.
* editing/deleting/merge-paragraph-from-h6-expected.txt:
* editing/deleting/merge-paragraph-from-h6-with-style-expected.txt:
* editing/deleting/merge-paragraph-from-h6-with-style.html:
* editing/deleting/merge-paragraph-from-h6.html:
* editing/deleting/merge-paragraph-from-p-with-style-expected.txt: Added.
* editing/deleting/merge-paragraph-from-p-with-style.html: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95645
268f45cc-cd09-0410-ab3c-
d52691b4dbfc