Summary: | Executing FormatBlock on multiple paragraphs inside pre does not remove the outer pre | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Ryosuke Niwa <rniwa> | ||||||
Component: | HTML Editing | Assignee: | Ryosuke Niwa <rniwa> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | darin, enrica, justin.garcia, leviw, ojan, tony | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | All | ||||||||
OS: | All | ||||||||
Attachments: |
|
We no longer hit the assert but we don't remove pre, which seems to be wrong. Created attachment 75640 [details]
fixes the bug
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? 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. Committed r73411: <http://trac.webkit.org/changeset/73411> |
Created attachment 69986 [details] demo The attached demo causes WebKit TOT to hit the first ASSERT in moveParagraph: ASSERT(isStartOfParagraph(startOfParagraphToMove));