diff options
Diffstat (limited to 'src/3rdparty/webkit/WebCore/wml/WMLSetvarElement.cpp')
-rw-r--r-- | src/3rdparty/webkit/WebCore/wml/WMLSetvarElement.cpp | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/src/3rdparty/webkit/WebCore/wml/WMLSetvarElement.cpp b/src/3rdparty/webkit/WebCore/wml/WMLSetvarElement.cpp index da9a1f4..f0c50cc 100644 --- a/src/3rdparty/webkit/WebCore/wml/WMLSetvarElement.cpp +++ b/src/3rdparty/webkit/WebCore/wml/WMLSetvarElement.cpp @@ -43,16 +43,11 @@ WMLSetvarElement::~WMLSetvarElement() void WMLSetvarElement::parseMappedAttribute(MappedAttribute* attr) { if (attr->name() == HTMLNames::nameAttr) { - String name = parseValueSubstitutingVariableReferences(attr->value(), WMLErrorInvalidVariableName); - if (!isValidVariableName(name)) { + if (!isValidVariableName(parseValueSubstitutingVariableReferences(attr->value(), WMLErrorInvalidVariableName))) { reportWMLError(document(), WMLErrorInvalidVariableName); return; } - - m_name = name; - } else if (attr->name() == HTMLNames::valueAttr) - m_value = parseValueSubstitutingVariableReferences(attr->value()); - else + } else WMLElement::parseMappedAttribute(attr); } @@ -70,6 +65,16 @@ void WMLSetvarElement::insertedIntoDocument() static_cast<WMLTaskElement*>(parent)->registerVariableSetter(this); } +String WMLSetvarElement::name() const +{ + return parseValueSubstitutingVariableReferences(getAttribute(HTMLNames::nameAttr), WMLErrorInvalidVariableName); +} + +String WMLSetvarElement::value() const +{ + return parseValueSubstitutingVariableReferences(getAttribute(HTMLNames::valueAttr)); +} + } #endif |