summaryrefslogtreecommitdiffstats
path: root/WebCore/wml/WMLNoopElement.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/wml/WMLNoopElement.cpp')
-rw-r--r--WebCore/wml/WMLNoopElement.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/WebCore/wml/WMLNoopElement.cpp b/WebCore/wml/WMLNoopElement.cpp
index 1ba1c18..b2ce506 100644
--- a/WebCore/wml/WMLNoopElement.cpp
+++ b/WebCore/wml/WMLNoopElement.cpp
@@ -45,15 +45,18 @@ void WMLNoopElement::insertedIntoDocument()
WMLElement::insertedIntoDocument();
Node* parent = parentNode();
- ASSERT(parent);
-
if (!parent || !parent->isWMLElement())
return;
if (parent->hasTagName(doTag)) {
WMLDoElement* doElement = static_cast<WMLDoElement*>(parent);
doElement->setNoop(true);
- doElement->setNeedsStyleRecalc();
+
+ if (doElement->attached())
+ doElement->detach();
+
+ ASSERT(!doElement->attached());
+ doElement->attach();
} else if (parent->hasTagName(anchorTag))
reportWMLError(document(), WMLErrorForbiddenTaskInAnchorElement);
}