| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2010 Rob Buis <buis@kde.org> | 2 * Copyright (C) 2007, 2010 Rob Buis <buis@kde.org> |
| 3 * | 3 * |
| 4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
| 5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
| 6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
| 7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
| 8 * | 8 * |
| 9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 #include "bindings/core/v8/ExceptionState.h" | 23 #include "bindings/core/v8/ExceptionState.h" |
| 24 #include "core/SVGNames.h" | 24 #include "core/SVGNames.h" |
| 25 #include "core/dom/ExceptionCode.h" | 25 #include "core/dom/ExceptionCode.h" |
| 26 #include "core/svg/SVGAnimatedTransformList.h" | 26 #include "core/svg/SVGAnimatedTransformList.h" |
| 27 #include "core/svg/SVGParserUtilities.h" | 27 #include "core/svg/SVGParserUtilities.h" |
| 28 #include "wtf/text/ParsingUtilities.h" | 28 #include "wtf/text/ParsingUtilities.h" |
| 29 | 29 |
| 30 namespace blink { | 30 namespace blink { |
| 31 | 31 |
| 32 SVGViewSpec::SVGViewSpec(SVGSVGElement* contextElement) | 32 SVGViewSpec::SVGViewSpec(SVGSVGElement* contextElement) |
| 33 // Note: addToPropertyMap is not needed, as SVGViewSpec do not correspond to
an element. | 33 // Note: addToPropertyMap is not needed, as SVGViewSpec do not correspond to |
| 34 // Note: We make tear-offs' contextElement the target element of SVGViewSpec
. | 34 // an element. We make tear-offs' contextElement the target element of |
| 35 // This contextElement will be only used for keeping this alive from the tea
roff. | 35 // SVGViewSpec. This contextElement will be only used for keeping this |
| 36 // SVGSVGElement holds a strong-ref to this SVGViewSpec, so this is kept ali
ve as: | 36 // alive from the tearoff. SVGSVGElement holds a strong-ref to this |
| 37 // AnimatedProperty tearoff -(contextElement)-> SVGSVGElement -(RefPtr)-> SV
GViewSpec. | 37 // SVGViewSpec, so this is kept alive as: |
| 38 // AnimatedProperty tearoff -(contextElement)-> SVGSVGElement -(RefPtr)-> |
| 39 // SVGViewSpec. |
| 38 : SVGFitToViewBox(contextElement, PropertyMapPolicySkip), | 40 : SVGFitToViewBox(contextElement, PropertyMapPolicySkip), |
| 39 m_contextElement(contextElement), | 41 m_contextElement(contextElement), |
| 40 m_transform( | 42 m_transform( |
| 41 SVGAnimatedTransformList::create(contextElement, | 43 SVGAnimatedTransformList::create(contextElement, |
| 42 SVGNames::transformAttr, | 44 SVGNames::transformAttr, |
| 43 SVGTransformList::create())) { | 45 SVGTransformList::create())) { |
| 44 ASSERT(m_contextElement); | 46 ASSERT(m_contextElement); |
| 45 | 47 |
| 46 viewBox()->setReadOnly(); | 48 viewBox()->setReadOnly(); |
| 47 preserveAspectRatio()->setReadOnly(); | 49 preserveAspectRatio()->setReadOnly(); |
| 48 m_transform->setReadOnly(); | 50 m_transform->setReadOnly(); |
| 49 // Note: addToPropertyMap is not needed, as SVGViewSpec do not correspond to a
n element. | 51 // Note: addToPropertyMap is not needed, as SVGViewSpec do not correspond to |
| 52 // an element. |
| 50 } | 53 } |
| 51 | 54 |
| 52 DEFINE_TRACE(SVGViewSpec) { | 55 DEFINE_TRACE(SVGViewSpec) { |
| 53 visitor->trace(m_contextElement); | 56 visitor->trace(m_contextElement); |
| 54 visitor->trace(m_transform); | 57 visitor->trace(m_transform); |
| 55 SVGFitToViewBox::trace(visitor); | 58 SVGFitToViewBox::trace(visitor); |
| 56 } | 59 } |
| 57 | 60 |
| 58 DEFINE_TRACE_WRAPPERS(SVGViewSpec) { | 61 DEFINE_TRACE_WRAPPERS(SVGViewSpec) { |
| 59 visitor->traceWrappers(m_contextElement); | 62 visitor->traceWrappers(m_contextElement); |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 ptr++; | 211 ptr++; |
| 209 } | 212 } |
| 210 | 213 |
| 211 if (ptr >= end || *ptr != ')') | 214 if (ptr >= end || *ptr != ')') |
| 212 return false; | 215 return false; |
| 213 | 216 |
| 214 return true; | 217 return true; |
| 215 } | 218 } |
| 216 | 219 |
| 217 } // namespace blink | 220 } // namespace blink |
| OLD | NEW |