OLD | NEW |
1 /* | 1 /* |
2 Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org> | 2 Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org> |
3 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> | 3 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> |
4 Copyright (C) 2006 Apple Computer, Inc. | 4 Copyright (C) 2006 Apple Computer, Inc. |
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 28 matching lines...) Expand all Loading... |
39 SVGStyleElement::SVGStyleElement(const QualifiedName& tagName, Document* doc, bo
ol createdByParser) | 39 SVGStyleElement::SVGStyleElement(const QualifiedName& tagName, Document* doc, bo
ol createdByParser) |
40 : SVGElement(tagName, doc) | 40 : SVGElement(tagName, doc) |
41 , SVGLangSpace() | 41 , SVGLangSpace() |
42 , m_createdByParser(createdByParser) | 42 , m_createdByParser(createdByParser) |
43 { | 43 { |
44 } | 44 } |
45 | 45 |
46 const AtomicString& SVGStyleElement::type() const | 46 const AtomicString& SVGStyleElement::type() const |
47 { | 47 { |
48 DEFINE_STATIC_LOCAL(const AtomicString, defaultValue, ("text/css")); | 48 DEFINE_STATIC_LOCAL(const AtomicString, defaultValue, ("text/css")); |
49 const AtomicString& n = getAttribute(typeAttr); | 49 const AtomicString& n = getAttribute(SVGNames::typeAttr); |
50 return n.isNull() ? defaultValue : n; | 50 return n.isNull() ? defaultValue : n; |
51 } | 51 } |
52 | 52 |
53 void SVGStyleElement::setType(const AtomicString& type, ExceptionCode& ec) | 53 void SVGStyleElement::setType(const AtomicString& type, ExceptionCode& ec) |
54 { | 54 { |
55 setAttribute(typeAttr, type, ec); | 55 setAttribute(SVGNames::typeAttr, type, ec); |
56 } | 56 } |
57 | 57 |
58 const AtomicString& SVGStyleElement::media() const | 58 const AtomicString& SVGStyleElement::media() const |
59 { | 59 { |
60 DEFINE_STATIC_LOCAL(const AtomicString, defaultValue, ("all")); | 60 DEFINE_STATIC_LOCAL(const AtomicString, defaultValue, ("all")); |
61 const AtomicString& n = getAttribute(mediaAttr); | 61 const AtomicString& n = getAttribute(SVGNames::mediaAttr); |
62 return n.isNull() ? defaultValue : n; | 62 return n.isNull() ? defaultValue : n; |
63 } | 63 } |
64 | 64 |
65 void SVGStyleElement::setMedia(const AtomicString& media, ExceptionCode& ec) | 65 void SVGStyleElement::setMedia(const AtomicString& media, ExceptionCode& ec) |
66 { | 66 { |
67 setAttribute(mediaAttr, media, ec); | 67 setAttribute(SVGNames::mediaAttr, media, ec); |
68 } | 68 } |
69 | 69 |
70 String SVGStyleElement::title() const | 70 String SVGStyleElement::title() const |
71 { | 71 { |
72 return getAttribute(titleAttr); | 72 return getAttribute(SVGNames::titleAttr); |
73 } | 73 } |
74 | 74 |
75 void SVGStyleElement::setTitle(const AtomicString& title, ExceptionCode& ec) | 75 void SVGStyleElement::setTitle(const AtomicString& title, ExceptionCode& ec) |
76 { | 76 { |
77 setAttribute(titleAttr, title, ec); | 77 setAttribute(SVGNames::titleAttr, title, ec); |
78 } | 78 } |
79 | 79 |
80 void SVGStyleElement::parseMappedAttribute(MappedAttribute* attr) | 80 void SVGStyleElement::parseMappedAttribute(MappedAttribute* attr) |
81 { | 81 { |
82 if (attr->name() == titleAttr && m_sheet) | 82 if (attr->name() == SVGNames::titleAttr && m_sheet) |
83 m_sheet->setTitle(attr->value()); | 83 m_sheet->setTitle(attr->value()); |
84 else { | 84 else { |
85 if (SVGLangSpace::parseMappedAttribute(attr)) | 85 if (SVGLangSpace::parseMappedAttribute(attr)) |
86 return; | 86 return; |
87 SVGElement::parseMappedAttribute(attr); | 87 SVGElement::parseMappedAttribute(attr); |
88 } | 88 } |
89 } | 89 } |
90 | 90 |
91 void SVGStyleElement::finishParsingChildren() | 91 void SVGStyleElement::finishParsingChildren() |
92 { | 92 { |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 bool SVGStyleElement::sheetLoaded() | 125 bool SVGStyleElement::sheetLoaded() |
126 { | 126 { |
127 document()->removePendingSheet(); | 127 document()->removePendingSheet(); |
128 return true; | 128 return true; |
129 } | 129 } |
130 | 130 |
131 } | 131 } |
132 | 132 |
133 // vim:ts=4:noet | 133 // vim:ts=4:noet |
134 #endif // ENABLE(SVG) | 134 #endif // ENABLE(SVG) |
OLD | NEW |