| 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 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 #include "core/svg/SVGTitleElement.h" | 22 #include "core/svg/SVGTitleElement.h" |
| 23 | 23 |
| 24 #include "core/SVGNames.h" | 24 #include "core/SVGNames.h" |
| 25 #include "core/dom/Document.h" | 25 #include "core/dom/Document.h" |
| 26 | 26 |
| 27 namespace blink { | 27 namespace blink { |
| 28 | 28 |
| 29 inline SVGTitleElement::SVGTitleElement(Document& document) | 29 inline SVGTitleElement::SVGTitleElement(Document& document) |
| 30 : SVGElement(SVGNames::titleTag, document) | 30 : SVGElement(SVGNames::titleTag, document) |
| 31 { | 31 { |
| 32 ScriptWrappable::init(this); | |
| 33 } | 32 } |
| 34 | 33 |
| 35 DEFINE_NODE_FACTORY(SVGTitleElement) | 34 DEFINE_NODE_FACTORY(SVGTitleElement) |
| 36 | 35 |
| 37 Node::InsertionNotificationRequest SVGTitleElement::insertedInto(ContainerNode*
rootParent) | 36 Node::InsertionNotificationRequest SVGTitleElement::insertedInto(ContainerNode*
rootParent) |
| 38 { | 37 { |
| 39 SVGElement::insertedInto(rootParent); | 38 SVGElement::insertedInto(rootParent); |
| 40 if (!rootParent->inDocument()) | 39 if (!rootParent->inDocument()) |
| 41 return InsertionDone; | 40 return InsertionDone; |
| 42 if (hasChildren() && document().isSVGDocument()) | 41 if (hasChildren() && document().isSVGDocument()) |
| 43 document().setTitleElement(this); | 42 document().setTitleElement(this); |
| 44 return InsertionDone; | 43 return InsertionDone; |
| 45 } | 44 } |
| 46 | 45 |
| 47 void SVGTitleElement::removedFrom(ContainerNode* rootParent) | 46 void SVGTitleElement::removedFrom(ContainerNode* rootParent) |
| 48 { | 47 { |
| 49 SVGElement::removedFrom(rootParent); | 48 SVGElement::removedFrom(rootParent); |
| 50 if (rootParent->inDocument() && document().isSVGDocument()) | 49 if (rootParent->inDocument() && document().isSVGDocument()) |
| 51 document().removeTitle(this); | 50 document().removeTitle(this); |
| 52 } | 51 } |
| 53 | 52 |
| 54 void SVGTitleElement::childrenChanged(const ChildrenChange& change) | 53 void SVGTitleElement::childrenChanged(const ChildrenChange& change) |
| 55 { | 54 { |
| 56 SVGElement::childrenChanged(change); | 55 SVGElement::childrenChanged(change); |
| 57 if (inDocument() && document().isSVGDocument()) | 56 if (inDocument() && document().isSVGDocument()) |
| 58 document().setTitleElement(this); | 57 document().setTitleElement(this); |
| 59 } | 58 } |
| 60 | 59 |
| 61 } | 60 } |
| OLD | NEW |