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

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

Issue 23819052: Add toRenderSVGResourceMarker() fuction, and use it. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 3 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/RenderSVGResourceMarker.h ('k') | no next file » | 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 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 RefPtr<SVGFilter> dummyFilter = SVGFilter::create(AffineTransform(), dum myRect, dummyRect, dummyRect, true); 504 RefPtr<SVGFilter> dummyFilter = SVGFilter::create(AffineTransform(), dum myRect, dummyRect, dummyRect, true);
505 if (RefPtr<SVGFilterBuilder> builder = filter->buildPrimitives(dummyFilt er.get())) { 505 if (RefPtr<SVGFilterBuilder> builder = filter->buildPrimitives(dummyFilt er.get())) {
506 if (FilterEffect* lastEffect = builder->lastEffect()) 506 if (FilterEffect* lastEffect = builder->lastEffect())
507 lastEffect->externalRepresentation(ts, indent + 1); 507 lastEffect->externalRepresentation(ts, indent + 1);
508 } 508 }
509 } else if (resource->resourceType() == ClipperResourceType) { 509 } else if (resource->resourceType() == ClipperResourceType) {
510 RenderSVGResourceClipper* clipper = static_cast<RenderSVGResourceClipper *>(resource); 510 RenderSVGResourceClipper* clipper = static_cast<RenderSVGResourceClipper *>(resource);
511 writeNameValuePair(ts, "clipPathUnits", clipper->clipPathUnits()); 511 writeNameValuePair(ts, "clipPathUnits", clipper->clipPathUnits());
512 ts << "\n"; 512 ts << "\n";
513 } else if (resource->resourceType() == MarkerResourceType) { 513 } else if (resource->resourceType() == MarkerResourceType) {
514 RenderSVGResourceMarker* marker = static_cast<RenderSVGResourceMarker*>( resource); 514 RenderSVGResourceMarker* marker = toRenderSVGResourceMarker(resource);
515 writeNameValuePair(ts, "markerUnits", marker->markerUnits()); 515 writeNameValuePair(ts, "markerUnits", marker->markerUnits());
516 ts << " [ref at " << marker->referencePoint() << "]"; 516 ts << " [ref at " << marker->referencePoint() << "]";
517 ts << " [angle="; 517 ts << " [angle=";
518 if (marker->angle() == -1) 518 if (marker->angle() == -1)
519 ts << "auto" << "]\n"; 519 ts << "auto" << "]\n";
520 else 520 else
521 ts << marker->angle() << "]\n"; 521 ts << marker->angle() << "]\n";
522 } else if (resource->resourceType() == PatternResourceType) { 522 } else if (resource->resourceType() == PatternResourceType) {
523 RenderSVGResourcePattern* pattern = static_cast<RenderSVGResourcePattern *>(resource); 523 RenderSVGResourcePattern* pattern = static_cast<RenderSVGResourcePattern *>(resource);
524 524
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
663 ts << " "; 663 ts << " ";
664 writeNameAndQuotedValue(ts, "filter", svgStyle->filterResource()); 664 writeNameAndQuotedValue(ts, "filter", svgStyle->filterResource());
665 ts << " "; 665 ts << " ";
666 writeStandardPrefix(ts, *filter, 0); 666 writeStandardPrefix(ts, *filter, 0);
667 ts << " " << filter->resourceBoundingBox(&renderer) << "\n"; 667 ts << " " << filter->resourceBoundingBox(&renderer) << "\n";
668 } 668 }
669 } 669 }
670 } 670 }
671 671
672 } // namespace WebCore 672 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/svg/RenderSVGResourceMarker.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698