KHTML
SVGStyleElement.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
00024 #include "config.h"
00025 #include "wtf/Platform.h"
00026 #if ENABLE(SVG)
00027 #include "SVGStyleElement.h"
00028
00029
00030 #include "Document.h"
00031 #include "ExceptionCode.h"
00032
00033
00034
00035 namespace WebCore {
00036
00037
00038
00039 SVGStyleElement::SVGStyleElement(const QualifiedName& tagName, Document* doc)
00040 : SVGElement(tagName, doc)
00041 , m_createdByParser(false)
00042 {
00043 }
00044
00045 const AtomicString& SVGStyleElement::xmlspace() const
00046 {
00047 return "";
00048 }
00049
00050 void SVGStyleElement::setXmlspace(const AtomicString&, ExceptionCode& ec)
00051 {
00052 ec = DOMException::NO_MODIFICATION_ALLOWED_ERR;
00053 }
00054
00055 const AtomicString& SVGStyleElement::type() const
00056 {
00057 static const AtomicString defaultValue("text/css");
00058 const AtomicString& n = getAttribute(ATTR_TYPE);
00059 return n.isNull() ? defaultValue : n;
00060 }
00061
00062 void SVGStyleElement::setType(const AtomicString&, ExceptionCode& ec)
00063 {
00064 ec = DOMException::NO_MODIFICATION_ALLOWED_ERR;
00065 }
00066
00067 const AtomicString& SVGStyleElement::media() const
00068 {
00069 static const AtomicString defaultValue("all");
00070 const AtomicString& n = getAttribute(ATTR_MEDIA);
00071 return n.isNull() ? defaultValue : n;
00072 }
00073
00074 void SVGStyleElement::setMedia(const AtomicString&, ExceptionCode& ec)
00075 {
00076 ec = DOMException::NO_MODIFICATION_ALLOWED_ERR;
00077 }
00078
00079 String SVGStyleElement::title() const
00080 {
00081 return getAttribute(ATTR_TITLE);
00082 }
00083
00084 void SVGStyleElement::setTitle(const AtomicString&, ExceptionCode& ec)
00085 {
00086 ec = DOMException::NO_MODIFICATION_ALLOWED_ERR;
00087 }
00088
00089 void SVGStyleElement::parseMappedAttribute(MappedAttribute* attr)
00090 {
00091 kDebug() << "parse: " << attr->id() << attr->localName() << attr->value() << endl;
00092 if (attr->id() == ATTR_TITLE && m_sheet)
00093 ;
00094 else
00095 SVGElement::parseMappedAttribute(attr);
00096 }
00097
00098 void SVGStyleElement::finishParsingChildren()
00099 {
00100
00101 m_createdByParser = false;
00102 SVGElement::finishParsingChildren();
00103 }
00104
00105 void SVGStyleElement::insertedIntoDocument()
00106 {
00107 SVGElement::insertedIntoDocument();
00108
00109
00110
00111
00112 kDebug() << "not implemented" << endl;
00113 }
00114
00115 void SVGStyleElement::removedFromDocument()
00116 {
00117 SVGElement::removedFromDocument();
00118
00119
00120 kDebug() << "not implemented" << endl;
00121 }
00122
00123 void SVGStyleElement::childrenChanged(bool changedByParser, Node* beforeChange, Node* afterChange, int childCountDelta)
00124 {
00125
00126 SVGElement::childrenChanged();
00127
00128
00129 kDebug() << "not implemented" << endl;
00130 }
00131
00132 StyleSheet* SVGStyleElement::sheet()
00133 {
00134
00135 return m_sheet;
00136 }
00137
00138 bool SVGStyleElement::sheetLoaded()
00139 {
00140
00141 document()->styleSheetLoaded();
00142 return true;
00143 }
00144
00145
00146 quint32 SVGStyleElement::id() const
00147 {
00148 return SVGNames::styleTag.id();
00149 }
00150
00151 String SVGStyleElement::tagName() const
00152 {
00153 return SVGNames::styleTag.tagName();
00154 }
00155
00156 }
00157
00158
00159 #endif // ENABLE(SVG)