OLD | NEW |
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 14 matching lines...) Expand all Loading... |
25 #include "core/SVGNames.h" | 25 #include "core/SVGNames.h" |
26 #include "core/dom/ElementTraversal.h" | 26 #include "core/dom/ElementTraversal.h" |
27 #include "core/svg/SVGAltGlyphItemElement.h" | 27 #include "core/svg/SVGAltGlyphItemElement.h" |
28 #include "core/svg/SVGGlyphRefElement.h" | 28 #include "core/svg/SVGGlyphRefElement.h" |
29 | 29 |
30 namespace blink { | 30 namespace blink { |
31 | 31 |
32 inline SVGAltGlyphDefElement::SVGAltGlyphDefElement(Document& document) | 32 inline SVGAltGlyphDefElement::SVGAltGlyphDefElement(Document& document) |
33 : SVGElement(SVGNames::altGlyphDefTag, document) | 33 : SVGElement(SVGNames::altGlyphDefTag, document) |
34 { | 34 { |
35 ScriptWrappable::init(this); | |
36 } | 35 } |
37 | 36 |
38 DEFINE_NODE_FACTORY(SVGAltGlyphDefElement) | 37 DEFINE_NODE_FACTORY(SVGAltGlyphDefElement) |
39 | 38 |
40 bool SVGAltGlyphDefElement::hasValidGlyphElements(Vector<AtomicString>& glyphNam
es) const | 39 bool SVGAltGlyphDefElement::hasValidGlyphElements(Vector<AtomicString>& glyphNam
es) const |
41 { | 40 { |
42 // Spec: http://www.w3.org/TR/SVG/text.html#AltGlyphDefElement | 41 // Spec: http://www.w3.org/TR/SVG/text.html#AltGlyphDefElement |
43 // An 'altGlyphDef' can contain either of the following: | 42 // An 'altGlyphDef' can contain either of the following: |
44 // | 43 // |
45 // 1. In the simplest case, an 'altGlyphDef' contains one or more 'glyphRef'
elements. | 44 // 1. In the simplest case, an 'altGlyphDef' contains one or more 'glyphRef'
elements. |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 if (toSVGAltGlyphItemElement(child)->hasValidGlyphElements(glyphName
s) && !glyphNames.isEmpty()) | 109 if (toSVGAltGlyphItemElement(child)->hasValidGlyphElements(glyphName
s) && !glyphNames.isEmpty()) |
111 return true; | 110 return true; |
112 } | 111 } |
113 } | 112 } |
114 return !glyphNames.isEmpty(); | 113 return !glyphNames.isEmpty(); |
115 } | 114 } |
116 | 115 |
117 } | 116 } |
118 | 117 |
119 #endif | 118 #endif |
OLD | NEW |