OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org> |
3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> |
4 * Copyright (C) 2009 Google, Inc. | 4 * Copyright (C) 2009 Google, Inc. |
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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 if (element->hasTagName(SVGNames::useTag)) | 48 if (element->hasTagName(SVGNames::useTag)) |
49 useElement = static_cast<SVGUseElement*>(element); | 49 useElement = static_cast<SVGUseElement*>(element); |
50 else if (element->isInShadowTree() && element->hasTagName(SVGNames::gTag)) { | 50 else if (element->isInShadowTree() && element->hasTagName(SVGNames::gTag)) { |
51 SVGElement* correspondingElement = element->correspondingElement(); | 51 SVGElement* correspondingElement = element->correspondingElement(); |
52 if (correspondingElement && correspondingElement->hasTagName(SVGNames::u
seTag)) | 52 if (correspondingElement && correspondingElement->hasTagName(SVGNames::u
seTag)) |
53 useElement = static_cast<SVGUseElement*>(correspondingElement); | 53 useElement = static_cast<SVGUseElement*>(correspondingElement); |
54 } | 54 } |
55 | 55 |
56 if (useElement) { | 56 if (useElement) { |
57 SVGLengthContext lengthContext(useElement); | 57 SVGLengthContext lengthContext(useElement); |
58 FloatSize translation(useElement->x().value(lengthContext), useElement->
y().value(lengthContext)); | 58 FloatSize translation(useElement->xCurrentValue().value(lengthContext),
useElement->yCurrentValue().value(lengthContext)); |
59 if (translation != m_lastTranslation) | 59 if (translation != m_lastTranslation) |
60 m_needsTransformUpdate = true; | 60 m_needsTransformUpdate = true; |
61 m_lastTranslation = translation; | 61 m_lastTranslation = translation; |
62 } | 62 } |
63 | 63 |
64 m_didTransformToRootUpdate = m_needsTransformUpdate || SVGRenderSupport::tra
nsformToRootChanged(parent()); | 64 m_didTransformToRootUpdate = m_needsTransformUpdate || SVGRenderSupport::tra
nsformToRootChanged(parent()); |
65 if (!m_needsTransformUpdate) | 65 if (!m_needsTransformUpdate) |
66 return false; | 66 return false; |
67 | 67 |
68 m_localTransform = element->animatedLocalTransform(); | 68 m_localTransform = element->animatedLocalTransform(); |
69 m_localTransform.translate(m_lastTranslation.width(), m_lastTranslation.heig
ht()); | 69 m_localTransform.translate(m_lastTranslation.width(), m_lastTranslation.heig
ht()); |
70 m_needsTransformUpdate = false; | 70 m_needsTransformUpdate = false; |
71 return true; | 71 return true; |
72 } | 72 } |
73 | 73 |
74 } | 74 } |
OLD | NEW |