[Webkit-unassigned] [Bug 45866] execCommand insertorderedlist creates a list inside p (violates content-model).

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 10 09:55:24 PST 2011


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





--- Comment #11 from Ryosuke Niwa <rniwa at webkit.org>  2011-01-10 09:55:24 PST ---
(In reply to comment #10)
> You are perfectly right of course. I guess the correct behavior, here, is to select the nearest ancestor that isn't a phrasing element (http://www.w3.org/TR/html5/content-models.html#phrasing-content).
> I can add a new function to htmlediting.cpp, something like:
> 
> bool isPhrasingElement(const Node* node)
> 
> and then use it together with "enclosingNodeOfType" to select the ancestor.
> Is this the right approach?

That sounds right.  You may be interested in looking at isBlock function.  It's called at various places in the place of !isPhrasingElement.

-- 
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