2 This file is part of the WebKit open source project.
3 This file has been generated by generate-bindings.pl. DO NOT MODIFY!
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
21 #ifndef JSCSSStyleDeclaration_h
22 #define JSCSSStyleDeclaration_h
24 #include "CSSStyleDeclaration.h"
25 #include "JSDOMBinding.h"
26 #include <runtime/JSGlobalObject.h>
27 #include <runtime/JSObject.h>
28 #include <runtime/ObjectPrototype.h>
32 class JSCSSStyleDeclaration : public JSDOMWrapper {
34 typedef JSDOMWrapper Base;
35 static JSCSSStyleDeclaration* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<CSSStyleDeclaration> impl)
37 JSCSSStyleDeclaration* ptr = new (JSC::allocateCell<JSCSSStyleDeclaration>(globalObject->globalData().heap)) JSCSSStyleDeclaration(structure, globalObject, impl);
38 ptr->finishCreation(globalObject->globalData());
42 static JSC::JSObject* createPrototype(JSC::ExecState*, JSC::JSGlobalObject*);
43 static bool getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertySlot&);
44 static bool getOwnPropertyDescriptor(JSC::JSObject*, JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertyDescriptor&);
45 static bool getOwnPropertySlotByIndex(JSC::JSCell*, JSC::ExecState*, unsigned propertyName, JSC::PropertySlot&);
46 static void put(JSC::JSCell*, JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&);
47 bool putDelegate(JSC::ExecState*, const JSC::Identifier&, JSC::JSValue, JSC::PutPropertySlot&);
48 static const JSC::ClassInfo s_info;
50 static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
52 return JSC::Structure::create(globalData, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info);
55 static void getOwnPropertyNames(JSC::JSObject*, JSC::ExecState*, JSC::PropertyNameArray&, JSC::EnumerationMode mode = JSC::ExcludeDontEnumProperties);
56 static JSC::JSValue getConstructor(JSC::ExecState*, JSC::JSGlobalObject*);
57 static void visitChildren(JSCell*, JSC::SlotVisitor&);
61 JSC::JSValue getPropertyCSSValue(JSC::ExecState*);
62 CSSStyleDeclaration* impl() const { return m_impl; }
63 void releaseImpl() { m_impl->deref(); m_impl = 0; }
66 CSSStyleDeclaration* m_impl;
68 JSCSSStyleDeclaration(JSC::Structure*, JSDOMGlobalObject*, PassRefPtr<CSSStyleDeclaration>);
69 void finishCreation(JSC::JSGlobalData&);
70 static const unsigned StructureFlags = JSC::OverridesGetPropertyNames | JSC::OverridesGetOwnPropertySlot | JSC::OverridesVisitChildren | Base::StructureFlags;
71 static JSC::JSValue indexGetter(JSC::ExecState*, JSC::JSValue, unsigned);
73 static bool canGetItemsForName(JSC::ExecState*, CSSStyleDeclaration*, const JSC::Identifier&);
74 static JSC::JSValue nameGetter(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
77 class JSCSSStyleDeclarationOwner : public JSC::WeakHandleOwner {
78 virtual bool isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown>, void* context, JSC::SlotVisitor&);
79 virtual void finalize(JSC::Handle<JSC::Unknown>, void* context);
82 inline JSC::WeakHandleOwner* wrapperOwner(DOMWrapperWorld*, CSSStyleDeclaration*)
84 DEFINE_STATIC_LOCAL(JSCSSStyleDeclarationOwner, jsCSSStyleDeclarationOwner, ());
85 return &jsCSSStyleDeclarationOwner;
88 inline void* wrapperContext(DOMWrapperWorld* world, CSSStyleDeclaration*)
93 JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, CSSStyleDeclaration*);
94 CSSStyleDeclaration* toCSSStyleDeclaration(JSC::JSValue);
96 class JSCSSStyleDeclarationPrototype : public JSC::JSNonFinalObject {
98 typedef JSC::JSNonFinalObject Base;
99 static JSC::JSObject* self(JSC::ExecState*, JSC::JSGlobalObject*);
100 static JSCSSStyleDeclarationPrototype* create(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
102 JSCSSStyleDeclarationPrototype* ptr = new (JSC::allocateCell<JSCSSStyleDeclarationPrototype>(globalData.heap)) JSCSSStyleDeclarationPrototype(globalData, globalObject, structure);
103 ptr->finishCreation(globalData);
107 static const JSC::ClassInfo s_info;
108 static bool getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
109 static bool getOwnPropertyDescriptor(JSC::JSObject*, JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
110 static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
112 return JSC::Structure::create(globalData, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info);
116 JSCSSStyleDeclarationPrototype(JSC::JSGlobalData& globalData, JSC::JSGlobalObject*, JSC::Structure* structure) : JSC::JSNonFinalObject(globalData, structure) { }
118 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::OverridesVisitChildren | Base::StructureFlags;
121 class JSCSSStyleDeclarationConstructor : public DOMConstructorObject {
123 JSCSSStyleDeclarationConstructor(JSC::Structure*, JSDOMGlobalObject*);
124 void finishCreation(JSC::ExecState*, JSDOMGlobalObject*);
127 typedef DOMConstructorObject Base;
128 static JSCSSStyleDeclarationConstructor* create(JSC::ExecState* exec, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
130 JSCSSStyleDeclarationConstructor* ptr = new (JSC::allocateCell<JSCSSStyleDeclarationConstructor>(*exec->heap())) JSCSSStyleDeclarationConstructor(structure, globalObject);
131 ptr->finishCreation(exec, globalObject);
135 static bool getOwnPropertySlot(JSC::JSCell*, JSC::ExecState*, const JSC::Identifier&, JSC::PropertySlot&);
136 static bool getOwnPropertyDescriptor(JSC::JSObject*, JSC::ExecState*, const JSC::Identifier&, JSC::PropertyDescriptor&);
137 static const JSC::ClassInfo s_info;
138 static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
140 return JSC::Structure::create(globalData, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), &s_info);
143 static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::ImplementsHasInstance | DOMConstructorObject::StructureFlags;
148 JSC::EncodedJSValue JSC_HOST_CALL jsCSSStyleDeclarationPrototypeFunctionGetPropertyValue(JSC::ExecState*);
149 JSC::EncodedJSValue JSC_HOST_CALL jsCSSStyleDeclarationPrototypeFunctionGetPropertyCSSValue(JSC::ExecState*);
150 JSC::EncodedJSValue JSC_HOST_CALL jsCSSStyleDeclarationPrototypeFunctionRemoveProperty(JSC::ExecState*);
151 JSC::EncodedJSValue JSC_HOST_CALL jsCSSStyleDeclarationPrototypeFunctionGetPropertyPriority(JSC::ExecState*);
152 JSC::EncodedJSValue JSC_HOST_CALL jsCSSStyleDeclarationPrototypeFunctionSetProperty(JSC::ExecState*);
153 JSC::EncodedJSValue JSC_HOST_CALL jsCSSStyleDeclarationPrototypeFunctionItem(JSC::ExecState*);
154 JSC::EncodedJSValue JSC_HOST_CALL jsCSSStyleDeclarationPrototypeFunctionGetPropertyShorthand(JSC::ExecState*);
155 JSC::EncodedJSValue JSC_HOST_CALL jsCSSStyleDeclarationPrototypeFunctionIsPropertyImplicit(JSC::ExecState*);
158 JSC::JSValue jsCSSStyleDeclarationCssText(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
159 void setJSCSSStyleDeclarationCssText(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
160 JSC::JSValue jsCSSStyleDeclarationLength(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
161 JSC::JSValue jsCSSStyleDeclarationParentRule(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
162 JSC::JSValue jsCSSStyleDeclarationConstructor(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
164 } // namespace WebCore