|
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 "JSSVGPathSegLinetoVerticalAbs.h" |
|
32 |
|
33 #include <wtf/GetPtr.h> |
|
34 |
|
35 #include "SVGPathSegLinetoVertical.h" |
|
36 |
|
37 using namespace KJS; |
|
38 |
|
39 namespace WebCore { |
|
40 |
|
41 /* Hash table */ |
|
42 |
|
43 static const HashEntry JSSVGPathSegLinetoVerticalAbsTableEntries[] = |
|
44 { |
|
45 { "y", JSSVGPathSegLinetoVerticalAbs::YAttrNum, DontDelete, 0, 0 } |
|
46 }; |
|
47 |
|
48 static const HashTable JSSVGPathSegLinetoVerticalAbsTable = |
|
49 { |
|
50 2, 1, JSSVGPathSegLinetoVerticalAbsTableEntries, 1 |
|
51 }; |
|
52 |
|
53 /* Hash table for prototype */ |
|
54 |
|
55 static const HashEntry JSSVGPathSegLinetoVerticalAbsPrototypeTableEntries[] = |
|
56 { |
|
57 { 0, 0, 0, 0, 0 } |
|
58 }; |
|
59 |
|
60 static const HashTable JSSVGPathSegLinetoVerticalAbsPrototypeTable = |
|
61 { |
|
62 2, 1, JSSVGPathSegLinetoVerticalAbsPrototypeTableEntries, 1 |
|
63 }; |
|
64 |
|
65 const ClassInfo JSSVGPathSegLinetoVerticalAbsPrototype::info = { "SVGPathSegLinetoVerticalAbsPrototype", 0, &JSSVGPathSegLinetoVerticalAbsPrototypeTable, 0 }; |
|
66 |
|
67 JSObject* JSSVGPathSegLinetoVerticalAbsPrototype::self(ExecState* exec) |
|
68 { |
|
69 return KJS::cacheGlobalObject<JSSVGPathSegLinetoVerticalAbsPrototype>(exec, "[[JSSVGPathSegLinetoVerticalAbs.prototype]]"); |
|
70 } |
|
71 |
|
72 const ClassInfo JSSVGPathSegLinetoVerticalAbs::info = { "SVGPathSegLinetoVerticalAbs", &JSSVGPathSeg::info, &JSSVGPathSegLinetoVerticalAbsTable, 0 }; |
|
73 |
|
74 JSSVGPathSegLinetoVerticalAbs::JSSVGPathSegLinetoVerticalAbs(ExecState* exec, SVGPathSegLinetoVerticalAbs* impl) |
|
75 : JSSVGPathSeg(exec, impl) |
|
76 { |
|
77 setPrototype(JSSVGPathSegLinetoVerticalAbsPrototype::self(exec)); |
|
78 } |
|
79 |
|
80 bool JSSVGPathSegLinetoVerticalAbs::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) |
|
81 { |
|
82 return getStaticValueSlot<JSSVGPathSegLinetoVerticalAbs, JSSVGPathSeg>(exec, &JSSVGPathSegLinetoVerticalAbsTable, this, propertyName, slot); |
|
83 } |
|
84 |
|
85 JSValue* JSSVGPathSegLinetoVerticalAbs::getValueProperty(ExecState* exec, int token) const |
|
86 { |
|
87 switch (token) { |
|
88 case YAttrNum: { |
|
89 SVGPathSegLinetoVerticalAbs* imp = static_cast<SVGPathSegLinetoVerticalAbs*>(impl()); |
|
90 |
|
91 return jsNumber(imp->y()); |
|
92 } |
|
93 } |
|
94 return 0; |
|
95 } |
|
96 |
|
97 void JSSVGPathSegLinetoVerticalAbs::put(ExecState* exec, const Identifier& propertyName, JSValue* value, int attr) |
|
98 { |
|
99 lookupPut<JSSVGPathSegLinetoVerticalAbs, JSSVGPathSeg>(exec, propertyName, value, attr, &JSSVGPathSegLinetoVerticalAbsTable, this); |
|
100 } |
|
101 |
|
102 void JSSVGPathSegLinetoVerticalAbs::putValueProperty(ExecState* exec, int token, JSValue* value, int /*attr*/) |
|
103 { |
|
104 switch (token) { |
|
105 case YAttrNum: { |
|
106 SVGPathSegLinetoVerticalAbs* imp = static_cast<SVGPathSegLinetoVerticalAbs*>(impl()); |
|
107 |
|
108 imp->setY(value->toFloat(exec)); |
|
109 break; |
|
110 } |
|
111 } |
|
112 SVGPathSegLinetoVerticalAbs* imp = static_cast<SVGPathSegLinetoVerticalAbs*>(impl()); |
|
113 |
|
114 ASSERT(exec && exec->dynamicInterpreter()); |
|
115 Frame* activeFrame = static_cast<ScriptInterpreter*>(exec->dynamicInterpreter())->frame(); |
|
116 if (!activeFrame) |
|
117 return; |
|
118 |
|
119 SVGDocumentExtensions* extensions = (activeFrame->document() ? activeFrame->document()->accessSVGExtensions() : 0); |
|
120 if (extensions && extensions->hasGenericContext<SVGPathSeg>(imp)) { |
|
121 const SVGElement* context = extensions->genericContext<SVGPathSeg>(imp); |
|
122 ASSERT(context); |
|
123 |
|
124 context->notifyAttributeChange(); |
|
125 } |
|
126 |
|
127 } |
|
128 |
|
129 |
|
130 } |
|
131 |
|
132 #endif // ENABLE(SVG) |