Bug 61766
Summary: | details::before/after rendered incorrectly | ||
---|---|---|---|
Product: | WebKit | Reporter: | Roland Steiner <rolandsteiner> |
Component: | Layout and Rendering | Assignee: | Web Components Team <webcomponents-bugzilla> |
Status: | RESOLVED DUPLICATE | ||
Severity: | Normal | CC: | dglazkov, dominicc, esprehn, igor.oliveira, jonlee, morrita, ntim, rniwa, shinyak |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | All | ||
OS: | All | ||
Bug Depends on: | |||
Bug Blocks: | 72352, 252223 |
Roland Steiner
This is similar to bug 61426 (see there for a test case)
Generated content from a details::before selector render before any summary or other details-content. Per the CSS spec, content generated with a :before rule should be rendered as if it was the first child of the parent element. For <details> this means that the generated content should become part of the non-<summary> content of the <details> element (and thus hidden if the <details> element is collapsed).
Similarly for details::after - this should also become part of the non-summary content (as if the last child) and thus hidden if the element is collapsed (currently it is rendered always).
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Hajime Morrita
Tree reforming: Unblocking 72352 because 59827 is already blocking it.
Elliott Sprehn
The generated content doesn't display at all in this test anymore. Something is bad here because it will show if you create a shadow root manually on an element.
Something weird is going on with <details>
Elliott Sprehn
(In reply to comment #2)
> The generated content doesn't display at all in this test anymore. Something is bad here because it will show if you create a shadow root manually on an element.
>
> Something weird is going on with <details>
This is because of the logic in HTMLDetailsElement::childShouldCreateRenderer. It's unfortunate that the ShadowRoot things in WebCore side step the usual mechanisms that JS developers would use because we end up with behavior you can't explain with the Shadow DOM/HTML Components specs.
I think we should fix Shadow DOM to perform distribution on generated content so <content select=":before"> works and then explain <input>'s weirdness with webkit having a <content select=":before"> in there.
Tim Nguyen (:ntim)
Fixed by bug 157323
*** This bug has been marked as a duplicate of bug 157323 ***