Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Side by Side Diff: third_party/WebKit/Source/core/svg/SVGPath.cpp

Issue 1469323002: SVGPathUtilities tidying (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698