Bug 92130 - Outdenting a blockquote containing multiple paragraphs leaves a blockquote between each paragraph
Summary: Outdenting a blockquote containing multiple paragraphs leaves a blockquote be...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Shezan Baig
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-24 09:11 PDT by Shezan Baig
Modified: 2013-01-08 22:42 PST (History)
2 users (show)

See Also:


Attachments
test case (286 bytes, text/html)
2012-07-24 09:11 PDT, Shezan Baig
no flags Details
Reduction of breakage of outdent-selection (211 bytes, text/html)
2012-07-30 13:11 PDT, Shezan Baig
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Shezan Baig 2012-07-24 09:11:49 PDT
Created attachment 154080 [details]
test case

See the attached example.  There are blockquotes between each line (except that last).  The correct behavior is to not create any blockquotes between the lines.  I have a patch for this (SplitElementCommand should be a no-op if m_atChild == m_element2->firstChild)
Comment 1 Shezan Baig 2012-07-24 12:02:01 PDT
Hmm it turns out that this fix breaks the outdent-selection.html and break-out-of-empty-list-item.html tests.  I'm investigating why this breaks
Comment 2 Shezan Baig 2012-07-30 13:11:30 PDT
Created attachment 155346 [details]
Reduction of breakage of outdent-selection

I've resolved the issue that caused the breakage in break-out-of-empty-list-item.html

However, the breakage in outdent-selection.html is a little more complicated, and it has to do with a preexisting unrelated bug w.r.t. preserving the selection after outdent.  See the attached reduction.  The selection is not maintained correctly (the last character is not selected).

This happens whenever <br> is added after an inline node that ends with '\n'.  The '\n' gets treated as an uncollapsable space, which in turn causes the endIndex in ApplyBlockElementCommand::doApply to become off by one.

I found bug 21545, which describes issues with visual selection with outdent, but that bug has to do with lists (ol and ul), so I think the issue here is completely different.  I'll enter a new bug for the issue here.
Comment 3 Shezan Baig 2012-07-30 13:22:01 PDT
Created bug 92672.  I'll need to fix that issue before I can submit the patch for this issue.