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

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

Issue 889563002: Make RenderObject::style() return a const object (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix a crashers (everything is building!) Created 5 years, 10 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 615 matching lines...) Expand 10 before | Expand all | Expand 10 after
626 writeResources(ts, shape, indent); 626 writeResources(ts, shape, indent);
627 } 627 }
628 628
629 void writeSVGGradientStop(TextStream& ts, const RenderSVGGradientStop& stop, int indent) 629 void writeSVGGradientStop(TextStream& ts, const RenderSVGGradientStop& stop, int indent)
630 { 630 {
631 writeStandardPrefix(ts, stop, indent); 631 writeStandardPrefix(ts, stop, indent);
632 632
633 SVGStopElement* stopElement = toSVGStopElement(stop.node()); 633 SVGStopElement* stopElement = toSVGStopElement(stop.node());
634 ASSERT(stopElement); 634 ASSERT(stopElement);
635 635
636 RenderStyle* style = stop.style(); 636 const RenderStyle* style = stop.style();
637 if (!style) 637 if (!style)
638 return; 638 return;
639 639
640 ts << " [offset=" << stopElement->offset()->currentValue()->value() << "] [c olor=" << stopElement->stopColorIncludingOpacity() << "]\n"; 640 ts << " [offset=" << stopElement->offset()->currentValue()->value() << "] [c olor=" << stopElement->stopColorIncludingOpacity() << "]\n";
641 } 641 }
642 642
643 void writeResources(TextStream& ts, const RenderObject& object, int indent) 643 void writeResources(TextStream& ts, const RenderObject& object, int indent)
644 { 644 {
645 const RenderStyle* style = object.style(); 645 const RenderStyle* style = object.style();
646 const SVGRenderStyle& svgStyle = style->svgStyle(); 646 const SVGRenderStyle& svgStyle = style->svgStyle();
(...skipping 27 matching lines...) Expand all
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

Powered by Google App Engine
This is Rietveld 408576698