|
1 /* |
|
2 This file is part of the WebKit open source project. |
|
3 This file has been generated by generate-bindings.pl. DO NOT MODIFY! |
|
4 |
|
5 This library is free software; you can redistribute it and/or |
|
6 modify it under the terms of the GNU Library General Public |
|
7 License as published by the Free Software Foundation; either |
|
8 version 2 of the License, or (at your option) any later version. |
|
9 |
|
10 This library is distributed in the hope that it will be useful, |
|
11 but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
13 Library General Public License for more details. |
|
14 |
|
15 You should have received a copy of the GNU Library General Public License |
|
16 along with this library; see the file COPYING.LIB. If not, write to |
|
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
|
18 Boston, MA 02110-1301, USA. |
|
19 */ |
|
20 |
|
21 #include "config.h" |
|
22 |
|
23 |
|
24 #if ENABLE(SVG) |
|
25 |
|
26 #include "Document.h" |
|
27 #include "Frame.h" |
|
28 #include "SVGDocumentExtensions.h" |
|
29 #include "SVGElement.h" |
|
30 #include "SVGAnimatedTemplate.h" |
|
31 #include "JSSVGAnimatedTransformList.h" |
|
32 |
|
33 #include <wtf/GetPtr.h> |
|
34 |
|
35 #include "JSSVGTransformList.h" |
|
36 #include "SVGTransformList.h" |
|
37 |
|
38 using namespace KJS; |
|
39 |
|
40 namespace WebCore { |
|
41 |
|
42 /* Hash table */ |
|
43 |
|
44 static const HashEntry JSSVGAnimatedTransformListTableEntries[] = |
|
45 { |
|
46 { "baseVal", JSSVGAnimatedTransformList::BaseValAttrNum, DontDelete|ReadOnly, 0, 0 }, |
|
47 { "animVal", JSSVGAnimatedTransformList::AnimValAttrNum, DontDelete|ReadOnly, 0, 0 } |
|
48 }; |
|
49 |
|
50 static const HashTable JSSVGAnimatedTransformListTable = |
|
51 { |
|
52 2, 2, JSSVGAnimatedTransformListTableEntries, 2 |
|
53 }; |
|
54 |
|
55 /* Hash table for prototype */ |
|
56 |
|
57 static const HashEntry JSSVGAnimatedTransformListPrototypeTableEntries[] = |
|
58 { |
|
59 { 0, 0, 0, 0, 0 } |
|
60 }; |
|
61 |
|
62 static const HashTable JSSVGAnimatedTransformListPrototypeTable = |
|
63 { |
|
64 2, 1, JSSVGAnimatedTransformListPrototypeTableEntries, 1 |
|
65 }; |
|
66 |
|
67 const ClassInfo JSSVGAnimatedTransformListPrototype::info = { "SVGAnimatedTransformListPrototype", 0, &JSSVGAnimatedTransformListPrototypeTable, 0 }; |
|
68 |
|
69 JSObject* JSSVGAnimatedTransformListPrototype::self(ExecState* exec) |
|
70 { |
|
71 return KJS::cacheGlobalObject<JSSVGAnimatedTransformListPrototype>(exec, "[[JSSVGAnimatedTransformList.prototype]]"); |
|
72 } |
|
73 |
|
74 const ClassInfo JSSVGAnimatedTransformList::info = { "SVGAnimatedTransformList", 0, &JSSVGAnimatedTransformListTable, 0 }; |
|
75 |
|
76 JSSVGAnimatedTransformList::JSSVGAnimatedTransformList(ExecState* exec, SVGAnimatedTransformList* impl) |
|
77 : m_impl(impl) |
|
78 { |
|
79 setPrototype(JSSVGAnimatedTransformListPrototype::self(exec)); |
|
80 } |
|
81 |
|
82 JSSVGAnimatedTransformList::~JSSVGAnimatedTransformList() |
|
83 { |
|
84 SVGDocumentExtensions::forgetGenericContext<SVGAnimatedTransformList>(m_impl.get()); |
|
85 ScriptInterpreter::forgetDOMObject(m_impl.get()); |
|
86 } |
|
87 |
|
88 bool JSSVGAnimatedTransformList::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) |
|
89 { |
|
90 return getStaticValueSlot<JSSVGAnimatedTransformList, KJS::DOMObject>(exec, &JSSVGAnimatedTransformListTable, this, propertyName, slot); |
|
91 } |
|
92 |
|
93 JSValue* JSSVGAnimatedTransformList::getValueProperty(ExecState* exec, int token) const |
|
94 { |
|
95 switch (token) { |
|
96 case BaseValAttrNum: { |
|
97 SVGAnimatedTransformList* imp = static_cast<SVGAnimatedTransformList*>(impl()); |
|
98 |
|
99 return toJS(exec, WTF::getPtr(imp->baseVal())); |
|
100 } |
|
101 case AnimValAttrNum: { |
|
102 SVGAnimatedTransformList* imp = static_cast<SVGAnimatedTransformList*>(impl()); |
|
103 |
|
104 return toJS(exec, WTF::getPtr(imp->animVal())); |
|
105 } |
|
106 } |
|
107 return 0; |
|
108 } |
|
109 |
|
110 KJS::JSValue* toJS(KJS::ExecState* exec, SVGAnimatedTransformList* obj) |
|
111 { |
|
112 return KJS::cacheDOMObject<SVGAnimatedTransformList, JSSVGAnimatedTransformList>(exec, obj); |
|
113 } |
|
114 SVGAnimatedTransformList* toSVGAnimatedTransformList(KJS::JSValue* val) |
|
115 { |
|
116 return val->isObject(&JSSVGAnimatedTransformList::info) ? static_cast<JSSVGAnimatedTransformList*>(val)->impl() : 0; |
|
117 } |
|
118 |
|
119 } |
|
120 |
|
121 #endif // ENABLE(SVG) |