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

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

Issue 19670014: Introduce toSVGPatternElement(), use it (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 5 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, 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 509 matching lines...) Expand 10 before | Expand all | Expand 10 after
520 if (marker->angle() == -1) 520 if (marker->angle() == -1)
521 ts << "auto" << "]\n"; 521 ts << "auto" << "]\n";
522 else 522 else
523 ts << marker->angle() << "]\n"; 523 ts << marker->angle() << "]\n";
524 } else if (resource->resourceType() == PatternResourceType) { 524 } else if (resource->resourceType() == PatternResourceType) {
525 RenderSVGResourcePattern* pattern = static_cast<RenderSVGResourcePattern *>(resource); 525 RenderSVGResourcePattern* pattern = static_cast<RenderSVGResourcePattern *>(resource);
526 526
527 // Dump final results that are used for rendering. No use in asking SVGP atternElement for its patternUnits(), as it may 527 // Dump final results that are used for rendering. No use in asking SVGP atternElement for its patternUnits(), as it may
528 // link to other patterns using xlink:href, we need to build the full in heritance chain, aka. collectPatternProperties() 528 // link to other patterns using xlink:href, we need to build the full in heritance chain, aka. collectPatternProperties()
529 PatternAttributes attributes; 529 PatternAttributes attributes;
530 static_cast<SVGPatternElement*>(pattern->node())->collectPatternAttribut es(attributes); 530 toSVGPatternElement(pattern->node())->collectPatternAttributes(attribute s);
531 531
532 writeNameValuePair(ts, "patternUnits", attributes.patternUnits()); 532 writeNameValuePair(ts, "patternUnits", attributes.patternUnits());
533 writeNameValuePair(ts, "patternContentUnits", attributes.patternContentU nits()); 533 writeNameValuePair(ts, "patternContentUnits", attributes.patternContentU nits());
534 534
535 AffineTransform transform = attributes.patternTransform(); 535 AffineTransform transform = attributes.patternTransform();
536 if (!transform.isIdentity()) 536 if (!transform.isIdentity())
537 ts << " [patternTransform=" << transform << "]"; 537 ts << " [patternTransform=" << transform << "]";
538 ts << "\n"; 538 ts << "\n";
539 } else if (resource->resourceType() == LinearGradientResourceType) { 539 } else if (resource->resourceType() == LinearGradientResourceType) {
540 RenderSVGResourceLinearGradient* gradient = static_cast<RenderSVGResourc eLinearGradient*>(resource); 540 RenderSVGResourceLinearGradient* gradient = static_cast<RenderSVGResourc eLinearGradient*>(resource);
(...skipping 128 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/RenderSVGResourcePattern.cpp ('k') | Source/core/rendering/svg/SVGResources.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698