~oif-team/ubuntu/natty/qt4-x11/xi2.1

« back to all changes in this revision

Viewing changes to src/3rdparty/webkit/WebCore/generated/JSHTMLBaseFontElement.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghersi
  • Date: 2009-11-02 18:30:08 UTC
  • mfrom: (1.2.2 upstream)
  • mto: (15.2.5 experimental)
  • mto: This revision was merged to the branch mainline in revision 88.
  • Revision ID: james.westby@ubuntu.com-20091102183008-b6a4gcs128mvfb3m
Tags: upstream-4.6.0~beta1
ImportĀ upstreamĀ versionĀ 4.6.0~beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
*/
20
20
 
21
21
#include "config.h"
22
 
 
23
22
#include "JSHTMLBaseFontElement.h"
24
23
 
25
 
#include <wtf/GetPtr.h>
26
 
 
27
24
#include "HTMLBaseFontElement.h"
 
25
#include "HTMLNames.h"
28
26
#include "KURL.h"
29
 
 
30
27
#include <runtime/JSNumberCell.h>
31
28
#include <runtime/JSString.h>
 
29
#include <wtf/GetPtr.h>
32
30
 
33
31
using namespace JSC;
34
32
 
35
33
namespace WebCore {
36
34
 
37
 
ASSERT_CLASS_FITS_IN_CELL(JSHTMLBaseFontElement)
 
35
ASSERT_CLASS_FITS_IN_CELL(JSHTMLBaseFontElement);
38
36
 
39
37
/* Hash table */
40
38
 
47
45
    { 0, 0, 0, 0 }
48
46
};
49
47
 
50
 
static const HashTable JSHTMLBaseFontElementTable =
 
48
static JSC_CONST_HASHTABLE HashTable JSHTMLBaseFontElementTable =
51
49
#if ENABLE(PERFECT_HASH_SIZE)
52
50
    { 15, JSHTMLBaseFontElementTableValues, 0 };
53
51
#else
61
59
    { 0, 0, 0, 0 }
62
60
};
63
61
 
64
 
static const HashTable JSHTMLBaseFontElementConstructorTable =
 
62
static JSC_CONST_HASHTABLE HashTable JSHTMLBaseFontElementConstructorTable =
65
63
#if ENABLE(PERFECT_HASH_SIZE)
66
64
    { 0, JSHTMLBaseFontElementConstructorTableValues, 0 };
67
65
#else
68
66
    { 1, 0, JSHTMLBaseFontElementConstructorTableValues, 0 };
69
67
#endif
70
68
 
71
 
class JSHTMLBaseFontElementConstructor : public DOMObject {
 
69
class JSHTMLBaseFontElementConstructor : public DOMConstructorObject {
72
70
public:
73
 
    JSHTMLBaseFontElementConstructor(ExecState* exec)
74
 
        : DOMObject(JSHTMLBaseFontElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype()))
 
71
    JSHTMLBaseFontElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject)
 
72
        : DOMConstructorObject(JSHTMLBaseFontElementConstructor::createStructure(globalObject->objectPrototype()), globalObject)
75
73
    {
76
 
        putDirect(exec->propertyNames().prototype, JSHTMLBaseFontElementPrototype::self(exec, exec->lexicalGlobalObject()), None);
 
74
        putDirect(exec->propertyNames().prototype, JSHTMLBaseFontElementPrototype::self(exec, globalObject), None);
77
75
    }
78
76
    virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&);
 
77
    virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&);
79
78
    virtual const ClassInfo* classInfo() const { return &s_info; }
80
79
    static const ClassInfo s_info;
81
80
 
82
 
    static PassRefPtr<Structure> createStructure(JSValuePtr proto) 
 
81
    static PassRefPtr<Structure> createStructure(JSValue proto) 
83
82
    { 
84
83
        return Structure::create(proto, TypeInfo(ObjectType, ImplementsHasInstance)); 
85
84
    }
92
91
    return getStaticValueSlot<JSHTMLBaseFontElementConstructor, DOMObject>(exec, &JSHTMLBaseFontElementConstructorTable, this, propertyName, slot);
93
92
}
94
93
 
 
94
bool JSHTMLBaseFontElementConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
 
95
{
 
96
    return getStaticValueDescriptor<JSHTMLBaseFontElementConstructor, DOMObject>(exec, &JSHTMLBaseFontElementConstructorTable, this, propertyName, descriptor);
 
97
}
 
98
 
95
99
/* Hash table for prototype */
96
100
 
97
101
static const HashTableValue JSHTMLBaseFontElementPrototypeTableValues[1] =
99
103
    { 0, 0, 0, 0 }
100
104
};
101
105
 
102
 
static const HashTable JSHTMLBaseFontElementPrototypeTable =
 
106
static JSC_CONST_HASHTABLE HashTable JSHTMLBaseFontElementPrototypeTable =
103
107
#if ENABLE(PERFECT_HASH_SIZE)
104
108
    { 0, JSHTMLBaseFontElementPrototypeTableValues, 0 };
105
109
#else
115
119
 
116
120
const ClassInfo JSHTMLBaseFontElement::s_info = { "HTMLBaseFontElement", &JSHTMLElement::s_info, &JSHTMLBaseFontElementTable, 0 };
117
121
 
118
 
JSHTMLBaseFontElement::JSHTMLBaseFontElement(PassRefPtr<Structure> structure, PassRefPtr<HTMLBaseFontElement> impl)
119
 
    : JSHTMLElement(structure, impl)
 
122
JSHTMLBaseFontElement::JSHTMLBaseFontElement(NonNullPassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLBaseFontElement> impl)
 
123
    : JSHTMLElement(structure, globalObject, impl)
120
124
{
121
125
}
122
126
 
130
134
    return getStaticValueSlot<JSHTMLBaseFontElement, Base>(exec, &JSHTMLBaseFontElementTable, this, propertyName, slot);
131
135
}
132
136
 
133
 
JSValuePtr jsHTMLBaseFontElementColor(ExecState* exec, const Identifier&, const PropertySlot& slot)
134
 
{
135
 
    HTMLBaseFontElement* imp = static_cast<HTMLBaseFontElement*>(static_cast<JSHTMLBaseFontElement*>(asObject(slot.slotBase()))->impl());
136
 
    return jsString(exec, imp->color());
137
 
}
138
 
 
139
 
JSValuePtr jsHTMLBaseFontElementFace(ExecState* exec, const Identifier&, const PropertySlot& slot)
140
 
{
141
 
    HTMLBaseFontElement* imp = static_cast<HTMLBaseFontElement*>(static_cast<JSHTMLBaseFontElement*>(asObject(slot.slotBase()))->impl());
142
 
    return jsString(exec, imp->face());
143
 
}
144
 
 
145
 
JSValuePtr jsHTMLBaseFontElementSize(ExecState* exec, const Identifier&, const PropertySlot& slot)
146
 
{
147
 
    HTMLBaseFontElement* imp = static_cast<HTMLBaseFontElement*>(static_cast<JSHTMLBaseFontElement*>(asObject(slot.slotBase()))->impl());
 
137
bool JSHTMLBaseFontElement::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
 
138
{
 
139
    return getStaticValueDescriptor<JSHTMLBaseFontElement, Base>(exec, &JSHTMLBaseFontElementTable, this, propertyName, descriptor);
 
140
}
 
141
 
 
142
JSValue jsHTMLBaseFontElementColor(ExecState* exec, const Identifier&, const PropertySlot& slot)
 
143
{
 
144
    JSHTMLBaseFontElement* castedThis = static_cast<JSHTMLBaseFontElement*>(asObject(slot.slotBase()));
 
145
    UNUSED_PARAM(exec);
 
146
    HTMLBaseFontElement* imp = static_cast<HTMLBaseFontElement*>(castedThis->impl());
 
147
    return jsString(exec, imp->getAttribute(HTMLNames::colorAttr));
 
148
}
 
149
 
 
150
JSValue jsHTMLBaseFontElementFace(ExecState* exec, const Identifier&, const PropertySlot& slot)
 
151
{
 
152
    JSHTMLBaseFontElement* castedThis = static_cast<JSHTMLBaseFontElement*>(asObject(slot.slotBase()));
 
153
    UNUSED_PARAM(exec);
 
154
    HTMLBaseFontElement* imp = static_cast<HTMLBaseFontElement*>(castedThis->impl());
 
155
    return jsString(exec, imp->getAttribute(HTMLNames::faceAttr));
 
156
}
 
157
 
 
158
JSValue jsHTMLBaseFontElementSize(ExecState* exec, const Identifier&, const PropertySlot& slot)
 
159
{
 
160
    JSHTMLBaseFontElement* castedThis = static_cast<JSHTMLBaseFontElement*>(asObject(slot.slotBase()));
 
161
    UNUSED_PARAM(exec);
 
162
    HTMLBaseFontElement* imp = static_cast<HTMLBaseFontElement*>(castedThis->impl());
148
163
    return jsNumber(exec, imp->size());
149
164
}
150
165
 
151
 
JSValuePtr jsHTMLBaseFontElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot)
 
166
JSValue jsHTMLBaseFontElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot)
152
167
{
153
 
    return static_cast<JSHTMLBaseFontElement*>(asObject(slot.slotBase()))->getConstructor(exec);
 
168
    JSHTMLBaseFontElement* domObject = static_cast<JSHTMLBaseFontElement*>(asObject(slot.slotBase()));
 
169
    return JSHTMLBaseFontElement::getConstructor(exec, domObject->globalObject());
154
170
}
155
 
void JSHTMLBaseFontElement::put(ExecState* exec, const Identifier& propertyName, JSValuePtr value, PutPropertySlot& slot)
 
171
void JSHTMLBaseFontElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot)
156
172
{
157
173
    lookupPut<JSHTMLBaseFontElement, Base>(exec, propertyName, value, &JSHTMLBaseFontElementTable, this, slot);
158
174
}
159
175
 
160
 
void setJSHTMLBaseFontElementColor(ExecState* exec, JSObject* thisObject, JSValuePtr value)
161
 
{
162
 
    HTMLBaseFontElement* imp = static_cast<HTMLBaseFontElement*>(static_cast<JSHTMLBaseFontElement*>(thisObject)->impl());
163
 
    imp->setColor(valueToStringWithNullCheck(exec, value));
164
 
}
165
 
 
166
 
void setJSHTMLBaseFontElementFace(ExecState* exec, JSObject* thisObject, JSValuePtr value)
167
 
{
168
 
    HTMLBaseFontElement* imp = static_cast<HTMLBaseFontElement*>(static_cast<JSHTMLBaseFontElement*>(thisObject)->impl());
169
 
    imp->setFace(valueToStringWithNullCheck(exec, value));
170
 
}
171
 
 
172
 
void setJSHTMLBaseFontElementSize(ExecState* exec, JSObject* thisObject, JSValuePtr value)
173
 
{
174
 
    HTMLBaseFontElement* imp = static_cast<HTMLBaseFontElement*>(static_cast<JSHTMLBaseFontElement*>(thisObject)->impl());
175
 
    imp->setSize(value->toInt32(exec));
176
 
}
177
 
 
178
 
JSValuePtr JSHTMLBaseFontElement::getConstructor(ExecState* exec)
179
 
{
180
 
    return getDOMConstructor<JSHTMLBaseFontElementConstructor>(exec);
 
176
void setJSHTMLBaseFontElementColor(ExecState* exec, JSObject* thisObject, JSValue value)
 
177
{
 
178
    HTMLBaseFontElement* imp = static_cast<HTMLBaseFontElement*>(static_cast<JSHTMLBaseFontElement*>(thisObject)->impl());
 
179
    imp->setAttribute(HTMLNames::colorAttr, valueToStringWithNullCheck(exec, value));
 
180
}
 
181
 
 
182
void setJSHTMLBaseFontElementFace(ExecState* exec, JSObject* thisObject, JSValue value)
 
183
{
 
184
    HTMLBaseFontElement* imp = static_cast<HTMLBaseFontElement*>(static_cast<JSHTMLBaseFontElement*>(thisObject)->impl());
 
185
    imp->setAttribute(HTMLNames::faceAttr, valueToStringWithNullCheck(exec, value));
 
186
}
 
187
 
 
188
void setJSHTMLBaseFontElementSize(ExecState* exec, JSObject* thisObject, JSValue value)
 
189
{
 
190
    HTMLBaseFontElement* imp = static_cast<HTMLBaseFontElement*>(static_cast<JSHTMLBaseFontElement*>(thisObject)->impl());
 
191
    imp->setSize(value.toInt32(exec));
 
192
}
 
193
 
 
194
JSValue JSHTMLBaseFontElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
 
195
{
 
196
    return getDOMConstructor<JSHTMLBaseFontElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));
181
197
}
182
198
 
183
199