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

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

Issue 23685007: Have SVGURIReference API deal with Document references, not pointers (Closed) Base URL: svn://svn.chromium.org/blink/trunk
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 | 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 620 matching lines...) Expand 10 before | Expand all | Expand 10 after
631 631
632 void writeResources(TextStream& ts, const RenderObject& object, int indent) 632 void writeResources(TextStream& ts, const RenderObject& object, int indent)
633 { 633 {
634 const RenderStyle* style = object.style(); 634 const RenderStyle* style = object.style();
635 const SVGRenderStyle* svgStyle = style->svgStyle(); 635 const SVGRenderStyle* svgStyle = style->svgStyle();
636 636
637 // FIXME: We want to use SVGResourcesCache to determine which resources are present, instead of quering the resource <-> id cache. 637 // FIXME: We want to use SVGResourcesCache to determine which resources are present, instead of quering the resource <-> id cache.
638 // For now leave the DRT output as is, but later on we should change this so cycles are properly ignored in the DRT output. 638 // For now leave the DRT output as is, but later on we should change this so cycles are properly ignored in the DRT output.
639 RenderObject& renderer = const_cast<RenderObject&>(object); 639 RenderObject& renderer = const_cast<RenderObject&>(object);
640 if (!svgStyle->maskerResource().isEmpty()) { 640 if (!svgStyle->maskerResource().isEmpty()) {
641 if (RenderSVGResourceMasker* masker = getRenderSVGResourceById<RenderSVG ResourceMasker>(&object.document(), svgStyle->maskerResource())) { 641 if (RenderSVGResourceMasker* masker = getRenderSVGResourceById<RenderSVG ResourceMasker>(object.document(), svgStyle->maskerResource())) {
642 writeIndent(ts, indent); 642 writeIndent(ts, indent);
643 ts << " "; 643 ts << " ";
644 writeNameAndQuotedValue(ts, "masker", svgStyle->maskerResource()); 644 writeNameAndQuotedValue(ts, "masker", svgStyle->maskerResource());
645 ts << " "; 645 ts << " ";
646 writeStandardPrefix(ts, *masker, 0); 646 writeStandardPrefix(ts, *masker, 0);
647 ts << " " << masker->resourceBoundingBox(&renderer) << "\n"; 647 ts << " " << masker->resourceBoundingBox(&renderer) << "\n";
648 } 648 }
649 } 649 }
650 if (!svgStyle->clipperResource().isEmpty()) { 650 if (!svgStyle->clipperResource().isEmpty()) {
651 if (RenderSVGResourceClipper* clipper = getRenderSVGResourceById<RenderS VGResourceClipper>(&object.document(), svgStyle->clipperResource())) { 651 if (RenderSVGResourceClipper* clipper = getRenderSVGResourceById<RenderS VGResourceClipper>(object.document(), svgStyle->clipperResource())) {
652 writeIndent(ts, indent); 652 writeIndent(ts, indent);
653 ts << " "; 653 ts << " ";
654 writeNameAndQuotedValue(ts, "clipPath", svgStyle->clipperResource()) ; 654 writeNameAndQuotedValue(ts, "clipPath", svgStyle->clipperResource()) ;
655 ts << " "; 655 ts << " ";
656 writeStandardPrefix(ts, *clipper, 0); 656 writeStandardPrefix(ts, *clipper, 0);
657 ts << " " << clipper->resourceBoundingBox(&renderer) << "\n"; 657 ts << " " << clipper->resourceBoundingBox(&renderer) << "\n";
658 } 658 }
659 } 659 }
660 if (!svgStyle->filterResource().isEmpty()) { 660 if (!svgStyle->filterResource().isEmpty()) {
661 if (RenderSVGResourceFilter* filter = getRenderSVGResourceById<RenderSVG ResourceFilter>(&object.document(), svgStyle->filterResource())) { 661 if (RenderSVGResourceFilter* filter = getRenderSVGResourceById<RenderSVG ResourceFilter>(object.document(), svgStyle->filterResource())) {
662 writeIndent(ts, indent); 662 writeIndent(ts, indent);
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/RenderSVGTextPath.cpp ('k') | Source/core/rendering/svg/SVGResources.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698