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

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

Issue 192133002: Use isSVG*Element() helpers more in SVG code (Part 1) (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/SVGFESpecularLightingElement.cpp ('k') | Source/core/svg/SVGFontElement.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) 2008 Nikolas Zimmermann <zimmermann@kde.org> 2 * Copyright (C) 2008 Nikolas Zimmermann <zimmermann@kde.org>
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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 Vector<AtomicString> altGlyphNames; 169 Vector<AtomicString> altGlyphNames;
170 170
171 if (renderObject) { 171 if (renderObject) {
172 RenderObject* parentRenderObject = renderObject->isText() ? renderObject ->parent() : renderObject; 172 RenderObject* parentRenderObject = renderObject->isText() ? renderObject ->parent() : renderObject;
173 ASSERT(parentRenderObject); 173 ASSERT(parentRenderObject);
174 174
175 isVerticalText = parentRenderObject->style()->svgStyle()->isVerticalWrit ingMode(); 175 isVerticalText = parentRenderObject->style()->svgStyle()->isVerticalWrit ingMode();
176 if (Element* parentRenderObjectElement = toElement(parentRenderObject->n ode())) { 176 if (Element* parentRenderObjectElement = toElement(parentRenderObject->n ode())) {
177 language = parentRenderObjectElement->getAttribute(XMLNames::langAtt r); 177 language = parentRenderObjectElement->getAttribute(XMLNames::langAtt r);
178 178
179 if (parentRenderObjectElement->hasTagName(SVGNames::altGlyphTag)) { 179 if (isSVGAltGlyphElement(*parentRenderObjectElement)) {
180 if (!toSVGAltGlyphElement(parentRenderObjectElement)->hasValidGl yphElements(altGlyphNames)) 180 if (!toSVGAltGlyphElement(*parentRenderObjectElement).hasValidGl yphElements(altGlyphNames))
181 altGlyphNames.clear(); 181 altGlyphNames.clear();
182 } 182 }
183 } 183 }
184 } 184 }
185 185
186 Vector<SVGGlyph> glyphs; 186 Vector<SVGGlyph> glyphs;
187 size_t altGlyphNamesSize = altGlyphNames.size(); 187 size_t altGlyphNamesSize = altGlyphNames.size();
188 if (altGlyphNamesSize) { 188 if (altGlyphNamesSize) {
189 for (size_t index = 0; index < altGlyphNamesSize; ++index) 189 for (size_t index = 0; index < altGlyphNamesSize; ++index)
190 associatedFontElement->collectGlyphsForAltGlyphReference(altGlyphNam es[index], glyphs); 190 associatedFontElement->collectGlyphsForAltGlyphReference(altGlyphNam es[index], glyphs);
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 mirroredCharacters.append(mirroredChar(character)); 310 mirroredCharacters.append(mirroredChar(character));
311 } 311 }
312 } 312 }
313 313
314 return mirroredCharacters.toString(); 314 return mirroredCharacters.toString();
315 } 315 }
316 316
317 } // namespace WebCore 317 } // namespace WebCore
318 318
319 #endif 319 #endif
OLDNEW
« no previous file with comments | « Source/core/svg/SVGFESpecularLightingElement.cpp ('k') | Source/core/svg/SVGFontElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698