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

Side by Side Diff: third_party/WebKit/Source/core/layout/svg/SVGLayoutTreeAsText.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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/svg/SVGPath.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2007, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2005, 2007, 2009 Apple Inc. All rights reserved.
3 * (C) 2005 Rob Buis <buis@kde.org> 3 * (C) 2005 Rob Buis <buis@kde.org>
4 * (C) 2006 Alexander Kellett <lypanov@kde.org> 4 * (C) 2006 Alexander Kellett <lypanov@kde.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 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 writeNameValuePair(ts, "rx", element.rx()->currentValue()->value(lengthC ontext)); 359 writeNameValuePair(ts, "rx", element.rx()->currentValue()->value(lengthC ontext));
360 writeNameValuePair(ts, "ry", element.ry()->currentValue()->value(lengthC ontext)); 360 writeNameValuePair(ts, "ry", element.ry()->currentValue()->value(lengthC ontext));
361 } else if (isSVGCircleElement(*svgElement)) { 361 } else if (isSVGCircleElement(*svgElement)) {
362 SVGCircleElement& element = toSVGCircleElement(*svgElement); 362 SVGCircleElement& element = toSVGCircleElement(*svgElement);
363 writeNameValuePair(ts, "cx", element.cx()->currentValue()->value(lengthC ontext)); 363 writeNameValuePair(ts, "cx", element.cx()->currentValue()->value(lengthC ontext));
364 writeNameValuePair(ts, "cy", element.cy()->currentValue()->value(lengthC ontext)); 364 writeNameValuePair(ts, "cy", element.cy()->currentValue()->value(lengthC ontext));
365 writeNameValuePair(ts, "r", element.r()->currentValue()->value(lengthCon text)); 365 writeNameValuePair(ts, "r", element.r()->currentValue()->value(lengthCon text));
366 } else if (isSVGPolyElement(*svgElement)) { 366 } else if (isSVGPolyElement(*svgElement)) {
367 writeNameAndQuotedValue(ts, "points", toSVGPolyElement(*svgElement).poin ts()->currentValue()->valueAsString()); 367 writeNameAndQuotedValue(ts, "points", toSVGPolyElement(*svgElement).poin ts()->currentValue()->valueAsString());
368 } else if (isSVGPathElement(*svgElement)) { 368 } else if (isSVGPathElement(*svgElement)) {
369 String pathString;
370 // FIXME: We should switch to UnalteredParsing here - this will affect t he path dumping output of dozens of tests. 369 // FIXME: We should switch to UnalteredParsing here - this will affect t he path dumping output of dozens of tests.
371 buildStringFromByteStream(toSVGPathElement(*svgElement).pathByteStream() , pathString, NormalizedParsing); 370 String pathString = buildStringFromByteStream(toSVGPathElement(*svgEleme nt).pathByteStream(), NormalizedParsing);
372 writeNameAndQuotedValue(ts, "data", pathString); 371 writeNameAndQuotedValue(ts, "data", pathString);
373 } else { 372 } else {
374 ASSERT_NOT_REACHED(); 373 ASSERT_NOT_REACHED();
375 } 374 }
376 return ts; 375 return ts;
377 } 376 }
378 377
379 static TextStream& operator<<(TextStream& ts, const LayoutSVGRoot& root) 378 static TextStream& operator<<(TextStream& ts, const LayoutSVGRoot& root)
380 { 379 {
381 return writePositionAndStyle(ts, root); 380 return writePositionAndStyle(ts, root);
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
671 ts << " "; 670 ts << " ";
672 writeNameAndQuotedValue(ts, "filter", svgStyle.filterResource()); 671 writeNameAndQuotedValue(ts, "filter", svgStyle.filterResource());
673 ts << " "; 672 ts << " ";
674 writeStandardPrefix(ts, *filter, 0); 673 writeStandardPrefix(ts, *filter, 0);
675 ts << " " << filter->resourceBoundingBox(&layoutObject) << "\n"; 674 ts << " " << filter->resourceBoundingBox(&layoutObject) << "\n";
676 } 675 }
677 } 676 }
678 } 677 }
679 678
680 } // namespace blink 679 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/svg/SVGPath.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698