RESOLVED FIXED Bug 47300
Executing FormatBlock on multiple paragraphs inside pre does not remove the outer pre
https://bugs.webkit.org/show_bug.cgi?id=47300
Summary Executing FormatBlock on multiple paragraphs inside pre does not remove the o...
Ryosuke Niwa
Reported 2010-10-06 13:53:41 PDT
Created attachment 69986 [details] demo The attached demo causes WebKit TOT to hit the first ASSERT in moveParagraph: ASSERT(isStartOfParagraph(startOfParagraphToMove));
Attachments
demo (396 bytes, text/html)
2010-10-06 13:53 PDT, Ryosuke Niwa
no flags
fixes the bug (18.23 KB, patch)
2010-12-05 17:46 PST, Ryosuke Niwa
tony: review+
Ryosuke Niwa
Comment 1 2010-10-28 16:17:03 PDT
We no longer hit the assert but we don't remove pre, which seems to be wrong.
Ryosuke Niwa
Comment 2 2010-12-05 17:46:32 PST
Created attachment 75640 [details] fixes the bug
Tony Chang
Comment 3 2010-12-06 10:07:22 PST
Comment on attachment 75640 [details] fixes the bug View in context: https://bugs.webkit.org/attachment.cgi?id=75640&action=review > WebCore/editing/FormatBlockCommand.h:48 > - void formatRange(const Position&, const Position&, RefPtr<Element>&); > + void formatRange(const Position&, const Position&, const Position& endOfSelection, RefPtr<Element>&); Nit: Should we name the first and second Position params like in ApplyBlockElementCommand.h? > WebCore/editing/IndentOutdentCommand.h:56 > - void formatRange(const Position&, const Position&, RefPtr<Element>& blockquoteForNextIndent); > + void formatRange(const Position&, const Position&, const Position& endOfSelection, RefPtr<Element>& blockquoteForNextIndent); Nit: Should we name the first and second Position params like in ApplyBlockElementCommand.h?
Ryosuke Niwa
Comment 4 2010-12-06 16:16:09 PST
Thanks for the review. (In reply to comment #3) > (From update of attachment 75640 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=75640&action=review > > > WebCore/editing/FormatBlockCommand.h:48 > > - void formatRange(const Position&, const Position&, RefPtr<Element>&); > > + void formatRange(const Position&, const Position&, const Position& endOfSelection, RefPtr<Element>&); > > Nit: Should we name the first and second Position params like in ApplyBlockElementCommand.h? > > > WebCore/editing/IndentOutdentCommand.h:56 > > - void formatRange(const Position&, const Position&, RefPtr<Element>& blockquoteForNextIndent); > > + void formatRange(const Position&, const Position&, const Position& endOfSelection, RefPtr<Element>& blockquoteForNextIndent); > > Nit: Should we name the first and second Position params like in ApplyBlockElementCommand.h? Will fix and land.
Ryosuke Niwa
Comment 5 2010-12-06 16:31:49 PST
Note You need to log in before you can comment on or make changes to this bug.