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

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

Issue 2738863002: Replace ASSERT with DCHECK in core/svg/ (Closed)
Patch Set: Split DCHECKS wherever possible Created 3 years, 9 months 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 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann
3 * <zimmermann@kde.org> 3 * <zimmermann@kde.org>
4 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org> 4 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org>
5 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> 5 * Copyright (C) 2007 Eric Seidel <eric@webkit.org>
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 } 84 }
85 85
86 void executeQuery(const SVGPathByteStream& pathByteStream, 86 void executeQuery(const SVGPathByteStream& pathByteStream,
87 SVGPathTraversalState& traversalState) { 87 SVGPathTraversalState& traversalState) {
88 SVGPathByteStreamSource source(pathByteStream); 88 SVGPathByteStreamSource source(pathByteStream);
89 SVGPathNormalizer normalizer(&traversalState); 89 SVGPathNormalizer normalizer(&traversalState);
90 90
91 bool hasMoreData = source.hasMoreData(); 91 bool hasMoreData = source.hasMoreData();
92 while (hasMoreData) { 92 while (hasMoreData) {
93 PathSegmentData segment = source.parseSegment(); 93 PathSegmentData segment = source.parseSegment();
94 ASSERT(segment.command != PathSegUnknown); 94 DCHECK_NE(segment.command, PathSegUnknown);
95 95
96 normalizer.emitSegment(segment); 96 normalizer.emitSegment(segment);
97 97
98 hasMoreData = source.hasMoreData(); 98 hasMoreData = source.hasMoreData();
99 if (traversalState.processSegment(hasMoreData)) 99 if (traversalState.processSegment(hasMoreData))
100 break; 100 break;
101 } 101 }
102 } 102 }
103 103
104 } // namespace 104 } // namespace
(...skipping 16 matching lines...) Expand all
121 } 121 }
122 122
123 FloatPoint SVGPathQuery::getPointAtLength(float length) const { 123 FloatPoint SVGPathQuery::getPointAtLength(float length) const {
124 SVGPathTraversalState traversalState( 124 SVGPathTraversalState traversalState(
125 PathTraversalState::TraversalPointAtLength, length); 125 PathTraversalState::TraversalPointAtLength, length);
126 executeQuery(m_pathByteStream, traversalState); 126 executeQuery(m_pathByteStream, traversalState);
127 return traversalState.computedPoint(); 127 return traversalState.computedPoint();
128 } 128 }
129 129
130 } // namespace blink 130 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGPathParser.h ('k') | third_party/WebKit/Source/core/svg/SVGPathStringBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698