OLD | NEW |
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 24 matching lines...) Expand all Loading... |
35 | 35 |
36 namespace WebCore { | 36 namespace WebCore { |
37 | 37 |
38 SVGAnimatedPropertyBase::SVGAnimatedPropertyBase(AnimatedPropertyType type, SVGE
lement* contextElement, const QualifiedName& attributeName) | 38 SVGAnimatedPropertyBase::SVGAnimatedPropertyBase(AnimatedPropertyType type, SVGE
lement* contextElement, const QualifiedName& attributeName) |
39 : m_type(type) | 39 : m_type(type) |
40 , m_isReadOnly(false) | 40 , m_isReadOnly(false) |
41 , m_contextElement(contextElement) | 41 , m_contextElement(contextElement) |
42 , m_attributeName(attributeName) | 42 , m_attributeName(attributeName) |
43 { | 43 { |
44 ASSERT(m_contextElement); | 44 ASSERT(m_contextElement); |
45 ASSERT(m_attributeName != nullQName()); | 45 ASSERT(m_attributeName != QualifiedName::null()); |
46 // FIXME: setContextElement should be delayed until V8 wrapper is created. | 46 // FIXME: setContextElement should be delayed until V8 wrapper is created. |
47 // FIXME: oilpan: or we can remove this backref ptr hack in oilpan. | 47 // FIXME: oilpan: or we can remove this backref ptr hack in oilpan. |
48 m_contextElement->setContextElement(); | 48 m_contextElement->setContextElement(); |
49 } | 49 } |
50 | 50 |
51 SVGAnimatedPropertyBase::~SVGAnimatedPropertyBase() | 51 SVGAnimatedPropertyBase::~SVGAnimatedPropertyBase() |
52 { | 52 { |
53 } | 53 } |
54 | 54 |
55 void SVGAnimatedPropertyBase::animationEnded() | 55 void SVGAnimatedPropertyBase::animationEnded() |
56 { | 56 { |
57 synchronizeAttribute(); | 57 synchronizeAttribute(); |
58 } | 58 } |
59 | 59 |
60 void SVGAnimatedPropertyBase::synchronizeAttribute() | 60 void SVGAnimatedPropertyBase::synchronizeAttribute() |
61 { | 61 { |
62 AtomicString value(currentValueBase()->valueAsString()); | 62 AtomicString value(currentValueBase()->valueAsString()); |
63 m_contextElement->setSynchronizedLazyAttribute(m_attributeName, value); | 63 m_contextElement->setSynchronizedLazyAttribute(m_attributeName, value); |
64 } | 64 } |
65 | 65 |
66 bool SVGAnimatedPropertyBase::isSpecified() const | 66 bool SVGAnimatedPropertyBase::isSpecified() const |
67 { | 67 { |
68 return isAnimating() || contextElement()->hasAttribute(attributeName()); | 68 return isAnimating() || contextElement()->hasAttribute(attributeName()); |
69 } | 69 } |
70 | 70 |
71 } // namespace WebCore | 71 } // namespace WebCore |
OLD | NEW |