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#include "config.h"
22#include "JSDeprecatedCSSOMPrimitiveValue.h"
23
24#include "JSDOMAttribute.h"
25#include "JSDOMBinding.h"
26#include "JSDOMConstructorNotConstructable.h"
27#include "JSDOMConvertInterface.h"
28#include "JSDOMConvertNumbers.h"
29#include "JSDOMConvertStrings.h"
30#include "JSDOMExceptionHandling.h"
31#include "JSDOMGlobalObject.h"
32#include "JSDOMOperation.h"
33#include "JSDOMWrapperCache.h"
34#include "JSDeprecatedCSSOMCounter.h"
35#include "JSDeprecatedCSSOMRGBColor.h"
36#include "JSDeprecatedCSSOMRect.h"
37#include "ScriptExecutionContext.h"
38#include <JavaScriptCore/HeapSnapshotBuilder.h>
39#include <JavaScriptCore/JSCInlines.h>
40#include <wtf/GetPtr.h>
41#include <wtf/PointerPreparations.h>
42#include <wtf/URL.h>
43
44
45namespace WebCore {
46using namespace JSC;
47
48// Functions
49
50JSC::EncodedJSValue JSC_HOST_CALL jsDeprecatedCSSOMPrimitiveValuePrototypeFunctionSetFloatValue(JSC::ExecState*);
51JSC::EncodedJSValue JSC_HOST_CALL jsDeprecatedCSSOMPrimitiveValuePrototypeFunctionGetFloatValue(JSC::ExecState*);
52JSC::EncodedJSValue JSC_HOST_CALL jsDeprecatedCSSOMPrimitiveValuePrototypeFunctionSetStringValue(JSC::ExecState*);
53JSC::EncodedJSValue JSC_HOST_CALL jsDeprecatedCSSOMPrimitiveValuePrototypeFunctionGetStringValue(JSC::ExecState*);
54JSC::EncodedJSValue JSC_HOST_CALL jsDeprecatedCSSOMPrimitiveValuePrototypeFunctionGetCounterValue(JSC::ExecState*);
55JSC::EncodedJSValue JSC_HOST_CALL jsDeprecatedCSSOMPrimitiveValuePrototypeFunctionGetRectValue(JSC::ExecState*);
56JSC::EncodedJSValue JSC_HOST_CALL jsDeprecatedCSSOMPrimitiveValuePrototypeFunctionGetRGBColorValue(JSC::ExecState*);
57
58// Attributes
59
60JSC::EncodedJSValue jsDeprecatedCSSOMPrimitiveValueConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
61bool setJSDeprecatedCSSOMPrimitiveValueConstructor(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
62JSC::EncodedJSValue jsDeprecatedCSSOMPrimitiveValuePrimitiveType(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
63
64class JSDeprecatedCSSOMPrimitiveValuePrototype : public JSC::JSNonFinalObject {
65public:
66 using Base = JSC::JSNonFinalObject;
67 static JSDeprecatedCSSOMPrimitiveValuePrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure)
68 {
69 JSDeprecatedCSSOMPrimitiveValuePrototype* ptr = new (NotNull, JSC::allocateCell<JSDeprecatedCSSOMPrimitiveValuePrototype>(vm.heap)) JSDeprecatedCSSOMPrimitiveValuePrototype(vm, globalObject, structure);
70 ptr->finishCreation(vm);
71 return ptr;
72 }
73
74 DECLARE_INFO;
75 static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
76 {
77 return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
78 }
79
80private:
81 JSDeprecatedCSSOMPrimitiveValuePrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure)
82 : JSC::JSNonFinalObject(vm, structure)
83 {
84 }
85
86 void finishCreation(JSC::VM&);
87};
88
89using JSDeprecatedCSSOMPrimitiveValueConstructor = JSDOMConstructorNotConstructable<JSDeprecatedCSSOMPrimitiveValue>;
90
91/* Hash table for constructor */
92
93static const HashTableValue JSDeprecatedCSSOMPrimitiveValueConstructorTableValues[] =
94{
95 { "CSS_UNKNOWN", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(0) } },
96 { "CSS_NUMBER", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(1) } },
97 { "CSS_PERCENTAGE", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(2) } },
98 { "CSS_EMS", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(3) } },
99 { "CSS_EXS", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(4) } },
100 { "CSS_PX", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(5) } },
101 { "CSS_CM", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(6) } },
102 { "CSS_MM", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(7) } },
103 { "CSS_IN", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(8) } },
104 { "CSS_PT", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(9) } },
105 { "CSS_PC", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(10) } },
106 { "CSS_DEG", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(11) } },
107 { "CSS_RAD", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(12) } },
108 { "CSS_GRAD", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(13) } },
109 { "CSS_MS", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(14) } },
110 { "CSS_S", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(15) } },
111 { "CSS_HZ", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(16) } },
112 { "CSS_KHZ", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(17) } },
113 { "CSS_DIMENSION", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(18) } },
114 { "CSS_STRING", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(19) } },
115 { "CSS_URI", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(20) } },
116 { "CSS_IDENT", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(21) } },
117 { "CSS_ATTR", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(22) } },
118 { "CSS_COUNTER", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(23) } },
119 { "CSS_RECT", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(24) } },
120 { "CSS_RGBCOLOR", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(25) } },
121 { "CSS_VW", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(26) } },
122 { "CSS_VH", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(27) } },
123 { "CSS_VMIN", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(28) } },
124 { "CSS_VMAX", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(29) } },
125};
126
127static_assert(DeprecatedCSSOMPrimitiveValue::CSS_UNKNOWN == 0, "CSS_UNKNOWN in DeprecatedCSSOMPrimitiveValue does not match value from IDL");
128static_assert(DeprecatedCSSOMPrimitiveValue::CSS_NUMBER == 1, "CSS_NUMBER in DeprecatedCSSOMPrimitiveValue does not match value from IDL");
129static_assert(DeprecatedCSSOMPrimitiveValue::CSS_PERCENTAGE == 2, "CSS_PERCENTAGE in DeprecatedCSSOMPrimitiveValue does not match value from IDL");
130static_assert(DeprecatedCSSOMPrimitiveValue::CSS_EMS == 3, "CSS_EMS in DeprecatedCSSOMPrimitiveValue does not match value from IDL");
131static_assert(DeprecatedCSSOMPrimitiveValue::CSS_EXS == 4, "CSS_EXS in DeprecatedCSSOMPrimitiveValue does not match value from IDL");
132static_assert(DeprecatedCSSOMPrimitiveValue::CSS_PX == 5, "CSS_PX in DeprecatedCSSOMPrimitiveValue does not match value from IDL");
133static_assert(DeprecatedCSSOMPrimitiveValue::CSS_CM == 6, "CSS_CM in DeprecatedCSSOMPrimitiveValue does not match value from IDL");
134static_assert(DeprecatedCSSOMPrimitiveValue::CSS_MM == 7, "CSS_MM in DeprecatedCSSOMPrimitiveValue does not match value from IDL");
135static_assert(DeprecatedCSSOMPrimitiveValue::CSS_IN == 8, "CSS_IN in DeprecatedCSSOMPrimitiveValue does not match value from IDL");
136static_assert(DeprecatedCSSOMPrimitiveValue::CSS_PT == 9, "CSS_PT in DeprecatedCSSOMPrimitiveValue does not match value from IDL");
137static_assert(DeprecatedCSSOMPrimitiveValue::CSS_PC == 10, "CSS_PC in DeprecatedCSSOMPrimitiveValue does not match value from IDL");
138static_assert(DeprecatedCSSOMPrimitiveValue::CSS_DEG == 11, "CSS_DEG in DeprecatedCSSOMPrimitiveValue does not match value from IDL");
139static_assert(DeprecatedCSSOMPrimitiveValue::CSS_RAD == 12, "CSS_RAD in DeprecatedCSSOMPrimitiveValue does not match value from IDL");
140static_assert(DeprecatedCSSOMPrimitiveValue::CSS_GRAD == 13, "CSS_GRAD in DeprecatedCSSOMPrimitiveValue does not match value from IDL");
141static_assert(DeprecatedCSSOMPrimitiveValue::CSS_MS == 14, "CSS_MS in DeprecatedCSSOMPrimitiveValue does not match value from IDL");
142static_assert(DeprecatedCSSOMPrimitiveValue::CSS_S == 15, "CSS_S in DeprecatedCSSOMPrimitiveValue does not match value from IDL");
143static_assert(DeprecatedCSSOMPrimitiveValue::CSS_HZ == 16, "CSS_HZ in DeprecatedCSSOMPrimitiveValue does not match value from IDL");
144static_assert(DeprecatedCSSOMPrimitiveValue::CSS_KHZ == 17, "CSS_KHZ in DeprecatedCSSOMPrimitiveValue does not match value from IDL");
145static_assert(DeprecatedCSSOMPrimitiveValue::CSS_DIMENSION == 18, "CSS_DIMENSION in DeprecatedCSSOMPrimitiveValue does not match value from IDL");
146static_assert(DeprecatedCSSOMPrimitiveValue::CSS_STRING == 19, "CSS_STRING in DeprecatedCSSOMPrimitiveValue does not match value from IDL");
147static_assert(DeprecatedCSSOMPrimitiveValue::CSS_URI == 20, "CSS_URI in DeprecatedCSSOMPrimitiveValue does not match value from IDL");
148static_assert(DeprecatedCSSOMPrimitiveValue::CSS_IDENT == 21, "CSS_IDENT in DeprecatedCSSOMPrimitiveValue does not match value from IDL");
149static_assert(DeprecatedCSSOMPrimitiveValue::CSS_ATTR == 22, "CSS_ATTR in DeprecatedCSSOMPrimitiveValue does not match value from IDL");
150static_assert(DeprecatedCSSOMPrimitiveValue::CSS_COUNTER == 23, "CSS_COUNTER in DeprecatedCSSOMPrimitiveValue does not match value from IDL");
151static_assert(DeprecatedCSSOMPrimitiveValue::CSS_RECT == 24, "CSS_RECT in DeprecatedCSSOMPrimitiveValue does not match value from IDL");
152static_assert(DeprecatedCSSOMPrimitiveValue::CSS_RGBCOLOR == 25, "CSS_RGBCOLOR in DeprecatedCSSOMPrimitiveValue does not match value from IDL");
153static_assert(DeprecatedCSSOMPrimitiveValue::CSS_VW == 26, "CSS_VW in DeprecatedCSSOMPrimitiveValue does not match value from IDL");
154static_assert(DeprecatedCSSOMPrimitiveValue::CSS_VH == 27, "CSS_VH in DeprecatedCSSOMPrimitiveValue does not match value from IDL");
155static_assert(DeprecatedCSSOMPrimitiveValue::CSS_VMIN == 28, "CSS_VMIN in DeprecatedCSSOMPrimitiveValue does not match value from IDL");
156static_assert(DeprecatedCSSOMPrimitiveValue::CSS_VMAX == 29, "CSS_VMAX in DeprecatedCSSOMPrimitiveValue does not match value from IDL");
157
158template<> JSValue JSDeprecatedCSSOMPrimitiveValueConstructor::prototypeForStructure(JSC::VM& vm, const JSDOMGlobalObject& globalObject)
159{
160 return JSDeprecatedCSSOMValue::getConstructor(vm, &globalObject);
161}
162
163template<> void JSDeprecatedCSSOMPrimitiveValueConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
164{
165 putDirect(vm, vm.propertyNames->prototype, JSDeprecatedCSSOMPrimitiveValue::prototype(vm, globalObject), JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
166 putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("CSSPrimitiveValue"_s)), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
167 putDirect(vm, vm.propertyNames->length, jsNumber(0), JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::DontEnum);
168 reifyStaticProperties(vm, JSDeprecatedCSSOMPrimitiveValue::info(), JSDeprecatedCSSOMPrimitiveValueConstructorTableValues, *this);
169}
170
171template<> const ClassInfo JSDeprecatedCSSOMPrimitiveValueConstructor::s_info = { "CSSPrimitiveValue", &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSDeprecatedCSSOMPrimitiveValueConstructor) };
172
173/* Hash table for prototype */
174
175static const HashTableValue JSDeprecatedCSSOMPrimitiveValuePrototypeTableValues[] =
176{
177 { "constructor", static_cast<unsigned>(JSC::PropertyAttribute::DontEnum), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDeprecatedCSSOMPrimitiveValueConstructor), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(setJSDeprecatedCSSOMPrimitiveValueConstructor) } },
178 { "primitiveType", static_cast<unsigned>(JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::CustomAccessor | JSC::PropertyAttribute::DOMAttribute), NoIntrinsic, { (intptr_t)static_cast<PropertySlot::GetValueFunc>(jsDeprecatedCSSOMPrimitiveValuePrimitiveType), (intptr_t) static_cast<PutPropertySlot::PutValueFunc>(0) } },
179 { "setFloatValue", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsDeprecatedCSSOMPrimitiveValuePrototypeFunctionSetFloatValue), (intptr_t) (0) } },
180 { "getFloatValue", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsDeprecatedCSSOMPrimitiveValuePrototypeFunctionGetFloatValue), (intptr_t) (0) } },
181 { "setStringValue", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsDeprecatedCSSOMPrimitiveValuePrototypeFunctionSetStringValue), (intptr_t) (0) } },
182 { "getStringValue", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsDeprecatedCSSOMPrimitiveValuePrototypeFunctionGetStringValue), (intptr_t) (0) } },
183 { "getCounterValue", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsDeprecatedCSSOMPrimitiveValuePrototypeFunctionGetCounterValue), (intptr_t) (0) } },
184 { "getRectValue", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsDeprecatedCSSOMPrimitiveValuePrototypeFunctionGetRectValue), (intptr_t) (0) } },
185 { "getRGBColorValue", static_cast<unsigned>(JSC::PropertyAttribute::Function), NoIntrinsic, { (intptr_t)static_cast<RawNativeFunction>(jsDeprecatedCSSOMPrimitiveValuePrototypeFunctionGetRGBColorValue), (intptr_t) (0) } },
186 { "CSS_UNKNOWN", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(0) } },
187 { "CSS_NUMBER", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(1) } },
188 { "CSS_PERCENTAGE", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(2) } },
189 { "CSS_EMS", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(3) } },
190 { "CSS_EXS", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(4) } },
191 { "CSS_PX", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(5) } },
192 { "CSS_CM", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(6) } },
193 { "CSS_MM", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(7) } },
194 { "CSS_IN", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(8) } },
195 { "CSS_PT", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(9) } },
196 { "CSS_PC", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(10) } },
197 { "CSS_DEG", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(11) } },
198 { "CSS_RAD", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(12) } },
199 { "CSS_GRAD", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(13) } },
200 { "CSS_MS", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(14) } },
201 { "CSS_S", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(15) } },
202 { "CSS_HZ", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(16) } },
203 { "CSS_KHZ", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(17) } },
204 { "CSS_DIMENSION", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(18) } },
205 { "CSS_STRING", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(19) } },
206 { "CSS_URI", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(20) } },
207 { "CSS_IDENT", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(21) } },
208 { "CSS_ATTR", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(22) } },
209 { "CSS_COUNTER", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(23) } },
210 { "CSS_RECT", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(24) } },
211 { "CSS_RGBCOLOR", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(25) } },
212 { "CSS_VW", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(26) } },
213 { "CSS_VH", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(27) } },
214 { "CSS_VMIN", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(28) } },
215 { "CSS_VMAX", JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly | JSC::PropertyAttribute::ConstantInteger, NoIntrinsic, { (long long)(29) } },
216};
217
218const ClassInfo JSDeprecatedCSSOMPrimitiveValuePrototype::s_info = { "CSSPrimitiveValuePrototype", &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSDeprecatedCSSOMPrimitiveValuePrototype) };
219
220void JSDeprecatedCSSOMPrimitiveValuePrototype::finishCreation(VM& vm)
221{
222 Base::finishCreation(vm);
223 reifyStaticProperties(vm, JSDeprecatedCSSOMPrimitiveValue::info(), JSDeprecatedCSSOMPrimitiveValuePrototypeTableValues, *this);
224}
225
226const ClassInfo JSDeprecatedCSSOMPrimitiveValue::s_info = { "CSSPrimitiveValue", &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSDeprecatedCSSOMPrimitiveValue) };
227
228JSDeprecatedCSSOMPrimitiveValue::JSDeprecatedCSSOMPrimitiveValue(Structure* structure, JSDOMGlobalObject& globalObject, Ref<DeprecatedCSSOMPrimitiveValue>&& impl)
229 : JSDeprecatedCSSOMValue(structure, globalObject, WTFMove(impl))
230{
231}
232
233void JSDeprecatedCSSOMPrimitiveValue::finishCreation(VM& vm)
234{
235 Base::finishCreation(vm);
236 ASSERT(inherits(vm, info()));
237
238}
239
240JSObject* JSDeprecatedCSSOMPrimitiveValue::createPrototype(VM& vm, JSDOMGlobalObject& globalObject)
241{
242 return JSDeprecatedCSSOMPrimitiveValuePrototype::create(vm, &globalObject, JSDeprecatedCSSOMPrimitiveValuePrototype::createStructure(vm, &globalObject, JSDeprecatedCSSOMValue::prototype(vm, globalObject)));
243}
244
245JSObject* JSDeprecatedCSSOMPrimitiveValue::prototype(VM& vm, JSDOMGlobalObject& globalObject)
246{
247 return getDOMPrototype<JSDeprecatedCSSOMPrimitiveValue>(vm, globalObject);
248}
249
250JSValue JSDeprecatedCSSOMPrimitiveValue::getConstructor(VM& vm, const JSGlobalObject* globalObject)
251{
252 return getDOMConstructor<JSDeprecatedCSSOMPrimitiveValueConstructor>(vm, *jsCast<const JSDOMGlobalObject*>(globalObject));
253}
254
255template<> inline JSDeprecatedCSSOMPrimitiveValue* IDLAttribute<JSDeprecatedCSSOMPrimitiveValue>::cast(ExecState& state, EncodedJSValue thisValue)
256{
257 return jsDynamicCast<JSDeprecatedCSSOMPrimitiveValue*>(state.vm(), JSValue::decode(thisValue));
258}
259
260template<> inline JSDeprecatedCSSOMPrimitiveValue* IDLOperation<JSDeprecatedCSSOMPrimitiveValue>::cast(ExecState& state)
261{
262 return jsDynamicCast<JSDeprecatedCSSOMPrimitiveValue*>(state.vm(), state.thisValue());
263}
264
265EncodedJSValue jsDeprecatedCSSOMPrimitiveValueConstructor(ExecState* state, EncodedJSValue thisValue, PropertyName)
266{
267 VM& vm = state->vm();
268 auto throwScope = DECLARE_THROW_SCOPE(vm);
269 auto* prototype = jsDynamicCast<JSDeprecatedCSSOMPrimitiveValuePrototype*>(vm, JSValue::decode(thisValue));
270 if (UNLIKELY(!prototype))
271 return throwVMTypeError(state, throwScope);
272 return JSValue::encode(JSDeprecatedCSSOMPrimitiveValue::getConstructor(state->vm(), prototype->globalObject()));
273}
274
275bool setJSDeprecatedCSSOMPrimitiveValueConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
276{
277 VM& vm = state->vm();
278 auto throwScope = DECLARE_THROW_SCOPE(vm);
279 auto* prototype = jsDynamicCast<JSDeprecatedCSSOMPrimitiveValuePrototype*>(vm, JSValue::decode(thisValue));
280 if (UNLIKELY(!prototype)) {
281 throwVMTypeError(state, throwScope);
282 return false;
283 }
284 // Shadowing a built-in constructor
285 return prototype->putDirect(vm, vm.propertyNames->constructor, JSValue::decode(encodedValue));
286}
287
288static inline JSValue jsDeprecatedCSSOMPrimitiveValuePrimitiveTypeGetter(ExecState& state, JSDeprecatedCSSOMPrimitiveValue& thisObject, ThrowScope& throwScope)
289{
290 UNUSED_PARAM(throwScope);
291 UNUSED_PARAM(state);
292 auto& impl = thisObject.wrapped();
293 JSValue result = toJS<IDLUnsignedShort>(state, throwScope, impl.primitiveType());
294 return result;
295}
296
297EncodedJSValue jsDeprecatedCSSOMPrimitiveValuePrimitiveType(ExecState* state, EncodedJSValue thisValue, PropertyName)
298{
299 return IDLAttribute<JSDeprecatedCSSOMPrimitiveValue>::get<jsDeprecatedCSSOMPrimitiveValuePrimitiveTypeGetter, CastedThisErrorBehavior::Assert>(*state, thisValue, "primitiveType");
300}
301
302static inline JSC::EncodedJSValue jsDeprecatedCSSOMPrimitiveValuePrototypeFunctionSetFloatValueBody(JSC::ExecState* state, typename IDLOperation<JSDeprecatedCSSOMPrimitiveValue>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
303{
304 UNUSED_PARAM(state);
305 UNUSED_PARAM(throwScope);
306 auto& impl = castedThis->wrapped();
307 auto unitType = convert<IDLUnsignedShort>(*state, state->argument(0));
308 RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
309 auto floatValue = convert<IDLUnrestrictedFloat>(*state, state->argument(1));
310 RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
311 propagateException(*state, throwScope, impl.setFloatValue(WTFMove(unitType), WTFMove(floatValue)));
312 return JSValue::encode(jsUndefined());
313}
314
315EncodedJSValue JSC_HOST_CALL jsDeprecatedCSSOMPrimitiveValuePrototypeFunctionSetFloatValue(ExecState* state)
316{
317 return IDLOperation<JSDeprecatedCSSOMPrimitiveValue>::call<jsDeprecatedCSSOMPrimitiveValuePrototypeFunctionSetFloatValueBody>(*state, "setFloatValue");
318}
319
320static inline JSC::EncodedJSValue jsDeprecatedCSSOMPrimitiveValuePrototypeFunctionGetFloatValueBody(JSC::ExecState* state, typename IDLOperation<JSDeprecatedCSSOMPrimitiveValue>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
321{
322 UNUSED_PARAM(state);
323 UNUSED_PARAM(throwScope);
324 auto& impl = castedThis->wrapped();
325 auto unitType = convert<IDLUnsignedShort>(*state, state->argument(0));
326 RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
327 return JSValue::encode(toJS<IDLUnrestrictedFloat>(*state, throwScope, impl.getFloatValue(WTFMove(unitType))));
328}
329
330EncodedJSValue JSC_HOST_CALL jsDeprecatedCSSOMPrimitiveValuePrototypeFunctionGetFloatValue(ExecState* state)
331{
332 return IDLOperation<JSDeprecatedCSSOMPrimitiveValue>::call<jsDeprecatedCSSOMPrimitiveValuePrototypeFunctionGetFloatValueBody>(*state, "getFloatValue");
333}
334
335static inline JSC::EncodedJSValue jsDeprecatedCSSOMPrimitiveValuePrototypeFunctionSetStringValueBody(JSC::ExecState* state, typename IDLOperation<JSDeprecatedCSSOMPrimitiveValue>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
336{
337 UNUSED_PARAM(state);
338 UNUSED_PARAM(throwScope);
339 auto& impl = castedThis->wrapped();
340 auto stringType = convert<IDLUnsignedShort>(*state, state->argument(0));
341 RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
342 auto stringValue = state->argument(1).isUndefined() ? String() : convert<IDLDOMString>(*state, state->uncheckedArgument(1));
343 RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
344 propagateException(*state, throwScope, impl.setStringValue(WTFMove(stringType), WTFMove(stringValue)));
345 return JSValue::encode(jsUndefined());
346}
347
348EncodedJSValue JSC_HOST_CALL jsDeprecatedCSSOMPrimitiveValuePrototypeFunctionSetStringValue(ExecState* state)
349{
350 return IDLOperation<JSDeprecatedCSSOMPrimitiveValue>::call<jsDeprecatedCSSOMPrimitiveValuePrototypeFunctionSetStringValueBody>(*state, "setStringValue");
351}
352
353static inline JSC::EncodedJSValue jsDeprecatedCSSOMPrimitiveValuePrototypeFunctionGetStringValueBody(JSC::ExecState* state, typename IDLOperation<JSDeprecatedCSSOMPrimitiveValue>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
354{
355 UNUSED_PARAM(state);
356 UNUSED_PARAM(throwScope);
357 auto& impl = castedThis->wrapped();
358 return JSValue::encode(toJS<IDLDOMString>(*state, throwScope, impl.getStringValue()));
359}
360
361EncodedJSValue JSC_HOST_CALL jsDeprecatedCSSOMPrimitiveValuePrototypeFunctionGetStringValue(ExecState* state)
362{
363 return IDLOperation<JSDeprecatedCSSOMPrimitiveValue>::call<jsDeprecatedCSSOMPrimitiveValuePrototypeFunctionGetStringValueBody>(*state, "getStringValue");
364}
365
366static inline JSC::EncodedJSValue jsDeprecatedCSSOMPrimitiveValuePrototypeFunctionGetCounterValueBody(JSC::ExecState* state, typename IDLOperation<JSDeprecatedCSSOMPrimitiveValue>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
367{
368 UNUSED_PARAM(state);
369 UNUSED_PARAM(throwScope);
370 auto& impl = castedThis->wrapped();
371 return JSValue::encode(toJS<IDLInterface<DeprecatedCSSOMCounter>>(*state, *castedThis->globalObject(), throwScope, impl.getCounterValue()));
372}
373
374EncodedJSValue JSC_HOST_CALL jsDeprecatedCSSOMPrimitiveValuePrototypeFunctionGetCounterValue(ExecState* state)
375{
376 return IDLOperation<JSDeprecatedCSSOMPrimitiveValue>::call<jsDeprecatedCSSOMPrimitiveValuePrototypeFunctionGetCounterValueBody>(*state, "getCounterValue");
377}
378
379static inline JSC::EncodedJSValue jsDeprecatedCSSOMPrimitiveValuePrototypeFunctionGetRectValueBody(JSC::ExecState* state, typename IDLOperation<JSDeprecatedCSSOMPrimitiveValue>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
380{
381 UNUSED_PARAM(state);
382 UNUSED_PARAM(throwScope);
383 auto& impl = castedThis->wrapped();
384 return JSValue::encode(toJS<IDLInterface<DeprecatedCSSOMRect>>(*state, *castedThis->globalObject(), throwScope, impl.getRectValue()));
385}
386
387EncodedJSValue JSC_HOST_CALL jsDeprecatedCSSOMPrimitiveValuePrototypeFunctionGetRectValue(ExecState* state)
388{
389 return IDLOperation<JSDeprecatedCSSOMPrimitiveValue>::call<jsDeprecatedCSSOMPrimitiveValuePrototypeFunctionGetRectValueBody>(*state, "getRectValue");
390}
391
392static inline JSC::EncodedJSValue jsDeprecatedCSSOMPrimitiveValuePrototypeFunctionGetRGBColorValueBody(JSC::ExecState* state, typename IDLOperation<JSDeprecatedCSSOMPrimitiveValue>::ClassParameter castedThis, JSC::ThrowScope& throwScope)
393{
394 UNUSED_PARAM(state);
395 UNUSED_PARAM(throwScope);
396 auto& impl = castedThis->wrapped();
397 return JSValue::encode(toJS<IDLInterface<DeprecatedCSSOMRGBColor>>(*state, *castedThis->globalObject(), throwScope, impl.getRGBColorValue()));
398}
399
400EncodedJSValue JSC_HOST_CALL jsDeprecatedCSSOMPrimitiveValuePrototypeFunctionGetRGBColorValue(ExecState* state)
401{
402 return IDLOperation<JSDeprecatedCSSOMPrimitiveValue>::call<jsDeprecatedCSSOMPrimitiveValuePrototypeFunctionGetRGBColorValueBody>(*state, "getRGBColorValue");
403}
404
405void JSDeprecatedCSSOMPrimitiveValue::heapSnapshot(JSCell* cell, HeapSnapshotBuilder& builder)
406{
407 auto* thisObject = jsCast<JSDeprecatedCSSOMPrimitiveValue*>(cell);
408 builder.setWrappedObjectForCell(cell, &thisObject->wrapped());
409 if (thisObject->scriptExecutionContext())
410 builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string());
411 Base::heapSnapshot(cell, builder);
412}
413
414
415}
416