LayoutTests:
Reviewed by darin
<rdar://problem/
5091898> REGRESSION: GMail Editor: A line of underlined text copied with Select All pastes with wrong font family
Demonstrates the bug fixed:
* editing/style/
5091898-expected.checksum: Added.
* editing/style/
5091898-expected.png: Added.
* editing/style/
5091898-expected.txt: Added.
* editing/style/
5091898.html: Added.
Demonstrates a related bug fixed (deleting
the line break before a paragraph could remove
its underlining):
* editing/deleting/
5091898-expected.checksum: Added.
* editing/deleting/
5091898-expected.png: Added.
* editing/deleting/
5091898-expected.txt: Added.
* editing/deleting/
5091898.html: Added.
Demonstrates that a link now (correctly) exists,
instead of just underlined text:
* editing/pasteboard/
4840662-expected.txt:
WebCore:
Reviewed by darin
<rdar://problem/
5091898> REGRESSION: GMail Editor: A line of underlined text copied with Select All pastes with wrong font family
createMarkup skipped elements if they were blocks
when called from moveParagraphs (because that function
must receive only inline content). This patch adds
code to inline these blocks instead of skipping them
so that we don't lose any of the style that they
contribute to the copied markup.
* editing/markup.cpp:
(WebCore::startMarkup): Add an inlineBlocks option.
Make sure to overwrite display:block coming from
a style sheet or the inline style declaration.
(WebCore::createMarkup): Don't refuse to include a
specialCommonAncestor that's a block if we were asked
to include only inline content, since we can now inline
block elements in startMarkup.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@20542
268f45cc-cd09-0410-ab3c-
d52691b4dbfc