|
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 "JSCDATASection.h" |
|
24 |
|
25 #include <wtf/GetPtr.h> |
|
26 |
|
27 #include "CDATASection.h" |
|
28 |
|
29 using namespace KJS; |
|
30 |
|
31 namespace WebCore { |
|
32 |
|
33 /* Hash table */ |
|
34 |
|
35 static const HashEntry JSCDATASectionTableEntries[] = |
|
36 { |
|
37 { "constructor", JSCDATASection::ConstructorAttrNum, DontDelete|DontEnum|ReadOnly, 0, 0 } |
|
38 }; |
|
39 |
|
40 static const HashTable JSCDATASectionTable = |
|
41 { |
|
42 2, 1, JSCDATASectionTableEntries, 1 |
|
43 }; |
|
44 |
|
45 /* Hash table for constructor */ |
|
46 |
|
47 static const HashEntry JSCDATASectionConstructorTableEntries[] = |
|
48 { |
|
49 { 0, 0, 0, 0, 0 } |
|
50 }; |
|
51 |
|
52 static const HashTable JSCDATASectionConstructorTable = |
|
53 { |
|
54 2, 1, JSCDATASectionConstructorTableEntries, 1 |
|
55 }; |
|
56 |
|
57 class JSCDATASectionConstructor : public DOMObject { |
|
58 public: |
|
59 JSCDATASectionConstructor(ExecState* exec) |
|
60 { |
|
61 setPrototype(exec->lexicalInterpreter()->builtinObjectPrototype()); |
|
62 putDirect(exec->propertyNames().prototype, JSCDATASectionPrototype::self(exec), None); |
|
63 } |
|
64 virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); |
|
65 JSValue* getValueProperty(ExecState*, int token) const; |
|
66 virtual const ClassInfo* classInfo() const { return &info; } |
|
67 static const ClassInfo info; |
|
68 |
|
69 virtual bool implementsHasInstance() const { return true; } |
|
70 }; |
|
71 |
|
72 const ClassInfo JSCDATASectionConstructor::info = { "CDATASectionConstructor", 0, &JSCDATASectionConstructorTable, 0 }; |
|
73 |
|
74 bool JSCDATASectionConstructor::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) |
|
75 { |
|
76 return getStaticValueSlot<JSCDATASectionConstructor, DOMObject>(exec, &JSCDATASectionConstructorTable, this, propertyName, slot); |
|
77 } |
|
78 |
|
79 JSValue* JSCDATASectionConstructor::getValueProperty(ExecState*, int token) const |
|
80 { |
|
81 // The token is the numeric value of its associated constant |
|
82 return jsNumber(token); |
|
83 } |
|
84 |
|
85 /* Hash table for prototype */ |
|
86 |
|
87 static const HashEntry JSCDATASectionPrototypeTableEntries[] = |
|
88 { |
|
89 { 0, 0, 0, 0, 0 } |
|
90 }; |
|
91 |
|
92 static const HashTable JSCDATASectionPrototypeTable = |
|
93 { |
|
94 2, 1, JSCDATASectionPrototypeTableEntries, 1 |
|
95 }; |
|
96 |
|
97 const ClassInfo JSCDATASectionPrototype::info = { "CDATASectionPrototype", 0, &JSCDATASectionPrototypeTable, 0 }; |
|
98 |
|
99 JSObject* JSCDATASectionPrototype::self(ExecState* exec) |
|
100 { |
|
101 return KJS::cacheGlobalObject<JSCDATASectionPrototype>(exec, "[[JSCDATASection.prototype]]"); |
|
102 } |
|
103 |
|
104 const ClassInfo JSCDATASection::info = { "CDATASection", &JSText::info, &JSCDATASectionTable, 0 }; |
|
105 |
|
106 JSCDATASection::JSCDATASection(ExecState* exec, CDATASection* impl) |
|
107 : JSText(exec, impl) |
|
108 { |
|
109 setPrototype(JSCDATASectionPrototype::self(exec)); |
|
110 } |
|
111 |
|
112 bool JSCDATASection::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) |
|
113 { |
|
114 return getStaticValueSlot<JSCDATASection, JSText>(exec, &JSCDATASectionTable, this, propertyName, slot); |
|
115 } |
|
116 |
|
117 JSValue* JSCDATASection::getValueProperty(ExecState* exec, int token) const |
|
118 { |
|
119 switch (token) { |
|
120 case ConstructorAttrNum: |
|
121 return getConstructor(exec); |
|
122 } |
|
123 return 0; |
|
124 } |
|
125 |
|
126 JSValue* JSCDATASection::getConstructor(ExecState* exec) |
|
127 { |
|
128 return KJS::cacheGlobalObject<JSCDATASectionConstructor>(exec, "[[CDATASection.constructor]]"); |
|
129 } |
|
130 |
|
131 } |