Bug 19403

Summary: ASSERT in InsertIntoTextNodeCommand::InsertIntoTextNodeCommand during RemoveFormat call
Product: WebKit Reporter: Justin Garcia <justin.garcia>
Component: HTML EditingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: eric
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: OS X 10.5   
Attachments:
Description Flags
test case
none
patch eric: review+

Description Justin Garcia 2008-06-05 17:29:50 PDT
Run the attached test case in a debug build.

ASSERT(!text.isEmpty()) inside InsertIntoTextNodeCommand::InsertIntoTextNodeCommand fires because RemoveFormat calls input with an empty String.  plainText() is returning an empty string for a Range selection for some reason...
Comment 1 Justin Garcia 2008-06-05 17:30:27 PDT
Created attachment 21516 [details]
test case
Comment 2 Justin Garcia 2008-06-05 20:56:04 PDT
Created attachment 21519 [details]
patch
Comment 3 Eric Seidel (no email) 2008-06-05 21:32:18 PDT
Comment on attachment 21519 [details]
patch

Looks good.  The if (string.isEmpty()) should have a comment before it explaning "why", since I'm not sure it will be clear to either of us why it's there in 9 months. :)


If you strongly disagree I'm fine w/ you to landing w/o comment.  I don't need to see your final patch again either way. :)
Comment 4 Justin Garcia 2008-06-05 21:46:04 PDT
(In reply to comment #3)
> (From update of attachment 21519 [details] [edit])
> Looks good.  The if (string.isEmpty()) should have a comment before it
> explaning "why", since I'm not sure it will be clear to either of us why it's
> there in 9 months. :)

You're right.  Fixed that.  http://trac.webkit.org/changeset/34399