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

« back to all changes in this revision

Viewing changes to src/3rdparty/webkit/WebCore/generated/JSHTMLHtmlElement.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 "JSHTMLHtmlElement.h"
24
23
 
25
 
#include <wtf/GetPtr.h>
26
 
 
27
24
#include "HTMLHtmlElement.h"
28
25
#include "KURL.h"
29
 
 
30
 
#include <runtime/JSNumberCell.h>
31
26
#include <runtime/JSString.h>
 
27
#include <wtf/GetPtr.h>
32
28
 
33
29
using namespace JSC;
34
30
 
35
31
namespace WebCore {
36
32
 
37
 
ASSERT_CLASS_FITS_IN_CELL(JSHTMLHtmlElement)
 
33
ASSERT_CLASS_FITS_IN_CELL(JSHTMLHtmlElement);
38
34
 
39
35
/* Hash table */
40
36
 
45
41
    { 0, 0, 0, 0 }
46
42
};
47
43
 
48
 
static const HashTable JSHTMLHtmlElementTable =
 
44
static JSC_CONST_HASHTABLE HashTable JSHTMLHtmlElementTable =
49
45
#if ENABLE(PERFECT_HASH_SIZE)
50
46
    { 3, JSHTMLHtmlElementTableValues, 0 };
51
47
#else
59
55
    { 0, 0, 0, 0 }
60
56
};
61
57
 
62
 
static const HashTable JSHTMLHtmlElementConstructorTable =
 
58
static JSC_CONST_HASHTABLE HashTable JSHTMLHtmlElementConstructorTable =
63
59
#if ENABLE(PERFECT_HASH_SIZE)
64
60
    { 0, JSHTMLHtmlElementConstructorTableValues, 0 };
65
61
#else
66
62
    { 1, 0, JSHTMLHtmlElementConstructorTableValues, 0 };
67
63
#endif
68
64
 
69
 
class JSHTMLHtmlElementConstructor : public DOMObject {
 
65
class JSHTMLHtmlElementConstructor : public DOMConstructorObject {
70
66
public:
71
 
    JSHTMLHtmlElementConstructor(ExecState* exec)
72
 
        : DOMObject(JSHTMLHtmlElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype()))
 
67
    JSHTMLHtmlElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject)
 
68
        : DOMConstructorObject(JSHTMLHtmlElementConstructor::createStructure(globalObject->objectPrototype()), globalObject)
73
69
    {
74
 
        putDirect(exec->propertyNames().prototype, JSHTMLHtmlElementPrototype::self(exec, exec->lexicalGlobalObject()), None);
 
70
        putDirect(exec->propertyNames().prototype, JSHTMLHtmlElementPrototype::self(exec, globalObject), None);
75
71
    }
76
72
    virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&);
 
73
    virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&);
77
74
    virtual const ClassInfo* classInfo() const { return &s_info; }
78
75
    static const ClassInfo s_info;
79
76
 
80
 
    static PassRefPtr<Structure> createStructure(JSValuePtr proto) 
 
77
    static PassRefPtr<Structure> createStructure(JSValue proto) 
81
78
    { 
82
79
        return Structure::create(proto, TypeInfo(ObjectType, ImplementsHasInstance)); 
83
80
    }
90
87
    return getStaticValueSlot<JSHTMLHtmlElementConstructor, DOMObject>(exec, &JSHTMLHtmlElementConstructorTable, this, propertyName, slot);
91
88
}
92
89
 
 
90
bool JSHTMLHtmlElementConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
 
91
{
 
92
    return getStaticValueDescriptor<JSHTMLHtmlElementConstructor, DOMObject>(exec, &JSHTMLHtmlElementConstructorTable, this, propertyName, descriptor);
 
93
}
 
94
 
93
95
/* Hash table for prototype */
94
96
 
95
97
static const HashTableValue JSHTMLHtmlElementPrototypeTableValues[1] =
97
99
    { 0, 0, 0, 0 }
98
100
};
99
101
 
100
 
static const HashTable JSHTMLHtmlElementPrototypeTable =
 
102
static JSC_CONST_HASHTABLE HashTable JSHTMLHtmlElementPrototypeTable =
101
103
#if ENABLE(PERFECT_HASH_SIZE)
102
104
    { 0, JSHTMLHtmlElementPrototypeTableValues, 0 };
103
105
#else
113
115
 
114
116
const ClassInfo JSHTMLHtmlElement::s_info = { "HTMLHtmlElement", &JSHTMLElement::s_info, &JSHTMLHtmlElementTable, 0 };
115
117
 
116
 
JSHTMLHtmlElement::JSHTMLHtmlElement(PassRefPtr<Structure> structure, PassRefPtr<HTMLHtmlElement> impl)
117
 
    : JSHTMLElement(structure, impl)
 
118
JSHTMLHtmlElement::JSHTMLHtmlElement(NonNullPassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLHtmlElement> impl)
 
119
    : JSHTMLElement(structure, globalObject, impl)
118
120
{
119
121
}
120
122
 
128
130
    return getStaticValueSlot<JSHTMLHtmlElement, Base>(exec, &JSHTMLHtmlElementTable, this, propertyName, slot);
129
131
}
130
132
 
131
 
JSValuePtr jsHTMLHtmlElementVersion(ExecState* exec, const Identifier&, const PropertySlot& slot)
132
 
{
133
 
    HTMLHtmlElement* imp = static_cast<HTMLHtmlElement*>(static_cast<JSHTMLHtmlElement*>(asObject(slot.slotBase()))->impl());
 
133
bool JSHTMLHtmlElement::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
 
134
{
 
135
    return getStaticValueDescriptor<JSHTMLHtmlElement, Base>(exec, &JSHTMLHtmlElementTable, this, propertyName, descriptor);
 
136
}
 
137
 
 
138
JSValue jsHTMLHtmlElementVersion(ExecState* exec, const Identifier&, const PropertySlot& slot)
 
139
{
 
140
    JSHTMLHtmlElement* castedThis = static_cast<JSHTMLHtmlElement*>(asObject(slot.slotBase()));
 
141
    UNUSED_PARAM(exec);
 
142
    HTMLHtmlElement* imp = static_cast<HTMLHtmlElement*>(castedThis->impl());
134
143
    return jsString(exec, imp->version());
135
144
}
136
145
 
137
 
JSValuePtr jsHTMLHtmlElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot)
 
146
JSValue jsHTMLHtmlElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot)
138
147
{
139
 
    return static_cast<JSHTMLHtmlElement*>(asObject(slot.slotBase()))->getConstructor(exec);
 
148
    JSHTMLHtmlElement* domObject = static_cast<JSHTMLHtmlElement*>(asObject(slot.slotBase()));
 
149
    return JSHTMLHtmlElement::getConstructor(exec, domObject->globalObject());
140
150
}
141
 
void JSHTMLHtmlElement::put(ExecState* exec, const Identifier& propertyName, JSValuePtr value, PutPropertySlot& slot)
 
151
void JSHTMLHtmlElement::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot)
142
152
{
143
153
    lookupPut<JSHTMLHtmlElement, Base>(exec, propertyName, value, &JSHTMLHtmlElementTable, this, slot);
144
154
}
145
155
 
146
 
void setJSHTMLHtmlElementVersion(ExecState* exec, JSObject* thisObject, JSValuePtr value)
 
156
void setJSHTMLHtmlElementVersion(ExecState* exec, JSObject* thisObject, JSValue value)
147
157
{
148
158
    HTMLHtmlElement* imp = static_cast<HTMLHtmlElement*>(static_cast<JSHTMLHtmlElement*>(thisObject)->impl());
149
159
    imp->setVersion(valueToStringWithNullCheck(exec, value));
150
160
}
151
161
 
152
 
JSValuePtr JSHTMLHtmlElement::getConstructor(ExecState* exec)
 
162
JSValue JSHTMLHtmlElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
153
163
{
154
 
    return getDOMConstructor<JSHTMLHtmlElementConstructor>(exec);
 
164
    return getDOMConstructor<JSHTMLHtmlElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));
155
165
}
156
166
 
157
167