| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005 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) Research In Motion Limited 2011. All rights reserved. | 4 * Copyright (C) Research In Motion Limited 2011. All rights reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 } | 139 } |
| 140 } | 140 } |
| 141 | 141 |
| 142 SVGTRefElement::~SVGTRefElement() | 142 SVGTRefElement::~SVGTRefElement() |
| 143 { | 143 { |
| 144 clearEventListener(); | 144 clearEventListener(); |
| 145 } | 145 } |
| 146 | 146 |
| 147 void SVGTRefElement::updateReferencedText() | 147 void SVGTRefElement::updateReferencedText() |
| 148 { | 148 { |
| 149 Element* target = SVGURIReference::targetElementFromIRIString(href(), docume
nt()); | |
| 150 ASSERT(target); | |
| 151 String textContent; | 149 String textContent; |
| 152 if (target->parentNode()) | 150 if (Element* target = SVGURIReference::targetElementFromIRIString(href(), do
cument())) |
| 153 textContent = target->textContent(); | 151 textContent = target->textContent(); |
| 154 ExceptionCode ignore = 0; | 152 ExceptionCode ignore = 0; |
| 155 if (!ensureShadowRoot()->firstChild()) | 153 if (!ensureShadowRoot()->firstChild()) |
| 156 shadowRoot()->appendChild(SVGShadowText::create(document(), textContent)
, ignore); | 154 shadowRoot()->appendChild(SVGShadowText::create(document(), textContent)
, ignore); |
| 157 else | 155 else |
| 158 shadowRoot()->firstChild()->setTextContent(textContent, ignore); | 156 shadowRoot()->firstChild()->setTextContent(textContent, ignore); |
| 159 } | 157 } |
| 160 | 158 |
| 161 bool SVGTRefElement::isSupportedAttribute(const QualifiedName& attrName) | 159 bool SVGTRefElement::isSupportedAttribute(const QualifiedName& attrName) |
| 162 { | 160 { |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 { | 266 { |
| 269 if (m_eventListener) { | 267 if (m_eventListener) { |
| 270 m_eventListener->clear(); | 268 m_eventListener->clear(); |
| 271 m_eventListener = 0; | 269 m_eventListener = 0; |
| 272 } | 270 } |
| 273 } | 271 } |
| 274 | 272 |
| 275 } | 273 } |
| 276 | 274 |
| 277 #endif // ENABLE(SVG) | 275 #endif // ENABLE(SVG) |
| OLD | NEW |