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, 2007 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> |
4 * Copyright (C) 2006 Apple Inc. All rights reserved. | 4 * Copyright (C) 2006 Apple Inc. All rights reserved. |
5 * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> | 5 * Copyright (C) 2009 Cameron McCormack <cam@mcc.id.au> |
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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 } | 93 } |
94 | 94 |
95 void SVGStyleElement::setTitle(const AtomicString& title) | 95 void SVGStyleElement::setTitle(const AtomicString& title) |
96 { | 96 { |
97 setAttribute(SVGNames::titleAttr, title); | 97 setAttribute(SVGNames::titleAttr, title); |
98 } | 98 } |
99 | 99 |
100 void SVGStyleElement::parseAttribute(const QualifiedName& name, const AtomicStri
ng& oldValue, const AtomicString& value) | 100 void SVGStyleElement::parseAttribute(const QualifiedName& name, const AtomicStri
ng& oldValue, const AtomicString& value) |
101 { | 101 { |
102 if (name == SVGNames::titleAttr) { | 102 if (name == SVGNames::titleAttr) { |
103 if (m_sheet) | 103 if (m_sheet && isInDocumentTree()) |
104 m_sheet->setTitle(value); | 104 m_sheet->setTitle(value); |
105 | 105 |
106 return; | 106 return; |
107 } | 107 } |
108 | 108 |
109 SVGElement::parseAttribute(name, oldValue, value); | 109 SVGElement::parseAttribute(name, oldValue, value); |
110 } | 110 } |
111 | 111 |
112 void SVGStyleElement::finishParsingChildren() | 112 void SVGStyleElement::finishParsingChildren() |
113 { | 113 { |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 dispatchEvent(Event::create(EventTypeNames::error)); | 155 dispatchEvent(Event::create(EventTypeNames::error)); |
156 } | 156 } |
157 | 157 |
158 DEFINE_TRACE(SVGStyleElement) | 158 DEFINE_TRACE(SVGStyleElement) |
159 { | 159 { |
160 StyleElement::trace(visitor); | 160 StyleElement::trace(visitor); |
161 SVGElement::trace(visitor); | 161 SVGElement::trace(visitor); |
162 } | 162 } |
163 | 163 |
164 } // namespace blink | 164 } // namespace blink |
OLD | NEW |