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 |
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
12 * Library General Public License for more details. | 12 * Library General Public License for more details. |
13 * | 13 * |
14 * You should have received a copy of the GNU Library General Public License | 14 * You should have received a copy of the GNU Library General Public License |
15 * along with this library; see the file COPYING.LIB. If not, write to | 15 * along with this library; see the file COPYING.LIB. If not, write to |
16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
17 * Boston, MA 02110-1301, USA. | 17 * Boston, MA 02110-1301, USA. |
18 */ | 18 */ |
19 | 19 |
20 #include "config.h" | 20 #include "config.h" |
21 #include "core/svg/SVGViewSpec.h" | 21 #include "core/svg/SVGViewSpec.h" |
22 | 22 |
23 #include "SVGNames.h" | 23 #include "SVGNames.h" |
24 #include "bindings/v8/ExceptionState.h" | 24 #include "bindings/v8/ExceptionState.h" |
25 #include "core/dom/Document.h" | 25 #include "core/dom/Document.h" |
26 #include "core/svg/SVGAnimatedTransformList.h" | 26 #include "core/svg/SVGAnimatedTransformList.h" |
27 #include "core/svg/SVGFitToViewBox.h" | 27 #include "core/svg/SVGFitToViewBox.h" |
28 #include "core/svg/SVGParserUtilities.h" | 28 #include "core/svg/SVGParserUtilities.h" |
29 #include "core/svg/SVGSVGElement.h" | 29 #include "core/svg/SVGSVGElement.h" |
30 #include "core/svg/SVGTransformable.h" | |
31 | 30 |
32 namespace WebCore { | 31 namespace WebCore { |
33 | 32 |
34 // Define custom animated property 'viewBox'. | 33 // Define custom animated property 'viewBox'. |
35 const SVGPropertyInfo* SVGViewSpec::viewBoxPropertyInfo() | 34 const SVGPropertyInfo* SVGViewSpec::viewBoxPropertyInfo() |
36 { | 35 { |
37 static const SVGPropertyInfo* s_propertyInfo = 0; | 36 static const SVGPropertyInfo* s_propertyInfo = 0; |
38 if (!s_propertyInfo) { | 37 if (!s_propertyInfo) { |
39 s_propertyInfo = new SVGPropertyInfo(AnimatedRect, | 38 s_propertyInfo = new SVGPropertyInfo(AnimatedRect, |
40 PropertyIsReadOnly, | 39 PropertyIsReadOnly, |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 setPreserveAspectRatioBaseValue(preserveAspectRatio); | 264 setPreserveAspectRatioBaseValue(preserveAspectRatio); |
266 if (ptr >= end || *ptr != ')') | 265 if (ptr >= end || *ptr != ')') |
267 return false; | 266 return false; |
268 ptr++; | 267 ptr++; |
269 } else if (*ptr == 't') { | 268 } else if (*ptr == 't') { |
270 if (!skipString(ptr, end, transformSpec, WTF_ARRAY_LENGTH(transformS
pec))) | 269 if (!skipString(ptr, end, transformSpec, WTF_ARRAY_LENGTH(transformS
pec))) |
271 return false; | 270 return false; |
272 if (ptr >= end || *ptr != '(') | 271 if (ptr >= end || *ptr != '(') |
273 return false; | 272 return false; |
274 ptr++; | 273 ptr++; |
275 SVGTransformable::parseTransformAttribute(m_transform, ptr, end, SVG
Transformable::DoNotClearList); | 274 parseTransformAttribute(m_transform, ptr, end, DoNotClearList); |
276 if (ptr >= end || *ptr != ')') | 275 if (ptr >= end || *ptr != ')') |
277 return false; | 276 return false; |
278 ptr++; | 277 ptr++; |
279 } else | 278 } else |
280 return false; | 279 return false; |
281 | 280 |
282 if (ptr < end && *ptr == ';') | 281 if (ptr < end && *ptr == ';') |
283 ptr++; | 282 ptr++; |
284 } | 283 } |
285 | 284 |
(...skipping 11 matching lines...) Expand all Loading... |
297 const LChar* ptr = spec.characters8(); | 296 const LChar* ptr = spec.characters8(); |
298 const LChar* end = ptr + spec.length(); | 297 const LChar* end = ptr + spec.length(); |
299 return parseViewSpecInternal(ptr, end); | 298 return parseViewSpecInternal(ptr, end); |
300 } | 299 } |
301 const UChar* ptr = spec.characters16(); | 300 const UChar* ptr = spec.characters16(); |
302 const UChar* end = ptr + spec.length(); | 301 const UChar* end = ptr + spec.length(); |
303 return parseViewSpecInternal(ptr, end); | 302 return parseViewSpecInternal(ptr, end); |
304 } | 303 } |
305 | 304 |
306 } | 305 } |
OLD | NEW |