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

Side by Side Diff: Source/core/rendering/svg/SVGResources.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
« no previous file with comments | « Source/core/rendering/svg/SVGRenderTreeAsText.cpp ('k') | Source/core/svg/SVGPatternElement.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) Research In Motion Limited 2010. All rights reserved. 2 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 s_tagList.add(SVGNames::radialGradientTag.localName()); 136 s_tagList.add(SVGNames::radialGradientTag.localName());
137 } 137 }
138 138
139 return s_tagList; 139 return s_tagList;
140 } 140 }
141 141
142 static inline String targetReferenceFromResource(SVGElement* element) 142 static inline String targetReferenceFromResource(SVGElement* element)
143 { 143 {
144 String target; 144 String target;
145 if (element->hasTagName(SVGNames::patternTag)) 145 if (element->hasTagName(SVGNames::patternTag))
146 target = static_cast<SVGPatternElement*>(element)->hrefCurrentValue(); 146 target = toSVGPatternElement(element)->hrefCurrentValue();
147 else if (element->hasTagName(SVGNames::linearGradientTag) || element->hasTag Name(SVGNames::radialGradientTag)) 147 else if (element->hasTagName(SVGNames::linearGradientTag) || element->hasTag Name(SVGNames::radialGradientTag))
148 target = toSVGGradientElement(element)->hrefCurrentValue(); 148 target = toSVGGradientElement(element)->hrefCurrentValue();
149 else if (element->hasTagName(SVGNames::filterTag)) 149 else if (element->hasTagName(SVGNames::filterTag))
150 target = toSVGFilterElement(element)->hrefCurrentValue(); 150 target = toSVGFilterElement(element)->hrefCurrentValue();
151 else 151 else
152 ASSERT_NOT_REACHED(); 152 ASSERT_NOT_REACHED();
153 153
154 return SVGURIReference::fragmentIdentifierFromIRIString(target, element->doc ument()); 154 return SVGURIReference::fragmentIdentifierFromIRIString(target, element->doc ument());
155 } 155 }
156 156
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after
656 if (RenderSVGResourceContainer* stroke = m_fillStrokeData->stroke) 656 if (RenderSVGResourceContainer* stroke = m_fillStrokeData->stroke)
657 fprintf(stderr, " |-> Stroke : %p (node=%p)\n", stroke, stroke-> node()); 657 fprintf(stderr, " |-> Stroke : %p (node=%p)\n", stroke, stroke-> node());
658 } 658 }
659 659
660 if (m_linkedResource) 660 if (m_linkedResource)
661 fprintf(stderr, " |-> xlink:href : %p (node=%p)\n", m_linkedResource, m_ linkedResource->node()); 661 fprintf(stderr, " |-> xlink:href : %p (node=%p)\n", m_linkedResource, m_ linkedResource->node());
662 } 662 }
663 #endif 663 #endif
664 664
665 } 665 }
OLDNEW
« no previous file with comments | « Source/core/rendering/svg/SVGRenderTreeAsText.cpp ('k') | Source/core/svg/SVGPatternElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698