Bug 67765

Summary: Crashed in WebCore::ApplyStyleCommand.doApply()
Product: WebKit Reporter: Shinya Kawanaka <shinyak>
Component: HTML EditingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: jchaffraix, rniwa, shinyak, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 67668    
Attachments:
Description Flags
Patch
none
Patch none

Description Shinya Kawanaka 2011-09-08 00:02:09 PDT
<card id="edit" contentEditable="true">A<script>
edit.focus();
document.execCommand("SelectAll");
document.execCommand("RemoveFormat");
</script>
Comment 1 Shinya Kawanaka 2011-09-08 01:07:07 PDT
Created attachment 106708 [details]
Patch
Comment 2 Shinya Kawanaka 2011-09-08 01:21:27 PDT
*** Bug 67766 has been marked as a duplicate of this bug. ***
Comment 3 Darin Adler 2011-09-08 08:46:40 PDT
Comment on attachment 106708 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=106708&action=review

> LayoutTests/editing/style/remove-format-without-enclosing-block.html:9
> +document.writeln('<br><br>This test ensures WebKit does not crash.<br><br>PASS');

The wording here is wrong. The test does not ensure that WebKit does not crash. The test has no effect on WebKit.

It's good to say that the test has passed if it doesn’t crash, and also probably good to say as clearly as possible why there was a time when the test would crash.
Comment 4 Shinya Kawanaka 2011-09-09 00:50:16 PDT
Created attachment 106848 [details]
Patch
Comment 5 Shinya Kawanaka 2011-09-09 00:55:12 PDT
(In reply to comment #3)
> (From update of attachment 106708 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=106708&action=review
> 
> > LayoutTests/editing/style/remove-format-without-enclosing-block.html:9
> > +document.writeln('<br><br>This test ensures WebKit does not crash.<br><br>PASS');
> 
> The wording here is wrong. The test does not ensure that WebKit does not crash. The test has no effect on WebKit.

Fixed.

> 
> It's good to say that the test has passed if it doesn’t crash, and also probably good to say as clearly as possible why there was a time when the test would crash.

I added some comments in a test case.
Comment 6 WebKit Review Bot 2011-09-09 02:01:42 PDT
Comment on attachment 106848 [details]
Patch

Clearing flags on attachment: 106848

Committed r94840: <http://trac.webkit.org/changeset/94840>
Comment 7 WebKit Review Bot 2011-09-09 02:01:46 PDT
All reviewed patches have been landed.  Closing bug.