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

Side by Side Diff: third_party/WebKit/Source/core/svg/properties/SVGAnimatedProperty.h

Issue 2329463004: ABANDONED CL: Changes needed to make things compile after running rewrite_to_chrome_style tool. (Closed)
Patch Set: More fixes - things build fine at this point. Created 3 years, 8 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 G* * Redistributions in binary form must reproduce the above 10 G* * Redistributions in binary form must reproduce the above
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 189
190 // baseVal()/setBaseVal()/animVal() are only to be used from SVG DOM 190 // baseVal()/setBaseVal()/animVal() are only to be used from SVG DOM
191 // implementation. Use currentValue() from C++ code. 191 // implementation. Use currentValue() from C++ code.
192 PrimitiveType baseVal() { return this->baseValue()->value(); } 192 PrimitiveType baseVal() { return this->baseValue()->value(); }
193 193
194 void setBaseVal(PrimitiveType value, ExceptionState&) { 194 void setBaseVal(PrimitiveType value, ExceptionState&) {
195 this->baseValue()->setValue(value); 195 this->baseValue()->setValue(value);
196 m_baseValueUpdated = true; 196 m_baseValueUpdated = true;
197 197
198 DCHECK(this->attributeName() != QualifiedName::null()); 198 DCHECK(this->attributeName() != QualifiedName::null());
199 /* DO NOT SUBMIT - Merge conflict marker */
200 /* Please spell |contextElement| (not |ContextElement|) below. */
199 this->contextElement()->invalidateSVGAttributes(); 201 this->contextElement()->invalidateSVGAttributes();
200 this->contextElement()->svgAttributeBaseValChanged(this->attributeName()); 202 this->contextElement()->svgAttributeBaseValChanged(this->attributeName());
201 } 203 }
202 204
203 PrimitiveType animVal() { 205 PrimitiveType animVal() {
206 /* DO NOT SUBMIT - Merge conflict marker */
207 /* Please spell |contextElement| (not |ContextElement|) below. */
204 this->contextElement()->ensureAttributeAnimValUpdated(); 208 this->contextElement()->ensureAttributeAnimValUpdated();
205 return this->currentValue()->value(); 209 return this->currentValue()->value();
206 } 210 }
207 211
208 protected: 212 protected:
209 SVGAnimatedProperty(SVGElement* contextElement, 213 SVGAnimatedProperty(SVGElement* contextElement,
210 const QualifiedName& attributeName, 214 const QualifiedName& attributeName,
211 Property* initialValue, 215 Property* initialValue,
212 CSSPropertyID cssPropertyId = CSSPropertyInvalid) 216 CSSPropertyID cssPropertyId = CSSPropertyInvalid)
213 : SVGAnimatedPropertyCommon<Property>(contextElement, 217 : SVGAnimatedPropertyCommon<Property>(contextElement,
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 return m_baseValTearOff || this->isAnimating(); 257 return m_baseValTearOff || this->isAnimating();
254 } 258 }
255 259
256 // SVGAnimated* DOM Spec implementations: 260 // SVGAnimated* DOM Spec implementations:
257 261
258 // baseVal()/animVal() are only to be used from SVG DOM implementation. 262 // baseVal()/animVal() are only to be used from SVG DOM implementation.
259 // Use currentValue() from C++ code. 263 // Use currentValue() from C++ code.
260 virtual TearOffType* baseVal() { 264 virtual TearOffType* baseVal() {
261 if (!m_baseValTearOff) { 265 if (!m_baseValTearOff) {
262 m_baseValTearOff = 266 m_baseValTearOff =
267 /* DO NOT SUBMIT - Merge conflict marker */
268 /* Please spell |contextElement| (not |ContextElement|) below. */
263 TearOffType::create(this->baseValue(), this->contextElement(), 269 TearOffType::create(this->baseValue(), this->contextElement(),
264 PropertyIsNotAnimVal, this->attributeName()); 270 PropertyIsNotAnimVal, this->attributeName());
265 } 271 }
266 return m_baseValTearOff; 272 return m_baseValTearOff;
267 } 273 }
268 274
269 TearOffType* animVal() { 275 TearOffType* animVal() {
270 if (!m_animValTearOff) { 276 if (!m_animValTearOff) {
271 m_animValTearOff = 277 m_animValTearOff =
278 /* DO NOT SUBMIT - Merge conflict marker */
279 /* Please spell |contextElement| (not |ContextElement|) below. */
272 TearOffType::create(this->currentValue(), this->contextElement(), 280 TearOffType::create(this->currentValue(), this->contextElement(),
273 PropertyIsAnimVal, this->attributeName()); 281 PropertyIsAnimVal, this->attributeName());
274 } 282 }
275 return m_animValTearOff; 283 return m_animValTearOff;
276 } 284 }
277 285
278 DEFINE_INLINE_VIRTUAL_TRACE() { 286 DEFINE_INLINE_VIRTUAL_TRACE() {
279 visitor->trace(m_baseValTearOff); 287 visitor->trace(m_baseValTearOff);
280 visitor->trace(m_animValTearOff); 288 visitor->trace(m_animValTearOff);
281 SVGAnimatedPropertyCommon<Property>::trace(visitor); 289 SVGAnimatedPropertyCommon<Property>::trace(visitor);
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 CSSPropertyID cssPropertyId = CSSPropertyInvalid) 343 CSSPropertyID cssPropertyId = CSSPropertyInvalid)
336 : SVGAnimatedPropertyCommon<Property>(contextElement, 344 : SVGAnimatedPropertyCommon<Property>(contextElement,
337 attributeName, 345 attributeName,
338 initialValue, 346 initialValue,
339 cssPropertyId) {} 347 cssPropertyId) {}
340 }; 348 };
341 349
342 } // namespace blink 350 } // namespace blink
343 351
344 #endif // SVGAnimatedProperty_h 352 #endif // SVGAnimatedProperty_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698