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

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

Issue 72363002: Rename es => exceptionState in other than bindings/ (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Retry Created 7 years, 1 month 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
« no previous file with comments | « Source/core/html/HTMLInputElement.cpp ('k') | Source/core/html/HTMLMediaElement.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 marqueeRenderer->stop(); 120 marqueeRenderer->stop();
121 } 121 }
122 122
123 int HTMLMarqueeElement::scrollAmount() const 123 int HTMLMarqueeElement::scrollAmount() const
124 { 124 {
125 bool ok; 125 bool ok;
126 int scrollAmount = fastGetAttribute(scrollamountAttr).toInt(&ok); 126 int scrollAmount = fastGetAttribute(scrollamountAttr).toInt(&ok);
127 return ok && scrollAmount >= 0 ? scrollAmount : RenderStyle::initialMarqueeI ncrement().intValue(); 127 return ok && scrollAmount >= 0 ? scrollAmount : RenderStyle::initialMarqueeI ncrement().intValue();
128 } 128 }
129 129
130 void HTMLMarqueeElement::setScrollAmount(int scrollAmount, ExceptionState& es) 130 void HTMLMarqueeElement::setScrollAmount(int scrollAmount, ExceptionState& excep tionState)
131 { 131 {
132 if (scrollAmount < 0) 132 if (scrollAmount < 0)
133 es.throwUninformativeAndGenericDOMException(IndexSizeError); 133 exceptionState.throwUninformativeAndGenericDOMException(IndexSizeError);
134 else 134 else
135 setIntegralAttribute(scrollamountAttr, scrollAmount); 135 setIntegralAttribute(scrollamountAttr, scrollAmount);
136 } 136 }
137 137
138 int HTMLMarqueeElement::scrollDelay() const 138 int HTMLMarqueeElement::scrollDelay() const
139 { 139 {
140 bool ok; 140 bool ok;
141 int scrollDelay = fastGetAttribute(scrolldelayAttr).toInt(&ok); 141 int scrollDelay = fastGetAttribute(scrolldelayAttr).toInt(&ok);
142 return ok && scrollDelay >= 0 ? scrollDelay : RenderStyle::initialMarqueeSpe ed(); 142 return ok && scrollDelay >= 0 ? scrollDelay : RenderStyle::initialMarqueeSpe ed();
143 } 143 }
144 144
145 void HTMLMarqueeElement::setScrollDelay(int scrollDelay, ExceptionState& es) 145 void HTMLMarqueeElement::setScrollDelay(int scrollDelay, ExceptionState& excepti onState)
146 { 146 {
147 if (scrollDelay < 0) 147 if (scrollDelay < 0)
148 es.throwUninformativeAndGenericDOMException(IndexSizeError); 148 exceptionState.throwUninformativeAndGenericDOMException(IndexSizeError);
149 else 149 else
150 setIntegralAttribute(scrolldelayAttr, scrollDelay); 150 setIntegralAttribute(scrolldelayAttr, scrollDelay);
151 } 151 }
152 152
153 int HTMLMarqueeElement::loop() const 153 int HTMLMarqueeElement::loop() const
154 { 154 {
155 bool ok; 155 bool ok;
156 int loopValue = fastGetAttribute(loopAttr).toInt(&ok); 156 int loopValue = fastGetAttribute(loopAttr).toInt(&ok);
157 return ok && loopValue > 0 ? loopValue : -1; 157 return ok && loopValue > 0 ? loopValue : -1;
158 } 158 }
159 159
160 void HTMLMarqueeElement::setLoop(int loop, ExceptionState& es) 160 void HTMLMarqueeElement::setLoop(int loop, ExceptionState& exceptionState)
161 { 161 {
162 if (loop <= 0 && loop != -1) 162 if (loop <= 0 && loop != -1)
163 es.throwUninformativeAndGenericDOMException(IndexSizeError); 163 exceptionState.throwUninformativeAndGenericDOMException(IndexSizeError);
164 else 164 else
165 setIntegralAttribute(loopAttr, loop); 165 setIntegralAttribute(loopAttr, loop);
166 } 166 }
167 167
168 void HTMLMarqueeElement::suspend() 168 void HTMLMarqueeElement::suspend()
169 { 169 {
170 if (RenderMarquee* marqueeRenderer = renderMarquee()) 170 if (RenderMarquee* marqueeRenderer = renderMarquee())
171 marqueeRenderer->suspend(); 171 marqueeRenderer->suspend();
172 } 172 }
173 173
174 void HTMLMarqueeElement::resume() 174 void HTMLMarqueeElement::resume()
175 { 175 {
176 if (RenderMarquee* marqueeRenderer = renderMarquee()) 176 if (RenderMarquee* marqueeRenderer = renderMarquee())
177 marqueeRenderer->updateMarqueePosition(); 177 marqueeRenderer->updateMarqueePosition();
178 } 178 }
179 179
180 RenderMarquee* HTMLMarqueeElement::renderMarquee() const 180 RenderMarquee* HTMLMarqueeElement::renderMarquee() const
181 { 181 {
182 if (renderer() && renderer()->isMarquee()) 182 if (renderer() && renderer()->isMarquee())
183 return toRenderMarquee(renderer()); 183 return toRenderMarquee(renderer());
184 return 0; 184 return 0;
185 } 185 }
186 186
187 RenderObject* HTMLMarqueeElement::createRenderer(RenderStyle*) 187 RenderObject* HTMLMarqueeElement::createRenderer(RenderStyle*)
188 { 188 {
189 return new RenderMarquee(this); 189 return new RenderMarquee(this);
190 } 190 }
191 191
192 } // namespace WebCore 192 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/html/HTMLInputElement.cpp ('k') | Source/core/html/HTMLMediaElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698