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

« back to all changes in this revision

Viewing changes to src/3rdparty/webkit/WebCore/generated/JSCSSFontFaceRule.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 "JSCSSFontFaceRule.h"
24
23
 
25
 
#include <wtf/GetPtr.h>
26
 
 
27
24
#include "CSSFontFaceRule.h"
28
25
#include "CSSMutableStyleDeclaration.h"
29
26
#include "CSSStyleDeclaration.h"
30
27
#include "JSCSSStyleDeclaration.h"
31
 
 
32
 
#include <runtime/JSNumberCell.h>
 
28
#include <wtf/GetPtr.h>
33
29
 
34
30
using namespace JSC;
35
31
 
36
32
namespace WebCore {
37
33
 
38
 
ASSERT_CLASS_FITS_IN_CELL(JSCSSFontFaceRule)
 
34
ASSERT_CLASS_FITS_IN_CELL(JSCSSFontFaceRule);
39
35
 
40
36
/* Hash table */
41
37
 
46
42
    { 0, 0, 0, 0 }
47
43
};
48
44
 
49
 
static const HashTable JSCSSFontFaceRuleTable =
 
45
static JSC_CONST_HASHTABLE HashTable JSCSSFontFaceRuleTable =
50
46
#if ENABLE(PERFECT_HASH_SIZE)
51
47
    { 1, JSCSSFontFaceRuleTableValues, 0 };
52
48
#else
60
56
    { 0, 0, 0, 0 }
61
57
};
62
58
 
63
 
static const HashTable JSCSSFontFaceRuleConstructorTable =
 
59
static JSC_CONST_HASHTABLE HashTable JSCSSFontFaceRuleConstructorTable =
64
60
#if ENABLE(PERFECT_HASH_SIZE)
65
61
    { 0, JSCSSFontFaceRuleConstructorTableValues, 0 };
66
62
#else
67
63
    { 1, 0, JSCSSFontFaceRuleConstructorTableValues, 0 };
68
64
#endif
69
65
 
70
 
class JSCSSFontFaceRuleConstructor : public DOMObject {
 
66
class JSCSSFontFaceRuleConstructor : public DOMConstructorObject {
71
67
public:
72
 
    JSCSSFontFaceRuleConstructor(ExecState* exec)
73
 
        : DOMObject(JSCSSFontFaceRuleConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype()))
 
68
    JSCSSFontFaceRuleConstructor(ExecState* exec, JSDOMGlobalObject* globalObject)
 
69
        : DOMConstructorObject(JSCSSFontFaceRuleConstructor::createStructure(globalObject->objectPrototype()), globalObject)
74
70
    {
75
 
        putDirect(exec->propertyNames().prototype, JSCSSFontFaceRulePrototype::self(exec, exec->lexicalGlobalObject()), None);
 
71
        putDirect(exec->propertyNames().prototype, JSCSSFontFaceRulePrototype::self(exec, globalObject), None);
76
72
    }
77
73
    virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&);
 
74
    virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&);
78
75
    virtual const ClassInfo* classInfo() const { return &s_info; }
79
76
    static const ClassInfo s_info;
80
77
 
81
 
    static PassRefPtr<Structure> createStructure(JSValuePtr proto) 
 
78
    static PassRefPtr<Structure> createStructure(JSValue proto) 
82
79
    { 
83
80
        return Structure::create(proto, TypeInfo(ObjectType, ImplementsHasInstance)); 
84
81
    }
91
88
    return getStaticValueSlot<JSCSSFontFaceRuleConstructor, DOMObject>(exec, &JSCSSFontFaceRuleConstructorTable, this, propertyName, slot);
92
89
}
93
90
 
 
91
bool JSCSSFontFaceRuleConstructor::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
 
92
{
 
93
    return getStaticValueDescriptor<JSCSSFontFaceRuleConstructor, DOMObject>(exec, &JSCSSFontFaceRuleConstructorTable, this, propertyName, descriptor);
 
94
}
 
95
 
94
96
/* Hash table for prototype */
95
97
 
96
98
static const HashTableValue JSCSSFontFaceRulePrototypeTableValues[1] =
98
100
    { 0, 0, 0, 0 }
99
101
};
100
102
 
101
 
static const HashTable JSCSSFontFaceRulePrototypeTable =
 
103
static JSC_CONST_HASHTABLE HashTable JSCSSFontFaceRulePrototypeTable =
102
104
#if ENABLE(PERFECT_HASH_SIZE)
103
105
    { 0, JSCSSFontFaceRulePrototypeTableValues, 0 };
104
106
#else
114
116
 
115
117
const ClassInfo JSCSSFontFaceRule::s_info = { "CSSFontFaceRule", &JSCSSRule::s_info, &JSCSSFontFaceRuleTable, 0 };
116
118
 
117
 
JSCSSFontFaceRule::JSCSSFontFaceRule(PassRefPtr<Structure> structure, PassRefPtr<CSSFontFaceRule> impl)
118
 
    : JSCSSRule(structure, impl)
 
119
JSCSSFontFaceRule::JSCSSFontFaceRule(NonNullPassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<CSSFontFaceRule> impl)
 
120
    : JSCSSRule(structure, globalObject, impl)
119
121
{
120
122
}
121
123
 
129
131
    return getStaticValueSlot<JSCSSFontFaceRule, Base>(exec, &JSCSSFontFaceRuleTable, this, propertyName, slot);
130
132
}
131
133
 
132
 
JSValuePtr jsCSSFontFaceRuleStyle(ExecState* exec, const Identifier&, const PropertySlot& slot)
133
 
{
134
 
    CSSFontFaceRule* imp = static_cast<CSSFontFaceRule*>(static_cast<JSCSSFontFaceRule*>(asObject(slot.slotBase()))->impl());
135
 
    return toJS(exec, WTF::getPtr(imp->style()));
136
 
}
137
 
 
138
 
JSValuePtr jsCSSFontFaceRuleConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot)
139
 
{
140
 
    return static_cast<JSCSSFontFaceRule*>(asObject(slot.slotBase()))->getConstructor(exec);
141
 
}
142
 
JSValuePtr JSCSSFontFaceRule::getConstructor(ExecState* exec)
143
 
{
144
 
    return getDOMConstructor<JSCSSFontFaceRuleConstructor>(exec);
 
134
bool JSCSSFontFaceRule::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
 
135
{
 
136
    return getStaticValueDescriptor<JSCSSFontFaceRule, Base>(exec, &JSCSSFontFaceRuleTable, this, propertyName, descriptor);
 
137
}
 
138
 
 
139
JSValue jsCSSFontFaceRuleStyle(ExecState* exec, const Identifier&, const PropertySlot& slot)
 
140
{
 
141
    JSCSSFontFaceRule* castedThis = static_cast<JSCSSFontFaceRule*>(asObject(slot.slotBase()));
 
142
    UNUSED_PARAM(exec);
 
143
    CSSFontFaceRule* imp = static_cast<CSSFontFaceRule*>(castedThis->impl());
 
144
    return toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->style()));
 
145
}
 
146
 
 
147
JSValue jsCSSFontFaceRuleConstructor(ExecState* exec, const Identifier&, const PropertySlot& slot)
 
148
{
 
149
    JSCSSFontFaceRule* domObject = static_cast<JSCSSFontFaceRule*>(asObject(slot.slotBase()));
 
150
    return JSCSSFontFaceRule::getConstructor(exec, domObject->globalObject());
 
151
}
 
152
JSValue JSCSSFontFaceRule::getConstructor(ExecState* exec, JSGlobalObject* globalObject)
 
153
{
 
154
    return getDOMConstructor<JSCSSFontFaceRuleConstructor>(exec, static_cast<JSDOMGlobalObject*>(globalObject));
145
155
}
146
156
 
147
157