OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. |
3 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 3 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
4 * | 4 * |
5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. | 5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. |
6 * | 6 * |
7 * Other contributors: | 7 * Other contributors: |
8 * Robert O'Callahan <roc+@cs.cmu.edu> | 8 * Robert O'Callahan <roc+@cs.cmu.edu> |
9 * David Baron <dbaron@fas.harvard.edu> | 9 * David Baron <dbaron@fas.harvard.edu> |
10 * Christian Biesinger <cbiesinger@web.de> | 10 * Christian Biesinger <cbiesinger@web.de> |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 UseCounter::count(&document(), UseCounter::HTMLMarqueeElement); | 75 UseCounter::count(&document(), UseCounter::HTMLMarqueeElement); |
76 } | 76 } |
77 | 77 |
78 RenderMarquee::~RenderMarquee() | 78 RenderMarquee::~RenderMarquee() |
79 { | 79 { |
80 } | 80 } |
81 | 81 |
82 int RenderMarquee::marqueeSpeed() const | 82 int RenderMarquee::marqueeSpeed() const |
83 { | 83 { |
84 int result = style()->marqueeSpeed(); | 84 int result = style()->marqueeSpeed(); |
85 if (Node* node = this->node()) { | 85 if (Node* node = this->node()) |
86 ASSERT(node->hasTagName(marqueeTag)); | 86 result = std::max(result, toHTMLMarqueeElement(node)->minimumDelay()); |
87 HTMLMarqueeElement* marqueeElt = static_cast<HTMLMarqueeElement*>(node); | |
88 result = max(result, marqueeElt->minimumDelay()); | |
89 } | |
90 return result; | 87 return result; |
91 } | 88 } |
92 | 89 |
93 EMarqueeDirection RenderMarquee::direction() const | 90 EMarqueeDirection RenderMarquee::direction() const |
94 { | 91 { |
95 // FIXME: Support the CSS3 "auto" value for determining the direction of the
marquee. | 92 // FIXME: Support the CSS3 "auto" value for determining the direction of the
marquee. |
96 // For now just map MAUTO to MBACKWARD | 93 // For now just map MAUTO to MBACKWARD |
97 EMarqueeDirection result = style()->marqueeDirection(); | 94 EMarqueeDirection result = style()->marqueeDirection(); |
98 TextDirection dir = style()->direction(); | 95 TextDirection dir = style()->direction(); |
99 if (result == MAUTO) | 96 if (result == MAUTO) |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
331 m_reset = true; | 328 m_reset = true; |
332 } | 329 } |
333 | 330 |
334 if (isHorizontal()) | 331 if (isHorizontal()) |
335 layer()->scrollToXOffset(newPos); | 332 layer()->scrollToXOffset(newPos); |
336 else | 333 else |
337 layer()->scrollToYOffset(newPos); | 334 layer()->scrollToYOffset(newPos); |
338 } | 335 } |
339 | 336 |
340 } // namespace WebCore | 337 } // namespace WebCore |
OLD | NEW |