[Webkit-unassigned] [Bug 52846] InsertUnorderedList breaks up paragraphs when they contain non-editable elements.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 31 15:54:07 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=52846





--- Comment #9 from Ryosuke Niwa <rniwa at webkit.org>  2011-01-31 15:54:07 PST ---
(In reply to comment #8)
> I'm aware of this kind of problem but I consider it largely independent of this bug.

What I'm saying that your patch would have reproduced a regression or that it would have made the situation worse.

> Even now (without my patch), in a situation like the one you described, the behavior of 'insertList' is wrong.
> If you put an editable span inside a non-editable paragraph, you clearly want the user allowed to modify the content of the span, not the nature of the paragraph (from plain paragraph to list item) nor the nature of the span itself (from span to list item or worst inserting a list inside it where only phrasing content is allowed).
> In such a situation "insertList" command should not be available at all (queryCommandEnabled should return false).

I agree and we should take care of that instead of ignoring it.  In fact, there seems to be a dependency that we need to fix the said bug before being able to fix this one.

> I think when 'insertList' is invoked we must look for the nearest non-phrasing content ancestor of the element containing the caret. That is the element 'insertList' will be acting on.

This isn't sufficient nor necessary condition. For example, non-phrasing element may be inline (display: inline;) and it may not make sense for us to indent against such an element from user's perspective.

> To realize the above project we must have a way to determine if an element is of phrasing content category*.
> For that reason, within the discussion relative to another WebKit bug (https://bugs.webkit.org/show_bug.cgi?id=45866), I proposed to add a new method to the HTMLElemet class: isPhrasingContent().
> Unfortunately I have got virtually no feedback on my idea.

Yes, I'm aware of that bug and I gave you the feedback that we must be careful when we're adding a function to Node.  And Adam pointed out that the parser may know which element is a phrasing element.  I'm more than happy to give you more feedback if you can tell us what kind of feedback you'd like to receive.

> > Also, please don't just fix InsertUnorderedList. At least InsertOrderedList must also be fixed.
> 
> My patch already fixes either 'InsertUnorderedList' or 'InsertOrderedList'.

But your patch didn't have any tests. How can we know that the bug is fixed?

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list