Bug 63046
| Summary: | HTMLLIElement::attach() seems incorrect | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Roland Steiner <rolandsteiner> |
| Component: | Layout and Rendering | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | dominicc, haraken, hayato, morrita, shinyak, shinyak |
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Bug Depends on: | |||
| Bug Blocks: | 72352 | ||
Roland Steiner
HTMLLIElement::attach() searches its parents for the containing list. However:
.) It ignores intervening "terrain", so will happily pass through whole tables, etc.
.) It doesn't check the element's display type, so will accept an <ol> or <ul>, even if their display type is not [un]ordered list. And conversely, it will not consider other elements even if their display type is set to list.
This seems incorrect.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Roland Steiner
i should add that the only outcome of this is incorrect styling.
Roland Steiner
It will also fail if the <li> is inside shadow DOM, and the containing <ol>/<ul> is outside - i.e., parentNode() should be changed to parentOrHostNode().
Dominic Cooney
(In reply to comment #0)
> HTMLLIElement::attach() searches its parents for the containing list. However:
>
> .) It ignores intervening "terrain", so will happily pass through whole tables, etc.
That seems busted.
> .) It doesn't check the element's display type, so will accept an <ol> or <ul>, even if their display type is not [un]ordered list. And conversely, it will not consider other elements even if their display type is set to list.
This seems OK. What is the problem with this behavior?
> This seems incorrect.
Roland Steiner
(In reply to comment #3)
> (In reply to comment #0)
> > .) It doesn't check the element's display type, so will accept an <ol> or <ul>, even if their display type is not [un]ordered list. And conversely, it will not consider other elements even if their display type is set to list.
>
> This seems OK. What is the problem with this behavior?
You're right, of course, esp. as there IS NO 'list' display type (just 'list-item'). @_@;;
Dominic Cooney
May be related to bug 72440.
Hajime Morrita
http://trac.webkit.org/changeset/123570 fixed this.