Bug 89171 - [Crash][Editing] pressing 'enter' on LI element triggers assertion in Shadow DOM
Summary: [Crash][Editing] pressing 'enter' on LI element triggers assertion in Shadow DOM
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Shinya Kawanaka
URL:
Keywords:
Depends on:
Blocks: 82697
  Show dependency treegraph
 
Reported: 2012-06-14 22:51 PDT by Shinya Kawanaka
Modified: 2012-06-21 10:05 PDT (History)
7 users (show)

See Also:


Attachments
Repro (3.39 KB, text/html)
2012-06-14 22:51 PDT, Shinya Kawanaka
no flags Details
Patch (4.54 KB, patch)
2012-06-20 10:49 PDT, Shinya Kawanaka
no flags Details | Formatted Diff | Diff
Patch for landing (4.39 KB, patch)
2012-06-20 14:13 PDT, Shinya Kawanaka
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ec2-cq-02 (747.86 KB, application/zip)
2012-06-20 17:57 PDT, WebKit Review Bot
no flags Details
Archive of layout-test-results from ec2-cr-linux-04 (691.20 KB, application/zip)
2012-06-20 19:25 PDT, WebKit Review Bot
no flags Details
Patch for landing (4.38 KB, patch)
2012-06-21 09:18 PDT, Shinya Kawanaka
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.