void Element::attach(const AttachContext& context) { ASSERT(document().inStyleRecalc()); // We've already been through detach when doing an attach, but we might // need to clear any state that's been added since then. if (hasRareData() && styleChangeType() == NeedsReattachStyleChange) { ElementRareData* data = elementRareData(); data->clearComputedStyle(); } RenderTreeBuilder(this, context.resolvedStyle).createRendererForElementIfNeeded(); ContainerNode::attach(context); }
void Text::attach(const AttachContext& context) { RenderTreeBuilder(this, context.resolvedStyle).createRendererForTextIfNeeded(); CharacterData::attach(context); }