Bug 51278 - Crash at WebCore::SplitElementCommand::SplitElementCommand
Summary: Crash at WebCore::SplitElementCommand::SplitElementCommand
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 528+ (Nightly build)
Hardware: All OS X 10.5
: P2 Normal
Assignee: Enrica Casucci
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2010-12-17 15:36 PST by Enrica Casucci
Modified: 2010-12-20 15:58 PST (History)
6 users (show)

See Also:


Attachments
test case (666 bytes, text/html)
2010-12-17 15:36 PST, Enrica Casucci
no flags Details
Patch (4.15 KB, patch)
2010-12-17 15:43 PST, Enrica Casucci
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Enrica Casucci 2010-12-17 15:36:33 PST
Created attachment 76920 [details]
test case

Run the attached test case to see the crash.
Comment 1 Enrica Casucci 2010-12-17 15:43:48 PST
Created attachment 76921 [details]
Patch
Comment 2 Ryosuke Niwa 2010-12-17 17:55:01 PST
Comment on attachment 76921 [details]
Patch

Do we do the right thing (i.e. remove blockquote) with your patch?  Although if the blockquote is inline, then the text isn't really indented so outdenting doesn't really have any visible effect.  Also I'd like to see a test case where ul/ol and li are inline.
Comment 3 Enrica Casucci 2010-12-20 10:05:09 PST
(In reply to comment #2)
> (From update of attachment 76921 [details])
> Do we do the right thing (i.e. remove blockquote) with your patch?  Although if the blockquote is inline, then the text isn't really indented so outdenting doesn't really have any visible effect.  Also I'd like to see a test case where ul/ol and li are inline.

I believe the answer is yes. My change is meant to take into account the fact that startOfEnclosingBlock doesn't handle properly a blockquote with inline style and returns a node outside the blockquote.
What we want here, is to be able to fall into the first if statement (case in which the block quote is in its own paragraph).
The other scenario you mention, is handled by the code after the if statement where we do the splitting.
The ordered/unordered list case is handled by completely different code.
Comment 4 Darin Adler 2010-12-20 12:29:31 PST
Comment on attachment 76921 [details]
Patch

We should add more test cases as Ryosuke suggests.
Comment 5 Enrica Casucci 2010-12-20 14:55:32 PST
Added additional tests, per Ryosuke's comments.
Committed revision 74369.
Comment 6 Ryosuke Niwa 2010-12-20 15:05:37 PST
(In reply to comment #5)
> Added additional tests, per Ryosuke's comments.
> Committed revision 74369.

Thanks for the test case.
Comment 7 WebKit Review Bot 2010-12-20 15:58:24 PST
http://trac.webkit.org/changeset/74369 might have broken GTK Linux 64-bit Debug
The following tests are not passing:
inspector/extensions-audits.html