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

« back to all changes in this revision

Viewing changes to src/3rdparty/webkit/WebCore/generated/JSHTMLAudioElement.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:
20
20
 
21
21
#include "config.h"
22
22
 
23
 
 
24
23
#if ENABLE(VIDEO)
25
24
 
26
25
#include "JSHTMLAudioElement.h"
27
26
 
 
27
#include "HTMLAudioElement.h"
28
28
#include <wtf/GetPtr.h>
29
29
 
30
 
#include "HTMLAudioElement.h"
31
 
 
32
 
#include <runtime/JSNumberCell.h>
33
 
 
34
30
using namespace JSC;
35
31
 
36
32
namespace WebCore {
37
33
 
38
 
ASSERT_CLASS_FITS_IN_CELL(JSHTMLAudioElement)
 
34
ASSERT_CLASS_FITS_IN_CELL(JSHTMLAudioElement);
39
35
 
40
36
/* Hash table */
41
37
 
45
41
    { 0, 0, 0, 0 }
46
42
};
47
43
 
48
 
static const HashTable JSHTMLAudioElementTable =
 
44
static JSC_CONST_HASHTABLE HashTable JSHTMLAudioElementTable =
49
45
#if ENABLE(PERFECT_HASH_SIZE)
50
46
    { 0, JSHTMLAudioElementTableValues, 0 };
51
47
#else
59
55
    { 0, 0, 0, 0 }
60
56
};
61
57
 
62
 
static const HashTable JSHTMLAudioElementConstructorTable =
 
58
static JSC_CONST_HASHTABLE HashTable JSHTMLAudioElementConstructorTable =
63
59
#if ENABLE(PERFECT_HASH_SIZE)
64
60
    { 0, JSHTMLAudioElementConstructorTableValues, 0 };
65
61
#else
66
62
    { 1, 0, JSHTMLAudioElementConstructorTableValues, 0 };
67
63
#endif
68
64
 
69
 
class JSHTMLAudioElementConstructor : public DOMObject {
 
65
class JSHTMLAudioElementConstructor : public DOMConstructorObject {
70
66
public:
71
 
    JSHTMLAudioElementConstructor(ExecState* exec)
72
 
        : DOMObject(JSHTMLAudioElementConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype()))
 
67
    JSHTMLAudioElementConstructor(ExecState* exec, JSDOMGlobalObject* globalObject)
 
68
        : DOMConstructorObject(JSHTMLAudioElementConstructor::createStructure(globalObject->objectPrototype()), globalObject)
73
69
    {
74
 
        putDirect(exec->propertyNames().prototype, JSHTMLAudioElementPrototype::self(exec, exec->lexicalGlobalObject()), None);
 
70
        putDirect(exec->propertyNames().prototype, JSHTMLAudioElementPrototype::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<JSHTMLAudioElementConstructor, DOMObject>(exec, &JSHTMLAudioElementConstructorTable, this, propertyName, slot);
91
88
}
92
89
 
 
90
bool JSHTMLAudioElementConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
 
91
{
 
92
    return getStaticValueDescriptor<JSHTMLAudioElementConstructor, DOMObject>(exec, &JSHTMLAudioElementConstructorTable, this, propertyName, descriptor);
 
93
}
 
94
 
93
95
/* Hash table for prototype */
94
96
 
95
97
static const HashTableValue JSHTMLAudioElementPrototypeTableValues[1] =
97
99
    { 0, 0, 0, 0 }
98
100
};
99
101
 
100
 
static const HashTable JSHTMLAudioElementPrototypeTable =
 
102
static JSC_CONST_HASHTABLE HashTable JSHTMLAudioElementPrototypeTable =
101
103
#if ENABLE(PERFECT_HASH_SIZE)
102
104
    { 0, JSHTMLAudioElementPrototypeTableValues, 0 };
103
105
#else
113
115
 
114
116
const ClassInfo JSHTMLAudioElement::s_info = { "HTMLAudioElement", &JSHTMLMediaElement::s_info, &JSHTMLAudioElementTable, 0 };
115
117
 
116
 
JSHTMLAudioElement::JSHTMLAudioElement(PassRefPtr<Structure> structure, PassRefPtr<HTMLAudioElement> impl)
117
 
    : JSHTMLMediaElement(structure, impl)
 
118
JSHTMLAudioElement::JSHTMLAudioElement(NonNullPassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<HTMLAudioElement> impl)
 
119
    : JSHTMLMediaElement(structure, globalObject, impl)
118
120
{
119
121
}
120
122
 
128
130
    return getStaticValueSlot<JSHTMLAudioElement, Base>(exec, &JSHTMLAudioElementTable, this, propertyName, slot);
129
131
}
130
132
 
131
 
JSValuePtr jsHTMLAudioElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot)
132
 
{
133
 
    return static_cast<JSHTMLAudioElement*>(asObject(slot.slotBase()))->getConstructor(exec);
134
 
}
135
 
JSValuePtr JSHTMLAudioElement::getConstructor(ExecState* exec)
136
 
{
137
 
    return getDOMConstructor<JSHTMLAudioElementConstructor>(exec);
 
133
bool JSHTMLAudioElement::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
 
134
{
 
135
    return getStaticValueDescriptor<JSHTMLAudioElement, Base>(exec, &JSHTMLAudioElementTable, this, propertyName, descriptor);
 
136
}
 
137
 
 
138
JSValue jsHTMLAudioElementConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot)
 
139
{
 
140
    JSHTMLAudioElement* domObject = static_cast<JSHTMLAudioElement*>(asObject(slot.slotBase()));
 
141
    return JSHTMLAudioElement::getConstructor(exec, domObject->globalObject());
 
142
}
 
143
JSValue JSHTMLAudioElement::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
 
144
{
 
145
    return getDOMConstructor<JSHTMLAudioElementConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));
138
146
}
139
147
 
140
148