diff options
Diffstat (limited to 'src/3rdparty/webkit/WebCore/wml/WMLTimerElement.cpp')
-rw-r--r-- | src/3rdparty/webkit/WebCore/wml/WMLTimerElement.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/3rdparty/webkit/WebCore/wml/WMLTimerElement.cpp b/src/3rdparty/webkit/WebCore/wml/WMLTimerElement.cpp index 00c7036..a41daf5 100644 --- a/src/3rdparty/webkit/WebCore/wml/WMLTimerElement.cpp +++ b/src/3rdparty/webkit/WebCore/wml/WMLTimerElement.cpp @@ -46,8 +46,6 @@ void WMLTimerElement::parseMappedAttribute(MappedAttribute* attr) { if (attr->name() == HTMLNames::nameAttr) m_name = parseValueForbiddingVariableReferences(attr->value()); - else if (attr->name() == HTMLNames::valueAttr) - m_value = parseValueSubstitutingVariableReferences(attr->value()); else WMLElement::parseMappedAttribute(attr); } @@ -57,7 +55,7 @@ void WMLTimerElement::insertedIntoDocument() WMLElement::insertedIntoDocument(); // If the value of timeout is not a positive integer, ignore it - if (m_value.toInt() <= 0) + if (value().toInt() <= 0) return; Node* parent = parentNode(); @@ -81,10 +79,12 @@ void WMLTimerElement::timerFired(Timer<WMLTimerElement>*) if (!pageState) return; + String value = this->value(); + // When the timer expires, set the name varialbe of timer to '0' if (!m_name.isEmpty()) { - m_value = "0"; - pageState->storeVariable(m_name, m_value); + value = "0"; + pageState->storeVariable(m_name, value); } WMLIntrinsicEventType eventType = WMLIntrinsicEventOnTimer; @@ -114,7 +114,7 @@ void WMLTimerElement::start(int interval) } if (interval <= 0) - interval = m_value.toInt(); + interval = value().toInt(); if (interval > 0) m_timer.startOneShot(interval / 10.0f); @@ -137,6 +137,11 @@ void WMLTimerElement::storeIntervalToPageState() pageState->storeVariable(m_name, String::number(interval)); } +String WMLTimerElement::value() const +{ + return parseValueSubstitutingVariableReferences(getAttribute(HTMLNames::valueAttr)); +} + } #endif |