diff options
Diffstat (limited to 'WebCore/wml/WMLDoElement.cpp')
-rw-r--r-- | WebCore/wml/WMLDoElement.cpp | 44 |
1 files changed, 40 insertions, 4 deletions
diff --git a/WebCore/wml/WMLDoElement.cpp b/WebCore/wml/WMLDoElement.cpp index 916bc6e..34be6df 100644 --- a/WebCore/wml/WMLDoElement.cpp +++ b/WebCore/wml/WMLDoElement.cpp @@ -98,8 +98,6 @@ void WMLDoElement::parseMappedAttribute(MappedAttribute* attr) m_type = parseValueForbiddingVariableReferences(attr->value()); else if (attr->name() == HTMLNames::nameAttr) m_name = parseValueForbiddingVariableReferences(attr->value()); - else if (attr->name() == HTMLNames::labelAttr) - m_label = parseValueSubstitutingVariableReferences(attr->value()); else if (attr->name() == optionalAttr) m_isOptional = (attr->value() == "true"); else @@ -115,8 +113,6 @@ void WMLDoElement::insertedIntoDocument() m_name = m_type; Node* parent = parentNode(); - ASSERT(parent); - if (!parent || !parent->isWMLElement()) return; @@ -124,6 +120,29 @@ void WMLDoElement::insertedIntoDocument() eventHandlingElement->registerDoElement(this, document()); } +void WMLDoElement::removedFromDocument() +{ + Node* parent = parentNode(); + + if (parent && parent->isWMLElement()) { + if (WMLEventHandlingElement* eventHandlingElement = toWMLEventHandlingElement(static_cast<WMLElement*>(parent))) + eventHandlingElement->deregisterDoElement(this); + } + + WMLElement::removedFromDocument(); +} + +void WMLDoElement::attach() +{ + WMLElement::attach(); + + // The call to updateFromElement() needs to go after the call through + // to the base class's attach() because that can sometimes do a close + // on the renderer. + if (renderer()) + renderer()->updateFromElement(); +} + RenderObject* WMLDoElement::createRenderer(RenderArena* arena, RenderStyle* style) { if (!m_isActive || m_isOptional || m_isNoop) @@ -145,6 +164,23 @@ void WMLDoElement::recalcStyle(StyleChange change) renderer()->updateFromElement(); } +void WMLDoElement::registerTask(WMLTaskElement* task) +{ + ASSERT(!m_task); + m_task = task; +} + +void WMLDoElement::deregisterTask(WMLTaskElement* task) +{ + ASSERT(m_task == task); + m_task = 0; +} + +String WMLDoElement::label() const +{ + return parseValueSubstitutingVariableReferences(getAttribute(HTMLNames::labelAttr)); +} + } #endif |