Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(380)

Side by Side Diff: Source/core/html/HTMLMarqueeElement.cpp

Issue 394773003: Implement HTMLMarqueeElement's animation in private scripts (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 } else if (name == behaviorAttr) { 107 } else if (name == behaviorAttr) {
108 if (!value.isEmpty()) 108 if (!value.isEmpty())
109 addPropertyToPresentationAttributeStyle(style, CSSPropertyInternalMa rqueeStyle, value); 109 addPropertyToPresentationAttributeStyle(style, CSSPropertyInternalMa rqueeStyle, value);
110 } else if (name == directionAttr) { 110 } else if (name == directionAttr) {
111 if (!value.isEmpty()) 111 if (!value.isEmpty())
112 addPropertyToPresentationAttributeStyle(style, CSSPropertyInternalMa rqueeDirection, value); 112 addPropertyToPresentationAttributeStyle(style, CSSPropertyInternalMa rqueeDirection, value);
113 } else 113 } else
114 HTMLElement::collectStyleForPresentationAttribute(name, value, style); 114 HTMLElement::collectStyleForPresentationAttribute(name, value, style);
115 } 115 }
116 116
117 void HTMLMarqueeElement::start()
118 {
119 if (RenderMarquee* marqueeRenderer = renderMarquee())
120 marqueeRenderer->start();
121 }
122
123 void HTMLMarqueeElement::stop()
124 {
125 if (RenderMarquee* marqueeRenderer = renderMarquee())
126 marqueeRenderer->stop();
127 }
128
129 void HTMLMarqueeElement::suspend() 117 void HTMLMarqueeElement::suspend()
130 { 118 {
131 if (RenderMarquee* marqueeRenderer = renderMarquee()) 119 if (RenderMarquee* marqueeRenderer = renderMarquee())
132 marqueeRenderer->suspend(); 120 marqueeRenderer->suspend();
133 } 121 }
134 122
135 void HTMLMarqueeElement::resume() 123 void HTMLMarqueeElement::resume()
136 { 124 {
137 if (RenderMarquee* marqueeRenderer = renderMarquee()) 125 if (RenderMarquee* marqueeRenderer = renderMarquee())
138 marqueeRenderer->updateMarqueePosition(); 126 marqueeRenderer->updateMarqueePosition();
(...skipping 17 matching lines...) Expand all
156 return; 144 return;
157 145
158 document().updateLayout(); 146 document().updateLayout();
159 147
160 // The updateLayout() could have destroyed renderer(), so this re-check is v ery important. 148 // The updateLayout() could have destroyed renderer(), so this re-check is v ery important.
161 if (renderer()) 149 if (renderer())
162 toRenderMarquee(renderer())->timerFired(); 150 toRenderMarquee(renderer())->timerFired();
163 } 151 }
164 152
165 } // namespace WebCore 153 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698