| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * Copyright (C) 2003, 2007, 2010 Apple Inc. All rights reserved. | 4 * Copyright (C) 2003, 2007, 2010 Apple Inc. All rights reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 int HTMLMarqueeElement::loop() const { | 185 int HTMLMarqueeElement::loop() const { |
| 186 bool ok; | 186 bool ok; |
| 187 int loop = fastGetAttribute(HTMLNames::loopAttr).toInt(&ok); | 187 int loop = fastGetAttribute(HTMLNames::loopAttr).toInt(&ok); |
| 188 if (!ok || loop <= 0) | 188 if (!ok || loop <= 0) |
| 189 return kDefaultLoopLimit; | 189 return kDefaultLoopLimit; |
| 190 return loop; | 190 return loop; |
| 191 } | 191 } |
| 192 | 192 |
| 193 void HTMLMarqueeElement::setLoop(int value, ExceptionState& exceptionState) { | 193 void HTMLMarqueeElement::setLoop(int value, ExceptionState& exceptionState) { |
| 194 if (value <= 0 && value != -1) { | 194 if (value <= 0 && value != -1) { |
| 195 exceptionState.throwDOMException( | 195 exceptionState.throwDOMException(IndexSizeError, |
| 196 IndexSizeError, "The provided value (" + String::number(value) + | 196 "The provided value (" + |
| 197 ") is neither positive nor -1."); | 197 String::number(value) + |
| 198 ") is neither positive nor -1."); |
| 198 return; | 199 return; |
| 199 } | 200 } |
| 200 setIntegralAttribute(HTMLNames::loopAttr, value); | 201 setIntegralAttribute(HTMLNames::loopAttr, value); |
| 201 } | 202 } |
| 202 | 203 |
| 203 void HTMLMarqueeElement::start() { | 204 void HTMLMarqueeElement::start() { |
| 204 if (m_continueCallbackRequestId) | 205 if (m_continueCallbackRequestId) |
| 205 return; | 206 return; |
| 206 | 207 |
| 207 RequestAnimationFrameCallback* callback = | 208 RequestAnimationFrameCallback* callback = |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 489 String::numberToStringECMAScript(value) + "px)"; | 490 String::numberToStringECMAScript(value) + "px)"; |
| 490 } | 491 } |
| 491 | 492 |
| 492 DEFINE_TRACE(HTMLMarqueeElement) { | 493 DEFINE_TRACE(HTMLMarqueeElement) { |
| 493 visitor->trace(m_mover); | 494 visitor->trace(m_mover); |
| 494 visitor->trace(m_player); | 495 visitor->trace(m_player); |
| 495 HTMLElement::trace(visitor); | 496 HTMLElement::trace(visitor); |
| 496 } | 497 } |
| 497 | 498 |
| 498 } // namespace blink | 499 } // namespace blink |
| OLD | NEW |