KHTML
SVGTitleElement.cpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #include "config.h"
00024 #include "wtf/Platform.h"
00025 #if ENABLE(SVG)
00026 #include "SVGTitleElement.h"
00027
00028 #include "Document.h"
00029
00030 namespace WebCore {
00031
00032 SVGTitleElement::SVGTitleElement(const QualifiedName& tagName, Document* doc)
00033 : SVGStyledElement(tagName, doc)
00034 {
00035 }
00036
00037 void SVGTitleElement::insertedIntoDocument()
00038 {
00039 SVGStyledElement::insertedIntoDocument();
00040 if (firstChild())
00041 document()->setTitle(textContent());
00042 }
00043
00044 void SVGTitleElement::removedFromDocument()
00045 {
00046 SVGElement::removedFromDocument();
00047
00048 }
00049
00050 void SVGTitleElement::childrenChanged(bool changedByParser, Node* beforeChange, Node* afterChange, int childCountDelta)
00051 {
00052 SVGElement::childrenChanged();
00053 if (inDocument())
00054 document()->setTitle(textContent());
00055 }
00056
00057 }
00058
00059
00060 #endif // ENABLE(SVG)