void TextControlInnerElement::attachInnerElement(Node* parent, PassRefPtr<RenderStyle> style, RenderArena* arena) { // When adding these elements, create the renderer & style first before adding to the DOM. // Otherwise, the render tree will create some anonymous blocks that will mess up our layout. // Create the renderer with the specified style RenderObject* renderer = createRenderer(arena, style.get()); if (renderer) { setRenderer(renderer); renderer->setStyle(style); } // Set these explicitly since this normally happens during an attach() setAttached(); setInDocument(); // For elements without a shadow parent, add the node to the DOM normally. if (!m_shadowParent) { // FIXME: This code seems very wrong. Why are we magically adding |this| to the DOM here? // We shouldn't be calling parser API methods outside of the parser! parent->deprecatedParserAddChild(this); } // Add the renderer to the render tree if (renderer) parent->renderer()->addChild(renderer); }
void TextControlInnerElement::attachInnerElement(Node* parent, PassRefPtr<RenderStyle> style, RenderArena* arena) { // When adding these elements, create the renderer & style first before adding to the DOM. // Otherwise, the render tree will create some anonymous blocks that will mess up our layout. // Create the renderer with the specified style RenderObject* renderer = createRenderer(arena, style.get()); if (renderer) { setRenderer(renderer); renderer->setStyle(style); } // Set these explicitly since this normally happens during an attach() setAttached(); setInDocument(true); // For elements without a shadow parent, add the node to the DOM normally. if (!m_shadowParent) parent->addChild(this); // Add the renderer to the render tree if (renderer) parent->renderer()->addChild(renderer); }
inline SVGShadowTreeRootElement::SVGShadowTreeRootElement(Document* document, SVGUseElement* shadowParent) : SVGShadowTreeContainerElement(document) { setShadowHost(shadowParent); setInDocument(); }
// SVGShadowTreeRootElement SVGShadowTreeRootElement::SVGShadowTreeRootElement(Document* document, Node* shadowParent) : SVGShadowTreeContainerElement(document) , m_shadowParent(shadowParent) { setInDocument(true); }