OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org> |
3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 return static_cast<SVGZoomAndPanType>(number); | 52 return static_cast<SVGZoomAndPanType>(number); |
53 } | 53 } |
54 | 54 |
55 static bool parseZoomAndPan(const LChar*& start, const LChar* end, SVGZoomAn
dPanType&); | 55 static bool parseZoomAndPan(const LChar*& start, const LChar* end, SVGZoomAn
dPanType&); |
56 static bool parseZoomAndPan(const UChar*& start, const UChar* end, SVGZoomAn
dPanType&); | 56 static bool parseZoomAndPan(const UChar*& start, const UChar* end, SVGZoomAn
dPanType&); |
57 | 57 |
58 template<class SVGElementTarget> | 58 template<class SVGElementTarget> |
59 static bool parseAttribute(SVGElementTarget* target, const QualifiedName& na
me, const AtomicString& value) | 59 static bool parseAttribute(SVGElementTarget* target, const QualifiedName& na
me, const AtomicString& value) |
60 { | 60 { |
61 ASSERT(target); | 61 ASSERT(target); |
62 ASSERT(target->document()); | |
63 if (name == SVGNames::zoomAndPanAttr) { | 62 if (name == SVGNames::zoomAndPanAttr) { |
64 SVGZoomAndPanType zoomAndPan = SVGZoomAndPanUnknown; | 63 SVGZoomAndPanType zoomAndPan = SVGZoomAndPanUnknown; |
65 if (!value.isEmpty()) { | 64 if (!value.isEmpty()) { |
66 if (value.is8Bit()) { | 65 if (value.is8Bit()) { |
67 const LChar* start = value.characters8(); | 66 const LChar* start = value.characters8(); |
68 parseZoomAndPan(start, start + value.length(), zoomAndPan); | 67 parseZoomAndPan(start, start + value.length(), zoomAndPan); |
69 } else { | 68 } else { |
70 const UChar* start = value.characters16(); | 69 const UChar* start = value.characters16(); |
71 parseZoomAndPan(start, start + value.length(), zoomAndPan); | 70 parseZoomAndPan(start, start + value.length(), zoomAndPan); |
72 } | 71 } |
(...skipping 10 matching lines...) Expand all Loading... |
83 // These methods only exist to allow us to compile V8/JSSVGZoomAndPan.*. | 82 // These methods only exist to allow us to compile V8/JSSVGZoomAndPan.*. |
84 // These are never called, and thus ASSERT_NOT_REACHED. | 83 // These are never called, and thus ASSERT_NOT_REACHED. |
85 void ref(); | 84 void ref(); |
86 void deref(); | 85 void deref(); |
87 void setZoomAndPan(unsigned short); | 86 void setZoomAndPan(unsigned short); |
88 }; | 87 }; |
89 | 88 |
90 } // namespace WebCore | 89 } // namespace WebCore |
91 | 90 |
92 #endif // SVGZoomAndPan_h | 91 #endif // SVGZoomAndPan_h |
OLD | NEW |