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 29 matching lines...) Expand all Loading... |
40 , m_transform(SVGAnimatedTransformList::create(contextElement, SVGNames::tra
nsformAttr, SVGTransformList::create())) | 40 , m_transform(SVGAnimatedTransformList::create(contextElement, SVGNames::tra
nsformAttr, SVGTransformList::create())) |
41 { | 41 { |
42 ASSERT(m_contextElement); | 42 ASSERT(m_contextElement); |
43 | 43 |
44 viewBox()->setReadOnly(); | 44 viewBox()->setReadOnly(); |
45 preserveAspectRatio()->setReadOnly(); | 45 preserveAspectRatio()->setReadOnly(); |
46 m_transform->setReadOnly(); | 46 m_transform->setReadOnly(); |
47 // Note: addToPropertyMap is not needed, as SVGViewSpec do not correspond to
an element. | 47 // Note: addToPropertyMap is not needed, as SVGViewSpec do not correspond to
an element. |
48 } | 48 } |
49 | 49 |
| 50 void SVGViewSpec::trace(Visitor* visitor) |
| 51 { |
| 52 visitor->trace(m_contextElement); |
| 53 visitor->trace(m_transform); |
| 54 SVGFitToViewBox::trace(visitor); |
| 55 } |
| 56 |
50 bool SVGViewSpec::parseViewSpec(const String& spec) | 57 bool SVGViewSpec::parseViewSpec(const String& spec) |
51 { | 58 { |
52 if (spec.isEmpty() || !m_contextElement) | 59 if (spec.isEmpty() || !m_contextElement) |
53 return false; | 60 return false; |
54 if (spec.is8Bit()) { | 61 if (spec.is8Bit()) { |
55 const LChar* ptr = spec.characters8(); | 62 const LChar* ptr = spec.characters8(); |
56 const LChar* end = ptr + spec.length(); | 63 const LChar* end = ptr + spec.length(); |
57 return parseViewSpecInternal(ptr, end); | 64 return parseViewSpecInternal(ptr, end); |
58 } | 65 } |
59 const UChar* ptr = spec.characters16(); | 66 const UChar* ptr = spec.characters16(); |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 if (ptr < end && *ptr == ';') | 210 if (ptr < end && *ptr == ';') |
204 ptr++; | 211 ptr++; |
205 } | 212 } |
206 | 213 |
207 if (ptr >= end || *ptr != ')') | 214 if (ptr >= end || *ptr != ')') |
208 return false; | 215 return false; |
209 | 216 |
210 return true; | 217 return true; |
211 } | 218 } |
212 | 219 |
213 void SVGViewSpec::trace(Visitor* visitor) | |
214 { | |
215 visitor->trace(m_contextElement); | |
216 } | 220 } |
217 | |
218 } | |
OLD | NEW |