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

Side by Side Diff: Source/core/rendering/svg/SVGRenderTreeAsText.cpp

Issue 23320003: Add toSVGCircleElement(), and use it (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 4 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
« no previous file with comments | « Source/core/rendering/svg/SVGPathData.cpp ('k') | Source/core/svg/SVGCircleElement.h » ('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 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 writeNameValuePair(ts, "y1", element->y1CurrentValue().value(lengthConte xt)); 342 writeNameValuePair(ts, "y1", element->y1CurrentValue().value(lengthConte xt));
343 writeNameValuePair(ts, "x2", element->x2CurrentValue().value(lengthConte xt)); 343 writeNameValuePair(ts, "x2", element->x2CurrentValue().value(lengthConte xt));
344 writeNameValuePair(ts, "y2", element->y2CurrentValue().value(lengthConte xt)); 344 writeNameValuePair(ts, "y2", element->y2CurrentValue().value(lengthConte xt));
345 } else if (svgElement->hasTagName(SVGNames::ellipseTag)) { 345 } else if (svgElement->hasTagName(SVGNames::ellipseTag)) {
346 SVGEllipseElement* element = static_cast<SVGEllipseElement*>(svgElement) ; 346 SVGEllipseElement* element = static_cast<SVGEllipseElement*>(svgElement) ;
347 writeNameValuePair(ts, "cx", element->cxCurrentValue().value(lengthConte xt)); 347 writeNameValuePair(ts, "cx", element->cxCurrentValue().value(lengthConte xt));
348 writeNameValuePair(ts, "cy", element->cyCurrentValue().value(lengthConte xt)); 348 writeNameValuePair(ts, "cy", element->cyCurrentValue().value(lengthConte xt));
349 writeNameValuePair(ts, "rx", element->rxCurrentValue().value(lengthConte xt)); 349 writeNameValuePair(ts, "rx", element->rxCurrentValue().value(lengthConte xt));
350 writeNameValuePair(ts, "ry", element->ryCurrentValue().value(lengthConte xt)); 350 writeNameValuePair(ts, "ry", element->ryCurrentValue().value(lengthConte xt));
351 } else if (svgElement->hasTagName(SVGNames::circleTag)) { 351 } else if (svgElement->hasTagName(SVGNames::circleTag)) {
352 SVGCircleElement* element = static_cast<SVGCircleElement*>(svgElement); 352 SVGCircleElement* element = toSVGCircleElement(svgElement);
353 writeNameValuePair(ts, "cx", element->cxCurrentValue().value(lengthConte xt)); 353 writeNameValuePair(ts, "cx", element->cxCurrentValue().value(lengthConte xt));
354 writeNameValuePair(ts, "cy", element->cyCurrentValue().value(lengthConte xt)); 354 writeNameValuePair(ts, "cy", element->cyCurrentValue().value(lengthConte xt));
355 writeNameValuePair(ts, "r", element->rCurrentValue().value(lengthContext )); 355 writeNameValuePair(ts, "r", element->rCurrentValue().value(lengthContext ));
356 } else if (svgElement->hasTagName(SVGNames::polygonTag) || svgElement->hasTa gName(SVGNames::polylineTag)) { 356 } else if (svgElement->hasTagName(SVGNames::polygonTag) || svgElement->hasTa gName(SVGNames::polylineTag)) {
357 SVGPolyElement* element = static_cast<SVGPolyElement*>(svgElement); 357 SVGPolyElement* element = static_cast<SVGPolyElement*>(svgElement);
358 writeNameAndQuotedValue(ts, "points", element->pointList().valueAsString ()); 358 writeNameAndQuotedValue(ts, "points", element->pointList().valueAsString ());
359 } else if (svgElement->hasTagName(SVGNames::pathTag)) { 359 } else if (svgElement->hasTagName(SVGNames::pathTag)) {
360 SVGPathElement* element = toSVGPathElement(svgElement); 360 SVGPathElement* element = toSVGPathElement(svgElement);
361 String pathString; 361 String pathString;
362 // FIXME: We should switch to UnalteredParsing here - this will affect t he path dumping output of dozens of tests. 362 // FIXME: We should switch to UnalteredParsing here - this will affect t he path dumping output of dozens of tests.
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
669 ts << " "; 669 ts << " ";
670 writeNameAndQuotedValue(ts, "filter", svgStyle->filterResource()); 670 writeNameAndQuotedValue(ts, "filter", svgStyle->filterResource());
671 ts << " "; 671 ts << " ";
672 writeStandardPrefix(ts, *filter, 0); 672 writeStandardPrefix(ts, *filter, 0);
673 ts << " " << filter->resourceBoundingBox(&renderer) << "\n"; 673 ts << " " << filter->resourceBoundingBox(&renderer) << "\n";
674 } 674 }
675 } 675 }
676 } 676 }
677 677
678 } // namespace WebCore 678 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/svg/SVGPathData.cpp ('k') | Source/core/svg/SVGCircleElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698