| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde
.org> | 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde
.org> |
| 3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org> |
| 4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> | 4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> |
| 5 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 5 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 m_cachedPath.clear(); | 115 m_cachedPath.clear(); |
| 116 } | 116 } |
| 117 | 117 |
| 118 const SVGPathByteStream& SVGPath::byteStream() const | 118 const SVGPathByteStream& SVGPath::byteStream() const |
| 119 { | 119 { |
| 120 return const_cast<SVGPath*>(this)->ensureByteStream(); | 120 return const_cast<SVGPath*>(this)->ensureByteStream(); |
| 121 } | 121 } |
| 122 | 122 |
| 123 String SVGPath::valueAsString() const | 123 String SVGPath::valueAsString() const |
| 124 { | 124 { |
| 125 String string; | 125 return buildStringFromByteStream(byteStream(), UnalteredParsing); |
| 126 buildStringFromByteStream(byteStream(), string, UnalteredParsing); | |
| 127 return string; | |
| 128 } | 126 } |
| 129 | 127 |
| 130 void SVGPath::setValueAsString(const String& string, ExceptionState& exceptionSt
ate) | 128 void SVGPath::setValueAsString(const String& string, ExceptionState& exceptionSt
ate) |
| 131 { | 129 { |
| 132 if (!buildSVGPathByteStreamFromString(string, ensureByteStream(), UnalteredP
arsing)) | 130 if (!buildByteStreamFromString(string, ensureByteStream())) |
| 133 exceptionState.throwDOMException(SyntaxError, "Problem parsing path \""
+ string + "\""); | 131 exceptionState.throwDOMException(SyntaxError, "Problem parsing path \""
+ string + "\""); |
| 134 byteStreamChanged(); | 132 byteStreamChanged(); |
| 135 } | 133 } |
| 136 | 134 |
| 137 void SVGPath::setValueAsByteStream(PassOwnPtr<SVGPathByteStream> byteStream) | 135 void SVGPath::setValueAsByteStream(PassOwnPtr<SVGPathByteStream> byteStream) |
| 138 { | 136 { |
| 139 m_byteStream = byteStream; | 137 m_byteStream = byteStream; |
| 140 byteStreamChanged(); | 138 byteStreamChanged(); |
| 141 } | 139 } |
| 142 | 140 |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 setValueAsByteStream(newStream.release()); | 195 setValueAsByteStream(newStream.release()); |
| 198 } | 196 } |
| 199 | 197 |
| 200 float SVGPath::calculateDistance(PassRefPtrWillBeRawPtr<SVGPropertyBase> to, SVG
Element*) | 198 float SVGPath::calculateDistance(PassRefPtrWillBeRawPtr<SVGPropertyBase> to, SVG
Element*) |
| 201 { | 199 { |
| 202 // FIXME: Support paced animations. | 200 // FIXME: Support paced animations. |
| 203 return -1; | 201 return -1; |
| 204 } | 202 } |
| 205 | 203 |
| 206 } | 204 } |
| OLD | NEW |