[Webkit-unassigned] [Bug 78193] Inserting a paragraph between quoted lines in editing/deleting/delete-4038408-fix.html doesn't work

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Apr 24 07:10:12 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=78193





--- Comment #18 from yi shen <yi.4.shen at nokia.com>  2012-04-24 07:10:11 PST ---
Thanks for reviewing :) Please see my comments below,
(In reply to comment #17)
> (From update of attachment 135364 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=135364&action=review
> 
> > Source/WebCore/editing/InsertParagraphSeparatorCommand.cpp:230
> >              // We can get here if we pasted a copied portion of a blockquote with a newline at the end and are trying to paste it
> >              // into an unquoted area. We then don't want the newline within the blockquote or else it will also be quoted.
> > -            if (Node* highestBlockquote = highestEnclosingNodeOfType(canonicalPos, &isMailBlockquote))
> > -                startBlock = static_cast<Element*>(highestBlockquote);
> > +            if (m_pasteBlockqutoeIntoUnquotedArea) {
> 
> Alternatively, can we check is we're at the end of blockquote or not?
> This trick should only be used when we're inserting a new paragraph at the end of a blockquote, right?
> Can we check whether there's a content between canonicalPos and the end of the mail blockblock?
> And adjust startBlock only if we don't have any contents there?
> 
it may cause a regression I think. Assume the caret is at the end of the blockquote, then user hits the enter key to insert a new paragraph. The new paragraph would be inserted out of the blockquote since there is no contents between the insertion position and the end of the blockquote, right? This behavior seems incorrect to me -- user can't insert a new paragraph in blockquote by using the enter key.

I believe this trick should only be used when we try to paste a copied portion of a blockquote with a newline at the end into an unquoted area.

> > LayoutTests/editing/inserting/insert-paragraph-separator-in-blockquote.html:16
> > +<title></title>
> 
> No need for title.
Will remove it
> 
> > LayoutTests/editing/inserting/insert-paragraph-separator-in-blockquote.html:48
> > +pressKey("\n");
> 
> Can't we just do document.execCommand('InsertParagraph', false, null) ?
Will fix it.
> 
> > LayoutTests/editing/pasteboard/paste-wrapped-blockquote-into-nonblockquote-expected.txt:1
> > +This test ensures the copied the newline is NOT inside the blockquote.
> 
> We should describe what we should expect to see below.
> 
> > LayoutTests/editing/pasteboard/paste-wrapped-blockquote-into-nonblockquote.html:1
> > +<html>
> 
> No DOCTYPE?
> 
Will fix
> > LayoutTests/editing/pasteboard/paste-wrapped-blockquote-into-nonblockquote.html:10
> > +    <style>
> > +        blockquote {
> > +            color: blue;
> > +            border-left: 2px solid blue;
> > +            margin: 0px;
> > +            padding: 0 0 0 20px;
> > +        }
> > +    </style>
> 
> No need to indent style element and rules like this.
> 
Will fix
> > LayoutTests/editing/pasteboard/paste-wrapped-blockquote-into-nonblockquote.html:19
> > +    var range = document.createRange();
> 
> No need to indent script contents.
Will fix

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list