Bug 89171

Summary: [Crash][Editing] pressing 'enter' on LI element triggers assertion in Shadow DOM
Product: WebKit Reporter: Shinya Kawanaka <shinyak>
Component: HTML EditingAssignee: Shinya Kawanaka <shinyak>
Status: RESOLVED FIXED    
Severity: Normal CC: dglazkov, dominicc, hayato, morrita, rniwa, tasak, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 82697    
Attachments:
Description Flags
Repro
none
Patch
none
Patch for landing
none
Archive of layout-test-results from ec2-cq-02
none
Archive of layout-test-results from ec2-cr-linux-04
none
Patch for landing none

Description Shinya Kawanaka 2012-06-14 22:51:25 PDT
Created attachment 147737 [details]
Repro

In the repro, put the cursor after LIST 2, then press 'enter'.
This will cause an assertion trigger.

ASSERTION FAILED: container->renderer()
CompositeEditiCommand.cpp(838) : CompositeCommand::appendBlockPlaceholder
Comment 1 Shinya Kawanaka 2012-06-20 10:49:06 PDT
Created attachment 148603 [details]
Patch
Comment 2 Ryosuke Niwa 2012-06-20 11:45:11 PDT
Comment on attachment 148603 [details]
Patch

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

> Source/WebCore/ChangeLog:8
> +        Since modidying Shadow DOM removes renderer of elements in Shadow DOM and Shadow host,

Why is "shadow" capitalized?

> Source/WebCore/editing/CompositeEditCommand.cpp:837
> +    // container->renderer() might be gone unless updating style in Shadow DOM.

I don't think this comment is necessary. It is understood that updating layout helps with that.

> LayoutTests/editing/shadow/pressing-enter-on-list.html:18
> +<pre id="console"></pre>

We don't need console, do we?

> LayoutTests/editing/shadow/pressing-enter-on-list.html:34
> +// Pressing enter should not trigger assertion.

This comment is redundant because the description clearly states that.
Comment 3 Shinya Kawanaka 2012-06-20 14:13:16 PDT
Created attachment 148651 [details]
Patch for landing
Comment 4 WebKit Review Bot 2012-06-20 17:57:51 PDT
Comment on attachment 148651 [details]
Patch for landing

Rejecting attachment 148651 [details] from commit-queue.

New failing tests:
editing/shadow/pressing-enter-on-list.html
Full output: http://queues.webkit.org/results/13014050
Comment 5 WebKit Review Bot 2012-06-20 17:57:56 PDT
Created attachment 148694 [details]
Archive of layout-test-results from ec2-cq-02

The attached test failures were seen while running run-webkit-tests on the commit-queue.
Bot: ec2-cq-02  Port: <class 'webkitpy.common.config.ports.ChromiumXVFBPort'>  Platform: Linux-2.6.35-28-virtual-x86_64-with-Ubuntu-10.10-maverick
Comment 6 WebKit Review Bot 2012-06-20 19:25:16 PDT
Comment on attachment 148651 [details]
Patch for landing

Attachment 148651 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/13022041

New failing tests:
editing/shadow/pressing-enter-on-list.html
Comment 7 WebKit Review Bot 2012-06-20 19:25:20 PDT
Created attachment 148712 [details]
Archive of layout-test-results from ec2-cr-linux-04

The attached test failures were seen while running run-webkit-tests on the chromium-ews.
Bot: ec2-cr-linux-04  Port: <class 'webkitpy.common.config.ports.ChromiumXVFBPort'>  Platform: Linux-2.6.35-28-virtual-x86_64-with-Ubuntu-10.10-maverick
Comment 8 Shinya Kawanaka 2012-06-21 09:11:56 PDT
Oops I forgot to update the expected result...
Comment 9 Shinya Kawanaka 2012-06-21 09:18:26 PDT
Created attachment 148815 [details]
Patch for landing
Comment 10 WebKit Review Bot 2012-06-21 10:05:29 PDT
Comment on attachment 148815 [details]
Patch for landing

Clearing flags on attachment: 148815

Committed r120931: <http://trac.webkit.org/changeset/120931>
Comment 11 WebKit Review Bot 2012-06-21 10:05:37 PDT
All reviewed patches have been landed.  Closing bug.