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

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

Issue 1476283002: Drop PathParsingMode argument to buildStringFromByteStream (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove include; Drop forward decl. 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 12 matching lines...) Expand all
23 #include "config.h" 23 #include "config.h"
24 #include "core/svg/SVGPath.h" 24 #include "core/svg/SVGPath.h"
25 25
26 #include "bindings/core/v8/ExceptionState.h" 26 #include "bindings/core/v8/ExceptionState.h"
27 #include "core/SVGNames.h" 27 #include "core/SVGNames.h"
28 #include "core/svg/SVGAnimationElement.h" 28 #include "core/svg/SVGAnimationElement.h"
29 #include "core/svg/SVGPathBlender.h" 29 #include "core/svg/SVGPathBlender.h"
30 #include "core/svg/SVGPathByteStream.h" 30 #include "core/svg/SVGPathByteStream.h"
31 #include "core/svg/SVGPathByteStreamBuilder.h" 31 #include "core/svg/SVGPathByteStreamBuilder.h"
32 #include "core/svg/SVGPathByteStreamSource.h" 32 #include "core/svg/SVGPathByteStreamSource.h"
33 #include "core/svg/SVGPathParser.h"
34 #include "core/svg/SVGPathUtilities.h" 33 #include "core/svg/SVGPathUtilities.h"
35 #include "platform/graphics/Path.h" 34 #include "platform/graphics/Path.h"
36 35
37 namespace blink { 36 namespace blink {
38 37
39 namespace { 38 namespace {
40 39
41 PassOwnPtr<SVGPathByteStream> blendPathByteStreams(const SVGPathByteStream& from Stream, const SVGPathByteStream& toStream, float progress) 40 PassOwnPtr<SVGPathByteStream> blendPathByteStreams(const SVGPathByteStream& from Stream, const SVGPathByteStream& toStream, float progress)
42 { 41 {
43 OwnPtr<SVGPathByteStream> resultStream = SVGPathByteStream::create(); 42 OwnPtr<SVGPathByteStream> resultStream = SVGPathByteStream::create();
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 m_cachedPath.clear(); 114 m_cachedPath.clear();
116 } 115 }
117 116
118 const SVGPathByteStream& SVGPath::byteStream() const 117 const SVGPathByteStream& SVGPath::byteStream() const
119 { 118 {
120 return const_cast<SVGPath*>(this)->ensureByteStream(); 119 return const_cast<SVGPath*>(this)->ensureByteStream();
121 } 120 }
122 121
123 String SVGPath::valueAsString() const 122 String SVGPath::valueAsString() const
124 { 123 {
125 return buildStringFromByteStream(byteStream(), UnalteredParsing); 124 return buildStringFromByteStream(byteStream());
126 } 125 }
127 126
128 void SVGPath::setValueAsString(const String& string, ExceptionState& exceptionSt ate) 127 void SVGPath::setValueAsString(const String& string, ExceptionState& exceptionSt ate)
129 { 128 {
130 if (!buildByteStreamFromString(string, ensureByteStream())) 129 if (!buildByteStreamFromString(string, ensureByteStream()))
131 exceptionState.throwDOMException(SyntaxError, "Problem parsing path \"" + string + "\""); 130 exceptionState.throwDOMException(SyntaxError, "Problem parsing path \"" + string + "\"");
132 byteStreamChanged(); 131 byteStreamChanged();
133 } 132 }
134 133
135 void SVGPath::setValueAsByteStream(PassOwnPtr<SVGPathByteStream> byteStream) 134 void SVGPath::setValueAsByteStream(PassOwnPtr<SVGPathByteStream> byteStream)
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 setValueAsByteStream(newStream.release()); 194 setValueAsByteStream(newStream.release());
196 } 195 }
197 196
198 float SVGPath::calculateDistance(PassRefPtrWillBeRawPtr<SVGPropertyBase> to, SVG Element*) 197 float SVGPath::calculateDistance(PassRefPtrWillBeRawPtr<SVGPropertyBase> to, SVG Element*)
199 { 198 {
200 // FIXME: Support paced animations. 199 // FIXME: Support paced animations.
201 return -1; 200 return -1;
202 } 201 }
203 202
204 } 203 }
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGPath.h ('k') | third_party/WebKit/Source/core/svg/SVGPathElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698