2008-03-26 Justin Garcia <justin.garcia@apple.com>

        Reviewed by Harrison.

        <rdar://problem/5820749> REGRESSION (Safari 3.1): Mail's plain text reply omits blank line following the attribution

        * editing/markup.cpp:
        (WebCore::createFragmentFromText): When asked to create a fragment from "Attribution:\n"
        with a context from [html, 0] to [html, 0], we'd return "<html>Attribution</html><br>".
        Don't enclose paragraphs in clones of the context's enclosing block if that block is the
        html or body element.  Currently no way to test [DOMHTMLElement createFragmentFromText:].



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31336 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent cb9eeb2a
2008-03-26 Justin Garcia <justin.garcia@apple.com>
Reviewed by Harrison.
<rdar://problem/5820749> REGRESSION (Safari 3.1): Mail's plain text reply omits blank line following the attribution
* editing/markup.cpp:
(WebCore::createFragmentFromText): When asked to create a fragment from "Attribution:\n"
with a context from [html, 0] to [html, 0], we'd return "<html>Attribution</html><br>".
Don't enclose paragraphs in clones of the context's enclosing block if that block is the
html or body element. Currently no way to test [DOMHTMLElement createFragmentFromText:].
2008-03-26 Antti Koivisto <antti@apple.com>
Reviewed by Anders.
......@@ -1056,7 +1056,7 @@ PassRefPtr<DocumentFragment> createFragmentFromText(Range* context, const String
// Break string into paragraphs. Extra line breaks turn into empty paragraphs.
Node* block = enclosingBlock(context->firstNode());
bool useClonesOfEnclosingBlock = !block->hasTagName(bodyTag);
bool useClonesOfEnclosingBlock = block && !block->hasTagName(bodyTag) && !block->hasTagName(htmlTag);
Vector<String> list;
string.split('\n', true, list); // true gets us empty strings in the list
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment