| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> |
| 3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> |
| 4 * Copyright (C) 2008 Apple Inc. All rights reserved. | 4 * Copyright (C) 2008 Apple Inc. All rights reserved. |
| 5 * Copyright (C) 2011 Torch Mobile (Beijing) Co. Ltd. All rights reserved. | 5 * Copyright (C) 2011 Torch Mobile (Beijing) Co. Ltd. All rights reserved. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 void SVGAltGlyphElement::setFormat(const AtomicString&, ExceptionState& exceptio
nState) | 68 void SVGAltGlyphElement::setFormat(const AtomicString&, ExceptionState& exceptio
nState) |
| 69 { | 69 { |
| 70 exceptionState.throwDOMException(NoModificationAllowedError, ExceptionMessag
es::readOnly()); | 70 exceptionState.throwDOMException(NoModificationAllowedError, ExceptionMessag
es::readOnly()); |
| 71 } | 71 } |
| 72 | 72 |
| 73 const AtomicString& SVGAltGlyphElement::format() const | 73 const AtomicString& SVGAltGlyphElement::format() const |
| 74 { | 74 { |
| 75 return fastGetAttribute(SVGNames::formatAttr); | 75 return fastGetAttribute(SVGNames::formatAttr); |
| 76 } | 76 } |
| 77 | 77 |
| 78 bool SVGAltGlyphElement::childShouldCreateRenderer(const Node& child) const | |
| 79 { | |
| 80 if (child.isTextNode()) | |
| 81 return true; | |
| 82 return false; | |
| 83 } | |
| 84 | |
| 85 RenderObject* SVGAltGlyphElement::createRenderer(RenderStyle*) | 78 RenderObject* SVGAltGlyphElement::createRenderer(RenderStyle*) |
| 86 { | 79 { |
| 87 return new RenderSVGTSpan(this); | 80 return new RenderSVGTSpan(this); |
| 88 } | 81 } |
| 89 | 82 |
| 90 bool SVGAltGlyphElement::hasValidGlyphElements(Vector<AtomicString>& glyphNames)
const | 83 bool SVGAltGlyphElement::hasValidGlyphElements(Vector<AtomicString>& glyphNames)
const |
| 91 { | 84 { |
| 92 AtomicString target; | 85 AtomicString target; |
| 93 Element* element = targetElementFromIRIString(getAttribute(XLinkNames::hrefA
ttr), document(), &target); | 86 Element* element = targetElementFromIRIString(getAttribute(XLinkNames::hrefA
ttr), document(), &target); |
| 94 if (!element) | 87 if (!element) |
| 95 return false; | 88 return false; |
| 96 | 89 |
| 97 if (element->hasTagName(SVGNames::glyphTag)) { | 90 if (element->hasTagName(SVGNames::glyphTag)) { |
| 98 glyphNames.append(target); | 91 glyphNames.append(target); |
| 99 return true; | 92 return true; |
| 100 } | 93 } |
| 101 | 94 |
| 102 if (element->hasTagName(SVGNames::altGlyphDefTag) | 95 if (element->hasTagName(SVGNames::altGlyphDefTag) |
| 103 && toSVGAltGlyphDefElement(element)->hasValidGlyphElements(glyphNames)) | 96 && toSVGAltGlyphDefElement(element)->hasValidGlyphElements(glyphNames)) |
| 104 return true; | 97 return true; |
| 105 | 98 |
| 106 return false; | 99 return false; |
| 107 } | 100 } |
| 108 | 101 |
| 109 } | 102 } |
| 110 | 103 |
| 111 #endif | 104 #endif |
| OLD | NEW |