Bug 52423
Summary: | RenderObject::canHaveChildren()==false prevents shadow renderer creation | ||
---|---|---|---|
Product: | WebKit | Reporter: | Kent Tamura <tkent> |
Component: | DOM | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | cmarcelo, dglazkov, dominicc, morrita, shinyak |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | All | ||
OS: | All | ||
Bug Depends on: | |||
Bug Blocks: | 72352 |
Kent Tamura
Some renderers return false for canHaveChildren(). So if we try to convert the legacy shadow DOM code to the new API, the shadow nodes won't have their renderers. See Node::createRendererIfNeeded().
dglazkov said:
> I think it should be a function on an Element which indicates whether its children should be rendered
Source/WebCore/rendering/RenderButton.h: virtual bool canHaveChildren() const;
Source/WebCore/rendering/RenderDataGrid.h: virtual bool canHaveChildren() const { return false; }
Source/WebCore/rendering/RenderIndicator.h: virtual bool canHaveChildren() const { return false; }
Source/WebCore/rendering/RenderListBox.h: virtual bool canHaveChildren() const { return false; }
Source/WebCore/rendering/RenderMenuList.h: virtual bool canHaveChildren() const { return false; }
Source/WebCore/rendering/RenderReplaced.h: virtual bool canHaveChildren() const { return false; }
Source/WebCore/rendering/RenderTableCol.h: virtual bool canHaveChildren() const;
Source/WebCore/rendering/RenderTextControl.h: virtual bool canHaveChildren() const { return false; }
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Dimitri Glazkov (Google)
This is going to be part of <content> element machinery. By default, if the element has shadow DOM subtree, the children aren't rendered, so this decision becomes runtime, not compile-time.
Dimitri Glazkov (Google)
(In reply to comment #1)
> This is going to be part of <content> element machinery. By default, if the element has shadow DOM subtree, the children aren't rendered, so this decision becomes runtime, not compile-time.
Turns out that the best solution is just to never render children for Elements that have shadow DOM.
Hajime Morrita
Fixed by http://trac.webkit.org/changeset/108758.