| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "config.h" | 5 #include "config.h" |
| 6 #include "core/svg/SVGElementRareData.h" | 6 #include "core/svg/SVGElementRareData.h" |
| 7 | 7 |
| 8 #include "core/css/CSSCursorImageValue.h" | 8 #include "core/css/CSSCursorImageValue.h" |
| 9 #include "core/css/resolver/StyleResolver.h" | 9 #include "core/css/resolver/StyleResolver.h" |
| 10 #include "core/dom/Document.h" | 10 #include "core/dom/Document.h" |
| 11 #include "core/svg/SVGCursorElement.h" | 11 #include "core/svg/SVGCursorElement.h" |
| 12 #include "platform/transforms/AffineTransform.h" | 12 #include "platform/transforms/AffineTransform.h" |
| 13 | 13 |
| 14 namespace blink { | 14 namespace blink { |
| 15 | 15 |
| 16 MutableStylePropertySet* SVGElementRareData::ensureAnimatedSMILStyleProperties() | 16 MutableStylePropertySet* SVGElementRareData::ensureAnimatedSMILStyleProperties() |
| 17 { | 17 { |
| 18 if (!m_animatedSMILStyleProperties) | 18 if (!m_animatedSMILStyleProperties) |
| 19 m_animatedSMILStyleProperties = MutableStylePropertySet::create(SVGAttri
buteMode); | 19 m_animatedSMILStyleProperties = MutableStylePropertySet::create(SVGAttri
buteMode); |
| 20 return m_animatedSMILStyleProperties.get(); | 20 return m_animatedSMILStyleProperties.get(); |
| 21 } | 21 } |
| 22 | 22 |
| 23 LayoutStyle* SVGElementRareData::overrideComputedStyle(Element* element, LayoutS
tyle* parentStyle) | 23 ComputedStyle* SVGElementRareData::overrideComputedStyle(Element* element, Compu
tedStyle* parentStyle) |
| 24 { | 24 { |
| 25 ASSERT(element); | 25 ASSERT(element); |
| 26 if (!m_useOverrideComputedStyle) | 26 if (!m_useOverrideComputedStyle) |
| 27 return 0; | 27 return 0; |
| 28 if (!m_overrideComputedStyle || m_needsOverrideComputedStyleUpdate) { | 28 if (!m_overrideComputedStyle || m_needsOverrideComputedStyleUpdate) { |
| 29 // The style computed here contains no CSS Animations/Transitions or SMI
L induced rules - this is needed to compute the "base value" for the SMIL animat
ion sandwhich model. | 29 // The style computed here contains no CSS Animations/Transitions or SMI
L induced rules - this is needed to compute the "base value" for the SMIL animat
ion sandwhich model. |
| 30 m_overrideComputedStyle = element->document().ensureStyleResolver().styl
eForElement(element, parentStyle, DisallowStyleSharing, MatchAllRulesExcludingSM
IL); | 30 m_overrideComputedStyle = element->document().ensureStyleResolver().styl
eForElement(element, parentStyle, DisallowStyleSharing, MatchAllRulesExcludingSM
IL); |
| 31 m_needsOverrideComputedStyleUpdate = false; | 31 m_needsOverrideComputedStyleUpdate = false; |
| 32 } | 32 } |
| 33 ASSERT(m_overrideComputedStyle); | 33 ASSERT(m_overrideComputedStyle); |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 } | 69 } |
| 70 | 70 |
| 71 AffineTransform* SVGElementRareData::animateMotionTransform() | 71 AffineTransform* SVGElementRareData::animateMotionTransform() |
| 72 { | 72 { |
| 73 if (!m_animateMotionTransform) | 73 if (!m_animateMotionTransform) |
| 74 m_animateMotionTransform = adoptPtr(new AffineTransform); | 74 m_animateMotionTransform = adoptPtr(new AffineTransform); |
| 75 return m_animateMotionTransform.get(); | 75 return m_animateMotionTransform.get(); |
| 76 } | 76 } |
| 77 | 77 |
| 78 } | 78 } |
| OLD | NEW |