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

« back to all changes in this revision

Viewing changes to src/3rdparty/webkit/WebCore/generated/JSSVGAnimatedLengthList.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(SVG)
25
24
 
26
 
#include "SVGElement.h"
27
25
#include "JSSVGAnimatedLengthList.h"
28
26
 
29
 
#include <wtf/GetPtr.h>
30
 
 
31
27
#include "JSSVGLengthList.h"
32
28
#include "SVGLengthList.h"
33
 
 
 
29
#include <wtf/GetPtr.h>
34
30
 
35
31
using namespace JSC;
36
32
 
37
33
namespace WebCore {
38
34
 
39
 
ASSERT_CLASS_FITS_IN_CELL(JSSVGAnimatedLengthList)
 
35
ASSERT_CLASS_FITS_IN_CELL(JSSVGAnimatedLengthList);
40
36
 
41
37
/* Hash table */
42
38
 
47
43
    { 0, 0, 0, 0 }
48
44
};
49
45
 
50
 
static const HashTable JSSVGAnimatedLengthListTable =
 
46
static JSC_CONST_HASHTABLE HashTable JSSVGAnimatedLengthListTable =
51
47
#if ENABLE(PERFECT_HASH_SIZE)
52
48
    { 1, JSSVGAnimatedLengthListTableValues, 0 };
53
49
#else
61
57
    { 0, 0, 0, 0 }
62
58
};
63
59
 
64
 
static const HashTable JSSVGAnimatedLengthListPrototypeTable =
 
60
static JSC_CONST_HASHTABLE HashTable JSSVGAnimatedLengthListPrototypeTable =
65
61
#if ENABLE(PERFECT_HASH_SIZE)
66
62
    { 0, JSSVGAnimatedLengthListPrototypeTableValues, 0 };
67
63
#else
77
73
 
78
74
const ClassInfo JSSVGAnimatedLengthList::s_info = { "SVGAnimatedLengthList", 0, &JSSVGAnimatedLengthListTable, 0 };
79
75
 
80
 
JSSVGAnimatedLengthList::JSSVGAnimatedLengthList(PassRefPtr<Structure> structure, PassRefPtr<SVGAnimatedLengthList> impl, SVGElement* context)
81
 
    : DOMObject(structure)
82
 
    , m_context(context)
 
76
JSSVGAnimatedLengthList::JSSVGAnimatedLengthList(NonNullPassRefPtr<Structure> structure, JSDOMGlobalObject* globalObject, PassRefPtr<SVGAnimatedLengthList> impl, SVGElement* context)
 
77
    : DOMObjectWithSVGContext(structure, globalObject, context)
83
78
    , m_impl(impl)
84
79
{
85
80
}
86
81
 
87
82
JSSVGAnimatedLengthList::~JSSVGAnimatedLengthList()
88
83
{
89
 
    forgetDOMObject(*Heap::heap(this)->globalData(), m_impl.get());
90
 
 
 
84
    forgetDOMObject(*Heap::heap(this)->globalData(), impl());
91
85
}
92
86
 
93
87
JSObject* JSSVGAnimatedLengthList::createPrototype(ExecState* exec, JSGlobalObject* globalObject)
100
94
    return getStaticValueSlot<JSSVGAnimatedLengthList, Base>(exec, &JSSVGAnimatedLengthListTable, this, propertyName, slot);
101
95
}
102
96
 
103
 
JSValuePtr jsSVGAnimatedLengthListBaseVal(ExecState* exec, const Identifier&, const PropertySlot& slot)
104
 
{
105
 
    SVGAnimatedLengthList* imp = static_cast<SVGAnimatedLengthList*>(static_cast<JSSVGAnimatedLengthList*>(asObject(slot.slotBase()))->impl());
106
 
    return toJS(exec, WTF::getPtr(imp->baseVal()), static_cast<JSSVGAnimatedLengthList*>(asObject(slot.slotBase()))->context());
107
 
}
108
 
 
109
 
JSValuePtr jsSVGAnimatedLengthListAnimVal(ExecState* exec, const Identifier&, const PropertySlot& slot)
110
 
{
111
 
    SVGAnimatedLengthList* imp = static_cast<SVGAnimatedLengthList*>(static_cast<JSSVGAnimatedLengthList*>(asObject(slot.slotBase()))->impl());
112
 
    return toJS(exec, WTF::getPtr(imp->animVal()), static_cast<JSSVGAnimatedLengthList*>(asObject(slot.slotBase()))->context());
113
 
}
114
 
 
115
 
JSC::JSValuePtr toJS(JSC::ExecState* exec, SVGAnimatedLengthList* object, SVGElement* context)
116
 
{
117
 
    return getDOMObjectWrapper<JSSVGAnimatedLengthList>(exec, object, context);
118
 
}
119
 
SVGAnimatedLengthList* toSVGAnimatedLengthList(JSC::JSValuePtr value)
120
 
{
121
 
    return value->isObject(&JSSVGAnimatedLengthList::s_info) ? static_cast<JSSVGAnimatedLengthList*>(asObject(value))->impl() : 0;
 
97
bool JSSVGAnimatedLengthList::getOwnPropertyDescriptor(ExecState* exec, const Identifier& propertyName, PropertyDescriptor& descriptor)
 
98
{
 
99
    return getStaticValueDescriptor<JSSVGAnimatedLengthList, Base>(exec, &JSSVGAnimatedLengthListTable, this, propertyName, descriptor);
 
100
}
 
101
 
 
102
JSValue jsSVGAnimatedLengthListBaseVal(ExecState* exec, const Identifier&, const PropertySlot& slot)
 
103
{
 
104
    JSSVGAnimatedLengthList* castedThis = static_cast<JSSVGAnimatedLengthList*>(asObject(slot.slotBase()));
 
105
    UNUSED_PARAM(exec);
 
106
    SVGAnimatedLengthList* imp = static_cast<SVGAnimatedLengthList*>(castedThis->impl());
 
107
    return toJS(exec, deprecatedGlobalObjectForPrototype(exec), WTF::getPtr(imp->baseVal()), castedThis->context());
 
108
}
 
109
 
 
110
JSValue jsSVGAnimatedLengthListAnimVal(ExecState* exec, const Identifier&, const PropertySlot& slot)
 
111
{
 
112
    JSSVGAnimatedLengthList* castedThis = static_cast<JSSVGAnimatedLengthList*>(asObject(slot.slotBase()));
 
113
    UNUSED_PARAM(exec);
 
114
    SVGAnimatedLengthList* imp = static_cast<SVGAnimatedLengthList*>(castedThis->impl());
 
115
    return toJS(exec, deprecatedGlobalObjectForPrototype(exec), WTF::getPtr(imp->animVal()), castedThis->context());
 
116
}
 
117
 
 
118
JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, SVGAnimatedLengthList* object, SVGElement* context)
 
119
{
 
120
    return getDOMObjectWrapper<JSSVGAnimatedLengthList>(exec, globalObject, object, context);
 
121
}
 
122
SVGAnimatedLengthList* toSVGAnimatedLengthList(JSC::JSValue value)
 
123
{
 
124
    return value.inherits(&JSSVGAnimatedLengthList::s_info) ? static_cast<JSSVGAnimatedLengthList*>(asObject(value))->impl() : 0;
122
125
}
123
126
 
124
127
}