Bug 89081 - [Shadow] Assertion in VisibleSelection::adjustSelectionToAvoidCrossingBoundaries() is triggered
Summary: [Shadow] Assertion in VisibleSelection::adjustSelectionToAvoidCrossingBoundar...
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 02:14 PDT by Shinya Kawanaka
Modified: 2012-06-21 19:30 PDT (History)
9 users (show)

See Also:


Attachments
Repro (3.76 KB, text/html)
2012-06-14 02:19 PDT, Shinya Kawanaka
no flags Details
Patch (6.63 KB, patch)
2012-06-21 15:05 PDT, Shinya Kawanaka
no flags Details | Formatted Diff | Diff
Patch for landing (6.71 KB, patch)
2012-06-21 15:42 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 02:14:16 PDT
This is related to Bug 88500, but another case.

Select from "fuga 4" to "hoge 1". This will trigger ASSERT_NOT_REACHED().
Comment 1 Shinya Kawanaka 2012-06-14 02:19:46 PDT
Created attachment 147526 [details]
Repro
Comment 2 Shinya Kawanaka 2012-06-20 10:56:21 PDT
Non-content-editable <table> became content-editable here again...
We should fix that problem before this. I believe that problem causes this problem.
Comment 3 Shinya Kawanaka 2012-06-20 10:57:02 PDT
See also Bug 89077.
Comment 4 Shinya Kawanaka 2012-06-20 17:41:49 PDT
> Non-content-editable <table> became content-editable here again...

According to the spec, <table> should be contenteditable...
So this sentent is wrong, I'm sorry.
Comment 5 Shinya Kawanaka 2012-06-21 10:41:39 PDT
(In reply to comment #4)
> > Non-content-editable <table> became content-editable here again...
> 
> According to the spec, <table> should be contenteditable...
> So this sentent is wrong, I'm sorry.

NO... <table> in Shadow DOM should not be contenteditable here.
This is not the same as another cases. This is a real BUG.

Let's investigate this more.
Comment 6 Shinya Kawanaka 2012-06-21 11:45:08 PDT
(In reply to comment #5)
> (In reply to comment #4)
> > > Non-content-editable <table> became content-editable here again...
> > 
> > According to the spec, <table> should be contenteditable...
> > So this sentent is wrong, I'm sorry.
> 
> NO... <table> in Shadow DOM should not be contenteditable here.
> This is not the same as another cases. This is a real BUG.
> 
> Let's investigate this more.

Oh sorry.... it's wrong... not a real bug... sorry for confusing...
Comment 7 Shinya Kawanaka 2012-06-21 15:05:30 PDT
Created attachment 148895 [details]
Patch
Comment 8 Ryosuke Niwa 2012-06-21 15:13:19 PDT
Again, please cc darin & enrica on these bugs. Also there's no need to add [Editing] since this bug in the editing component.
Comment 9 Ryosuke Niwa 2012-06-21 15:17:08 PDT
Comment on attachment 148895 [details]
Patch

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

> Source/WebCore/editing/htmlediting.cpp:267
> +

Why the blank line? I'd rather have blank lines in both functions or not have in either one.
Doing different things in firstEditablePositionAfterPositionInRoot and lastEditablePositionBeforePositionInRoot is confusing.

> LayoutTests/editing/shadow/adjusting-editing-boundary-with-table-in-shadow-expected.txt:1
> +PASS

It's odd to see PASS before the description.

> LayoutTests/editing/shadow/adjusting-editing-boundary-with-table-in-shadow.html:15
> +<p>Placing this sentence before table won't trigger an asertion.</p>
> +<p>Selecting around a table which is distributed from shadow subtree to nested shadow subtree will trigger an assertion. To try manually, select from "shadow 2" to around "after" and confirm a crash does not occur.</p>

Please place this description before the container.
Comment 10 Shinya Kawanaka 2012-06-21 15:42:01 PDT
Created attachment 148903 [details]
Patch for landing
Comment 11 WebKit Review Bot 2012-06-21 19:02:56 PDT
Comment on attachment 148903 [details]
Patch for landing

Clearing flags on attachment: 148903

Committed r120991: <http://trac.webkit.org/changeset/120991>
Comment 12 WebKit Review Bot 2012-06-21 19:03:02 PDT
All reviewed patches have been landed.  Closing bug.