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

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

Issue 539833004: [SVG2] Add support for marker orient="auto-start-reverse". (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: add dump-render-tree output + fix nit and test Created 6 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/SVGMarkerData.h ('k') | Source/core/svg/SVGAngle.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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 ts << SVGEnumerationToString<SVGUnitTypes::SVGUnitType>(unitType); 179 ts << SVGEnumerationToString<SVGUnitTypes::SVGUnitType>(unitType);
180 return ts; 180 return ts;
181 } 181 }
182 182
183 static TextStream& operator<<(TextStream& ts, const SVGMarkerUnitsType& markerUn it) 183 static TextStream& operator<<(TextStream& ts, const SVGMarkerUnitsType& markerUn it)
184 { 184 {
185 ts << SVGEnumerationToString<SVGMarkerUnitsType>(markerUnit); 185 ts << SVGEnumerationToString<SVGMarkerUnitsType>(markerUnit);
186 return ts; 186 return ts;
187 } 187 }
188 188
189 static TextStream& operator<<(TextStream& ts, const SVGMarkerOrientType& orientT ype)
190 {
191 ts << SVGEnumerationToString<SVGMarkerOrientType>(orientType);
192 return ts;
193 }
194
189 TextStream& operator<<(TextStream& ts, const Color& c) 195 TextStream& operator<<(TextStream& ts, const Color& c)
190 { 196 {
191 return ts << c.nameForRenderTreeAsText(); 197 return ts << c.nameForRenderTreeAsText();
192 } 198 }
193 199
194 // FIXME: Maybe this should be in KCanvasRenderingStyle.cpp 200 // FIXME: Maybe this should be in KCanvasRenderingStyle.cpp
195 static TextStream& operator<<(TextStream& ts, const DashArray& a) 201 static TextStream& operator<<(TextStream& ts, const DashArray& a)
196 { 202 {
197 ts << "{"; 203 ts << "{";
198 DashArray::const_iterator end = a.end(); 204 DashArray::const_iterator end = a.end();
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 } 525 }
520 } else if (resource->resourceType() == ClipperResourceType) { 526 } else if (resource->resourceType() == ClipperResourceType) {
521 writeNameValuePair(ts, "clipPathUnits", toRenderSVGResourceClipper(resou rce)->clipPathUnits()); 527 writeNameValuePair(ts, "clipPathUnits", toRenderSVGResourceClipper(resou rce)->clipPathUnits());
522 ts << "\n"; 528 ts << "\n";
523 } else if (resource->resourceType() == MarkerResourceType) { 529 } else if (resource->resourceType() == MarkerResourceType) {
524 RenderSVGResourceMarker* marker = toRenderSVGResourceMarker(resource); 530 RenderSVGResourceMarker* marker = toRenderSVGResourceMarker(resource);
525 writeNameValuePair(ts, "markerUnits", marker->markerUnits()); 531 writeNameValuePair(ts, "markerUnits", marker->markerUnits());
526 ts << " [ref at " << marker->referencePoint() << "]"; 532 ts << " [ref at " << marker->referencePoint() << "]";
527 ts << " [angle="; 533 ts << " [angle=";
528 if (marker->angle() == -1) 534 if (marker->angle() == -1)
529 ts << "auto" << "]\n"; 535 ts << marker->orientType() << "]\n";
530 else 536 else
531 ts << marker->angle() << "]\n"; 537 ts << marker->angle() << "]\n";
532 } else if (resource->resourceType() == PatternResourceType) { 538 } else if (resource->resourceType() == PatternResourceType) {
533 RenderSVGResourcePattern* pattern = static_cast<RenderSVGResourcePattern *>(resource); 539 RenderSVGResourcePattern* pattern = static_cast<RenderSVGResourcePattern *>(resource);
534 540
535 // Dump final results that are used for rendering. No use in asking SVGP atternElement for its patternUnits(), as it may 541 // Dump final results that are used for rendering. No use in asking SVGP atternElement for its patternUnits(), as it may
536 // link to other patterns using xlink:href, we need to build the full in heritance chain, aka. collectPatternProperties() 542 // link to other patterns using xlink:href, we need to build the full in heritance chain, aka. collectPatternProperties()
537 PatternAttributes attributes; 543 PatternAttributes attributes;
538 toSVGPatternElement(pattern->element())->collectPatternAttributes(attrib utes); 544 toSVGPatternElement(pattern->element())->collectPatternAttributes(attrib utes);
539 545
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
673 ts << " "; 679 ts << " ";
674 writeNameAndQuotedValue(ts, "filter", svgStyle.filterResource()); 680 writeNameAndQuotedValue(ts, "filter", svgStyle.filterResource());
675 ts << " "; 681 ts << " ";
676 writeStandardPrefix(ts, *filter, 0); 682 writeStandardPrefix(ts, *filter, 0);
677 ts << " " << filter->resourceBoundingBox(&renderer) << "\n"; 683 ts << " " << filter->resourceBoundingBox(&renderer) << "\n";
678 } 684 }
679 } 685 }
680 } 686 }
681 687
682 } // namespace blink 688 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/rendering/svg/SVGMarkerData.h ('k') | Source/core/svg/SVGAngle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698