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

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

Issue 130623002: Clean up static_cast<SVGFooElement*> by using toSVGFoo() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased Created 6 years, 11 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/svg/SVGAltGlyphDefElement.h ('k') | Source/core/svg/SVGAltGlyphElement.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) 2011 Leo Yang <leoyang@webkit.org> 2 * Copyright (C) 2011 Leo Yang <leoyang@webkit.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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 // those characters.". 102 // those characters.".
103 glyphNames.clear(); 103 glyphNames.clear();
104 return false; 104 return false;
105 } 105 }
106 } else if (!fountFirstGlyphRef && child->hasTagName(SVGNames::altGlyphIt emTag)) { 106 } else if (!fountFirstGlyphRef && child->hasTagName(SVGNames::altGlyphIt emTag)) {
107 foundFirstAltGlyphItem = true; 107 foundFirstAltGlyphItem = true;
108 Vector<AtomicString> referredGlyphNames; 108 Vector<AtomicString> referredGlyphNames;
109 109
110 // As the spec says "The first 'altGlyphItem' in which all reference d glyphs 110 // As the spec says "The first 'altGlyphItem' in which all reference d glyphs
111 // are available is chosen." 111 // are available is chosen."
112 if (static_cast<SVGAltGlyphItemElement*>(child)->hasValidGlyphElemen ts(glyphNames) && !glyphNames.isEmpty()) 112 if (toSVGAltGlyphItemElement(child)->hasValidGlyphElements(glyphName s) && !glyphNames.isEmpty())
113 return true; 113 return true;
114 } 114 }
115 } 115 }
116 return !glyphNames.isEmpty(); 116 return !glyphNames.isEmpty();
117 } 117 }
118 118
119 } 119 }
120 120
121 #endif 121 #endif
OLDNEW
« no previous file with comments | « Source/core/svg/SVGAltGlyphDefElement.h ('k') | Source/core/svg/SVGAltGlyphElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698