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

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

Issue 2537223006: Cleanup after removal of the SVGViewSpec interface (Closed)
Patch Set: SVGViewSpec& Created 4 years 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 23 matching lines...) Expand all
34 34
35 namespace blink { 35 namespace blink {
36 36
37 SVGAnimatedPropertyBase::SVGAnimatedPropertyBase( 37 SVGAnimatedPropertyBase::SVGAnimatedPropertyBase(
38 AnimatedPropertyType type, 38 AnimatedPropertyType type,
39 SVGElement* contextElement, 39 SVGElement* contextElement,
40 const QualifiedName& attributeName, 40 const QualifiedName& attributeName,
41 CSSPropertyID cssPropertyId) 41 CSSPropertyID cssPropertyId)
42 : m_type(type), 42 : m_type(type),
43 m_cssPropertyId(cssPropertyId), 43 m_cssPropertyId(cssPropertyId),
44 m_isReadOnly(false),
45 m_contextElement(contextElement), 44 m_contextElement(contextElement),
46 m_attributeName(attributeName) { 45 m_attributeName(attributeName) {
47 DCHECK(m_contextElement); 46 DCHECK(m_contextElement);
48 DCHECK(m_attributeName != QualifiedName::null()); 47 DCHECK(m_attributeName != QualifiedName::null());
49 DCHECK_EQ(this->type(), type); 48 DCHECK_EQ(this->type(), type);
50 DCHECK_EQ(this->cssPropertyId(), cssPropertyId); 49 DCHECK_EQ(this->cssPropertyId(), cssPropertyId);
51 } 50 }
52 51
53 SVGAnimatedPropertyBase::~SVGAnimatedPropertyBase() {} 52 SVGAnimatedPropertyBase::~SVGAnimatedPropertyBase() {}
54 53
55 void SVGAnimatedPropertyBase::animationEnded() { 54 void SVGAnimatedPropertyBase::animationEnded() {
56 synchronizeAttribute(); 55 synchronizeAttribute();
57 } 56 }
58 57
59 void SVGAnimatedPropertyBase::synchronizeAttribute() { 58 void SVGAnimatedPropertyBase::synchronizeAttribute() {
60 AtomicString value(currentValueBase()->valueAsString()); 59 AtomicString value(currentValueBase()->valueAsString());
61 m_contextElement->setSynchronizedLazyAttribute(m_attributeName, value); 60 m_contextElement->setSynchronizedLazyAttribute(m_attributeName, value);
62 } 61 }
63 62
64 bool SVGAnimatedPropertyBase::isSpecified() const { 63 bool SVGAnimatedPropertyBase::isSpecified() const {
65 return isAnimating() || contextElement()->hasAttribute(attributeName()); 64 return isAnimating() || contextElement()->hasAttribute(attributeName());
66 } 65 }
67 66
68 } // namespace blink 67 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698