1 | /* |
2 | This file is part of the WebKit open source project. |
3 | This file has been generated by generate-bindings.pl. DO NOT MODIFY! |
4 | |
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. |
9 | |
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. |
14 | |
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. |
19 | */ |
20 | |
21 | #pragma once |
22 | |
23 | #include "CSSStyleDeclaration.h" |
24 | #include "JSDOMWrapper.h" |
25 | #include <wtf/NeverDestroyed.h> |
26 | |
27 | namespace WebCore { |
28 | |
29 | class WEBCORE_EXPORT JSCSSStyleDeclaration : public JSDOMWrapper<CSSStyleDeclaration> { |
30 | public: |
31 | using Base = JSDOMWrapper<CSSStyleDeclaration>; |
32 | static JSCSSStyleDeclaration* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, Ref<CSSStyleDeclaration>&& impl) |
33 | { |
34 | JSCSSStyleDeclaration* ptr = new (NotNull, JSC::allocateCell<JSCSSStyleDeclaration>(globalObject->vm().heap)) JSCSSStyleDeclaration(structure, *globalObject, WTFMove(impl)); |
35 | ptr->finishCreation(globalObject->vm()); |
36 | return ptr; |
37 | } |
38 | |
39 | static JSC::JSObject* createPrototype(JSC::VM&, JSDOMGlobalObject&); |
40 | static JSC::JSObject* prototype(JSC::VM&, JSDOMGlobalObject&); |
41 | static CSSStyleDeclaration* toWrapped(JSC::VM&, JSC::JSValue); |
42 | static bool getOwnPropertySlot(JSC::JSObject*, JSC::ExecState*, JSC::PropertyName, JSC::PropertySlot&); |
43 | static bool getOwnPropertySlotByIndex(JSC::JSObject*, JSC::ExecState*, unsigned propertyName, JSC::PropertySlot&); |
44 | static void getOwnPropertyNames(JSC::JSObject*, JSC::ExecState*, JSC::PropertyNameArray&, JSC::EnumerationMode = JSC::EnumerationMode()); |
45 | static bool put(JSC::JSCell*, JSC::ExecState*, JSC::PropertyName, JSC::JSValue, JSC::PutPropertySlot&); |
46 | static bool putByIndex(JSC::JSCell*, JSC::ExecState*, unsigned propertyName, JSC::JSValue, bool shouldThrow); |
47 | static void destroy(JSC::JSCell*); |
48 | |
49 | DECLARE_INFO; |
50 | |
51 | static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) |
52 | { |
53 | return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); |
54 | } |
55 | |
56 | static JSC::JSValue getConstructor(JSC::VM&, const JSC::JSGlobalObject*); |
57 | static void visitChildren(JSCell*, JSC::SlotVisitor&); |
58 | void visitAdditionalChildren(JSC::SlotVisitor&); |
59 | |
60 | static void visitOutputConstraints(JSCell*, JSC::SlotVisitor&); |
61 | template<typename, JSC::SubspaceAccess> static JSC::CompleteSubspace* subspaceFor(JSC::VM& vm) { return outputConstraintSubspaceFor(vm); } |
62 | static void heapSnapshot(JSCell*, JSC::HeapSnapshotBuilder&); |
63 | public: |
64 | static const unsigned StructureFlags = Base::StructureFlags | JSC::GetOwnPropertySlotIsImpureForPropertyAbsence | JSC::InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | JSC::OverridesGetOwnPropertySlot | JSC::OverridesGetPropertyNames; |
65 | protected: |
66 | JSCSSStyleDeclaration(JSC::Structure*, JSDOMGlobalObject&, Ref<CSSStyleDeclaration>&&); |
67 | |
68 | void finishCreation(JSC::VM&); |
69 | }; |
70 | |
71 | class JSCSSStyleDeclarationOwner : public JSC::WeakHandleOwner { |
72 | public: |
73 | virtual bool isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown>, void* context, JSC::SlotVisitor&, const char**); |
74 | virtual void finalize(JSC::Handle<JSC::Unknown>, void* context); |
75 | }; |
76 | |
77 | inline JSC::WeakHandleOwner* wrapperOwner(DOMWrapperWorld&, CSSStyleDeclaration*) |
78 | { |
79 | static NeverDestroyed<JSCSSStyleDeclarationOwner> owner; |
80 | return &owner.get(); |
81 | } |
82 | |
83 | inline void* wrapperKey(CSSStyleDeclaration* wrappableObject) |
84 | { |
85 | return wrappableObject; |
86 | } |
87 | |
88 | WEBCORE_EXPORT JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, CSSStyleDeclaration&); |
89 | inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, CSSStyleDeclaration* impl) { return impl ? toJS(state, globalObject, *impl) : JSC::jsNull(); } |
90 | JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, Ref<CSSStyleDeclaration>&&); |
91 | inline JSC::JSValue toJSNewlyCreated(JSC::ExecState* state, JSDOMGlobalObject* globalObject, RefPtr<CSSStyleDeclaration>&& impl) { return impl ? toJSNewlyCreated(state, globalObject, impl.releaseNonNull()) : JSC::jsNull(); } |
92 | |
93 | template<> struct JSDOMWrapperConverterTraits<CSSStyleDeclaration> { |
94 | using WrapperClass = JSCSSStyleDeclaration; |
95 | using ToWrappedReturnType = CSSStyleDeclaration*; |
96 | }; |
97 | |
98 | } // namespace WebCore |
99 | #include "JSCSSStyleDeclarationCustom.h" |
100 | |