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; }
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.
(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.
Fixed by http://trac.webkit.org/changeset/108758.