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

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

Issue 678163002: Oilpan: move SVG property hierarchy to the heap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased upto r185213 Created 6 years, 1 month 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 | Annotate | Revision Log
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 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 282
283 SVGPaintDescription strokePaintDescription = RenderSVGResourcePaintServe r::requestPaintDescription(shape, shape.style(), ApplyToStrokeMode); 283 SVGPaintDescription strokePaintDescription = RenderSVGResourcePaintServe r::requestPaintDescription(shape, shape.style(), ApplyToStrokeMode);
284 if (strokePaintDescription.isValid) { 284 if (strokePaintDescription.isValid) {
285 TextStreamSeparator s(" "); 285 TextStreamSeparator s(" ");
286 ts << " [stroke={" << s; 286 ts << " [stroke={" << s;
287 writeSVGPaintingResource(ts, strokePaintDescription); 287 writeSVGPaintingResource(ts, strokePaintDescription);
288 288
289 SVGLengthContext lengthContext(shape.element()); 289 SVGLengthContext lengthContext(shape.element());
290 double dashOffset = svgStyle.strokeDashOffset()->value(lengthContext ); 290 double dashOffset = svgStyle.strokeDashOffset()->value(lengthContext );
291 double strokeWidth = svgStyle.strokeWidth()->value(lengthContext); 291 double strokeWidth = svgStyle.strokeWidth()->value(lengthContext);
292 RefPtr<SVGLengthList> dashes = svgStyle.strokeDashArray(); 292 RefPtrWillBeRawPtr<SVGLengthList> dashes = svgStyle.strokeDashArray( );
293 293
294 DashArray dashArray; 294 DashArray dashArray;
295 SVGLengthList::ConstIterator it = dashes->begin(); 295 SVGLengthList::ConstIterator it = dashes->begin();
296 SVGLengthList::ConstIterator itEnd = dashes->end(); 296 SVGLengthList::ConstIterator itEnd = dashes->end();
297 for (; it != itEnd; ++it) 297 for (; it != itEnd; ++it)
298 dashArray.append(it->value(lengthContext)); 298 dashArray.append(it->value(lengthContext));
299 299
300 writeIfNotDefault(ts, "opacity", svgStyle.strokeOpacity(), 1.0f); 300 writeIfNotDefault(ts, "opacity", svgStyle.strokeOpacity(), 1.0f);
301 writeIfNotDefault(ts, "stroke width", strokeWidth, 1.0); 301 writeIfNotDefault(ts, "stroke width", strokeWidth, 1.0);
302 writeIfNotDefault(ts, "miter limit", svgStyle.strokeMiterLimit(), 4. 0f); 302 writeIfNotDefault(ts, "miter limit", svgStyle.strokeMiterLimit(), 4. 0f);
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
506 writeNameValuePair(ts, "maskContentUnits", masker->maskContentUnits()); 506 writeNameValuePair(ts, "maskContentUnits", masker->maskContentUnits());
507 ts << "\n"; 507 ts << "\n";
508 } else if (resource->resourceType() == FilterResourceType) { 508 } else if (resource->resourceType() == FilterResourceType) {
509 RenderSVGResourceFilter* filter = toRenderSVGResourceFilter(resource); 509 RenderSVGResourceFilter* filter = toRenderSVGResourceFilter(resource);
510 writeNameValuePair(ts, "filterUnits", filter->filterUnits()); 510 writeNameValuePair(ts, "filterUnits", filter->filterUnits());
511 writeNameValuePair(ts, "primitiveUnits", filter->primitiveUnits()); 511 writeNameValuePair(ts, "primitiveUnits", filter->primitiveUnits());
512 ts << "\n"; 512 ts << "\n";
513 // Creating a placeholder filter which is passed to the builder. 513 // Creating a placeholder filter which is passed to the builder.
514 FloatRect dummyRect; 514 FloatRect dummyRect;
515 IntRect dummyIntRect; 515 IntRect dummyIntRect;
516 RefPtr<SVGFilter> dummyFilter = SVGFilter::create(dummyIntRect, dummyRec t, dummyRect, true); 516 RefPtrWillBeRawPtr<SVGFilter> dummyFilter = SVGFilter::create(dummyIntRe ct, dummyRect, dummyRect, true);
517 if (RefPtr<SVGFilterBuilder> builder = filter->buildPrimitives(dummyFilt er.get())) { 517 if (RefPtrWillBeRawPtr<SVGFilterBuilder> builder = filter->buildPrimitiv es(dummyFilter.get())) {
518 if (FilterEffect* lastEffect = builder->lastEffect()) 518 if (FilterEffect* lastEffect = builder->lastEffect())
519 lastEffect->externalRepresentation(ts, indent + 1); 519 lastEffect->externalRepresentation(ts, indent + 1);
520 } 520 }
521 } else if (resource->resourceType() == ClipperResourceType) { 521 } else if (resource->resourceType() == ClipperResourceType) {
522 writeNameValuePair(ts, "clipPathUnits", toRenderSVGResourceClipper(resou rce)->clipPathUnits()); 522 writeNameValuePair(ts, "clipPathUnits", toRenderSVGResourceClipper(resou rce)->clipPathUnits());
523 ts << "\n"; 523 ts << "\n";
524 } else if (resource->resourceType() == MarkerResourceType) { 524 } else if (resource->resourceType() == MarkerResourceType) {
525 RenderSVGResourceMarker* marker = toRenderSVGResourceMarker(resource); 525 RenderSVGResourceMarker* marker = toRenderSVGResourceMarker(resource);
526 writeNameValuePair(ts, "markerUnits", marker->markerUnits()); 526 writeNameValuePair(ts, "markerUnits", marker->markerUnits());
527 ts << " [ref at " << marker->referencePoint() << "]"; 527 ts << " [ref at " << marker->referencePoint() << "]";
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
674 ts << " "; 674 ts << " ";
675 writeNameAndQuotedValue(ts, "filter", svgStyle.filterResource()); 675 writeNameAndQuotedValue(ts, "filter", svgStyle.filterResource());
676 ts << " "; 676 ts << " ";
677 writeStandardPrefix(ts, *filter, 0); 677 writeStandardPrefix(ts, *filter, 0);
678 ts << " " << filter->resourceBoundingBox(&renderer) << "\n"; 678 ts << " " << filter->resourceBoundingBox(&renderer) << "\n";
679 } 679 }
680 } 680 }
681 } 681 }
682 682
683 } // namespace blink 683 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/rendering/svg/SVGRenderSupport.cpp ('k') | Source/core/rendering/svg/SVGRenderingContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698