|
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 #include "JSHTMLBlockquoteElement.h" |
|
24 |
|
25 #include <wtf/GetPtr.h> |
|
26 |
|
27 #include "HTMLBlockquoteElement.h" |
|
28 #include "PlatformString.h" |
|
29 |
|
30 using namespace KJS; |
|
31 |
|
32 namespace WebCore { |
|
33 |
|
34 /* Hash table */ |
|
35 |
|
36 static const HashEntry JSHTMLBlockquoteElementTableEntries[] = |
|
37 { |
|
38 { 0, 0, 0, 0, 0 }, |
|
39 { "cite", JSHTMLBlockquoteElement::CiteAttrNum, DontDelete, 0, &JSHTMLBlockquoteElementTableEntries[2] }, |
|
40 { "constructor", JSHTMLBlockquoteElement::ConstructorAttrNum, DontDelete|DontEnum|ReadOnly, 0, 0 } |
|
41 }; |
|
42 |
|
43 static const HashTable JSHTMLBlockquoteElementTable = |
|
44 { |
|
45 2, 3, JSHTMLBlockquoteElementTableEntries, 2 |
|
46 }; |
|
47 |
|
48 /* Hash table for constructor */ |
|
49 |
|
50 static const HashEntry JSHTMLBlockquoteElementConstructorTableEntries[] = |
|
51 { |
|
52 { 0, 0, 0, 0, 0 } |
|
53 }; |
|
54 |
|
55 static const HashTable JSHTMLBlockquoteElementConstructorTable = |
|
56 { |
|
57 2, 1, JSHTMLBlockquoteElementConstructorTableEntries, 1 |
|
58 }; |
|
59 |
|
60 class JSHTMLBlockquoteElementConstructor : public DOMObject { |
|
61 public: |
|
62 JSHTMLBlockquoteElementConstructor(ExecState* exec) |
|
63 { |
|
64 setPrototype(exec->lexicalInterpreter()->builtinObjectPrototype()); |
|
65 putDirect(exec->propertyNames().prototype, JSHTMLBlockquoteElementPrototype::self(exec), None); |
|
66 } |
|
67 virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); |
|
68 JSValue* getValueProperty(ExecState*, int token) const; |
|
69 virtual const ClassInfo* classInfo() const { return &info; } |
|
70 static const ClassInfo info; |
|
71 |
|
72 virtual bool implementsHasInstance() const { return true; } |
|
73 }; |
|
74 |
|
75 const ClassInfo JSHTMLBlockquoteElementConstructor::info = { "HTMLBlockquoteElementConstructor", 0, &JSHTMLBlockquoteElementConstructorTable, 0 }; |
|
76 |
|
77 bool JSHTMLBlockquoteElementConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) |
|
78 { |
|
79 return getStaticValueSlot<JSHTMLBlockquoteElementConstructor, DOMObject>(exec, &JSHTMLBlockquoteElementConstructorTable, this, propertyName, slot); |
|
80 } |
|
81 |
|
82 JSValue* JSHTMLBlockquoteElementConstructor::getValueProperty(ExecState*, int token) const |
|
83 { |
|
84 // The token is the numeric value of its associated constant |
|
85 return jsNumber(token); |
|
86 } |
|
87 |
|
88 /* Hash table for prototype */ |
|
89 |
|
90 static const HashEntry JSHTMLBlockquoteElementPrototypeTableEntries[] = |
|
91 { |
|
92 { 0, 0, 0, 0, 0 } |
|
93 }; |
|
94 |
|
95 static const HashTable JSHTMLBlockquoteElementPrototypeTable = |
|
96 { |
|
97 2, 1, JSHTMLBlockquoteElementPrototypeTableEntries, 1 |
|
98 }; |
|
99 |
|
100 const ClassInfo JSHTMLBlockquoteElementPrototype::info = { "HTMLBlockquoteElementPrototype", 0, &JSHTMLBlockquoteElementPrototypeTable, 0 }; |
|
101 |
|
102 JSObject* JSHTMLBlockquoteElementPrototype::self(ExecState* exec) |
|
103 { |
|
104 return KJS::cacheGlobalObject<JSHTMLBlockquoteElementPrototype>(exec, "[[JSHTMLBlockquoteElement.prototype]]"); |
|
105 } |
|
106 |
|
107 const ClassInfo JSHTMLBlockquoteElement::info = { "HTMLBlockquoteElement", &JSHTMLElement::info, &JSHTMLBlockquoteElementTable, 0 }; |
|
108 |
|
109 JSHTMLBlockquoteElement::JSHTMLBlockquoteElement(ExecState* exec, HTMLBlockquoteElement* impl) |
|
110 : JSHTMLElement(exec, impl) |
|
111 { |
|
112 setPrototype(JSHTMLBlockquoteElementPrototype::self(exec)); |
|
113 } |
|
114 |
|
115 bool JSHTMLBlockquoteElement::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) |
|
116 { |
|
117 return getStaticValueSlot<JSHTMLBlockquoteElement, JSHTMLElement>(exec, &JSHTMLBlockquoteElementTable, this, propertyName, slot); |
|
118 } |
|
119 |
|
120 JSValue* JSHTMLBlockquoteElement::getValueProperty(ExecState* exec, int token) const |
|
121 { |
|
122 switch (token) { |
|
123 case CiteAttrNum: { |
|
124 HTMLBlockquoteElement* imp = static_cast<HTMLBlockquoteElement*>(impl()); |
|
125 |
|
126 return jsString(imp->cite()); |
|
127 } |
|
128 case ConstructorAttrNum: |
|
129 return getConstructor(exec); |
|
130 } |
|
131 return 0; |
|
132 } |
|
133 |
|
134 void JSHTMLBlockquoteElement::put(ExecState* exec, const Identifier& propertyName, JSValue* value, int attr) |
|
135 { |
|
136 lookupPut<JSHTMLBlockquoteElement, JSHTMLElement>(exec, propertyName, value, attr, &JSHTMLBlockquoteElementTable, this); |
|
137 } |
|
138 |
|
139 void JSHTMLBlockquoteElement::putValueProperty(ExecState* exec, int token, JSValue* value, int /*attr*/) |
|
140 { |
|
141 switch (token) { |
|
142 case CiteAttrNum: { |
|
143 HTMLBlockquoteElement* imp = static_cast<HTMLBlockquoteElement*>(impl()); |
|
144 |
|
145 imp->setCite(valueToStringWithNullCheck(exec, value)); |
|
146 break; |
|
147 } |
|
148 } |
|
149 } |
|
150 |
|
151 JSValue* JSHTMLBlockquoteElement::getConstructor(ExecState* exec) |
|
152 { |
|
153 return KJS::cacheGlobalObject<JSHTMLBlockquoteElementConstructor>(exec, "[[HTMLBlockquoteElement.constructor]]"); |
|
154 } |
|
155 |
|
156 } |