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

Side by Side Diff: Source/core/svg/SVGTextPathElement.cpp

Issue 190793011: Use isSVG*Element() helpers more in SVG code (Part 4) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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
« no previous file with comments | « Source/core/svg/SVGTSpanElement.cpp ('k') | Source/core/svg/SVGTextPositioningElement.cpp » ('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) 2007 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2010 Rob Buis <rwlbuis@gmail.com> 3 * Copyright (C) 2010 Rob Buis <rwlbuis@gmail.com>
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 RenderSVGResource::markForLayoutAndParentResourceInvalidation(object); 132 RenderSVGResource::markForLayoutAndParentResourceInvalidation(object);
133 } 133 }
134 134
135 RenderObject* SVGTextPathElement::createRenderer(RenderStyle*) 135 RenderObject* SVGTextPathElement::createRenderer(RenderStyle*)
136 { 136 {
137 return new RenderSVGTextPath(this); 137 return new RenderSVGTextPath(this);
138 } 138 }
139 139
140 bool SVGTextPathElement::rendererIsNeeded(const RenderStyle& style) 140 bool SVGTextPathElement::rendererIsNeeded(const RenderStyle& style)
141 { 141 {
142 if (parentNode() 142 if (parentNode() && (isSVGAElement(*parentNode()) || isSVGTextElement(*paren tNode())))
143 && (parentNode()->hasTagName(SVGNames::aTag)
144 || parentNode()->hasTagName(SVGNames::textTag)))
145 return Element::rendererIsNeeded(style); 143 return Element::rendererIsNeeded(style);
146 144
147 return false; 145 return false;
148 } 146 }
149 147
150 void SVGTextPathElement::buildPendingResource() 148 void SVGTextPathElement::buildPendingResource()
151 { 149 {
152 clearResourceReferences(); 150 clearResourceReferences();
153 if (!inDocument()) 151 if (!inDocument())
154 return; 152 return;
(...skipping 30 matching lines...) Expand all
185 clearResourceReferences(); 183 clearResourceReferences();
186 } 184 }
187 185
188 bool SVGTextPathElement::selfHasRelativeLengths() const 186 bool SVGTextPathElement::selfHasRelativeLengths() const
189 { 187 {
190 return m_startOffset->currentValue()->isRelative() 188 return m_startOffset->currentValue()->isRelative()
191 || SVGTextContentElement::selfHasRelativeLengths(); 189 || SVGTextContentElement::selfHasRelativeLengths();
192 } 190 }
193 191
194 } 192 }
OLDNEW
« no previous file with comments | « Source/core/svg/SVGTSpanElement.cpp ('k') | Source/core/svg/SVGTextPositioningElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698