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

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

Issue 23856009: Add toRenderSVGResourceClipper() 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/RenderSVGResourceClipper.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 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 writeNameValuePair(ts, "primitiveUnits", filter->primitiveUnits()); 500 writeNameValuePair(ts, "primitiveUnits", filter->primitiveUnits());
501 ts << "\n"; 501 ts << "\n";
502 // Creating a placeholder filter which is passed to the builder. 502 // Creating a placeholder filter which is passed to the builder.
503 FloatRect dummyRect; 503 FloatRect dummyRect;
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 writeNameValuePair(ts, "clipPathUnits", toRenderSVGResourceClipper(resou rce)->clipPathUnits());
511 writeNameValuePair(ts, "clipPathUnits", clipper->clipPathUnits());
512 ts << "\n"; 511 ts << "\n";
513 } else if (resource->resourceType() == MarkerResourceType) { 512 } else if (resource->resourceType() == MarkerResourceType) {
514 RenderSVGResourceMarker* marker = static_cast<RenderSVGResourceMarker*>( resource); 513 RenderSVGResourceMarker* marker = static_cast<RenderSVGResourceMarker*>( resource);
515 writeNameValuePair(ts, "markerUnits", marker->markerUnits()); 514 writeNameValuePair(ts, "markerUnits", marker->markerUnits());
516 ts << " [ref at " << marker->referencePoint() << "]"; 515 ts << " [ref at " << marker->referencePoint() << "]";
517 ts << " [angle="; 516 ts << " [angle=";
518 if (marker->angle() == -1) 517 if (marker->angle() == -1)
519 ts << "auto" << "]\n"; 518 ts << "auto" << "]\n";
520 else 519 else
521 ts << marker->angle() << "]\n"; 520 ts << marker->angle() << "]\n";
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
663 ts << " "; 662 ts << " ";
664 writeNameAndQuotedValue(ts, "filter", svgStyle->filterResource()); 663 writeNameAndQuotedValue(ts, "filter", svgStyle->filterResource());
665 ts << " "; 664 ts << " ";
666 writeStandardPrefix(ts, *filter, 0); 665 writeStandardPrefix(ts, *filter, 0);
667 ts << " " << filter->resourceBoundingBox(&renderer) << "\n"; 666 ts << " " << filter->resourceBoundingBox(&renderer) << "\n";
668 } 667 }
669 } 668 }
670 } 669 }
671 670
672 } // namespace WebCore 671 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/svg/RenderSVGResourceClipper.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698