return RenderObject::createObject(this, style);
}
-void ElementImpl::attach()
+
+void ElementImpl::insertedIntoDocument()
{
-#if SPEED_DEBUG < 1
- createRendererIfNeeded();
-#endif
- NodeBaseImpl::attach();
+ // need to do superclass processing first so inDocument() is true
+ // by the time we reach updateId
+ NodeBaseImpl::insertedIntoDocument();
if (hasID()) {
NamedAttrMapImpl *attrs = attributes(true);
}
}
-void ElementImpl::detach()
+void ElementImpl::removedFromDocument()
{
if (hasID()) {
NamedAttrMapImpl *attrs = attributes(true);
}
}
- NodeBaseImpl::detach();
+ NodeBaseImpl::removedFromDocument();
+}
+
+void ElementImpl::attach()
+{
+#if SPEED_DEBUG < 1
+ createRendererIfNeeded();
+#endif
+ NodeBaseImpl::attach();
}
void ElementImpl::recalcStyle( StyleChange change )
void ElementImpl::updateId(const AtomicString& oldId, const AtomicString& newId)
{
- if (!attached())
+ if (!inDocument())
return;
if (oldId == newId)