1 | /* |
2 | * This file is part of the WebKit open source project. |
3 | * |
4 | * This library is free software; you can redistribute it and/or |
5 | * modify it under the terms of the GNU Library General Public |
6 | * License as published by the Free Software Foundation; either |
7 | * version 2 of the License, or (at your option) any later version. |
8 | * |
9 | * This library is distributed in the hope that it will be useful, |
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
12 | * Library General Public License for more details. |
13 | * |
14 | * You should have received a copy of the GNU Library General Public License |
15 | * along with this library; see the file COPYING.LIB. If not, write to |
16 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
17 | * Boston, MA 02110-1301, USA. |
18 | */ |
19 | |
20 | #include "config.h" |
21 | #include "WebKitDOMHTMLAppletElement.h" |
22 | |
23 | #include <WebCore/CSSImportRule.h> |
24 | #include "DOMObjectCache.h" |
25 | #include <WebCore/DOMException.h> |
26 | #include <WebCore/Document.h> |
27 | #include "GObjectEventListener.h" |
28 | #include <WebCore/HTMLNames.h> |
29 | #include <WebCore/JSExecState.h> |
30 | #include "WebKitDOMEventPrivate.h" |
31 | #include "WebKitDOMEventTarget.h" |
32 | #include "WebKitDOMHTMLAppletElementPrivate.h" |
33 | #include "WebKitDOMNodePrivate.h" |
34 | #include "WebKitDOMPrivate.h" |
35 | #include "ConvertToUTF8String.h" |
36 | #include <wtf/GetPtr.h> |
37 | #include <wtf/RefPtr.h> |
38 | |
39 | G_GNUC_BEGIN_IGNORE_DEPRECATIONS; |
40 | |
41 | namespace WebKit { |
42 | |
43 | WebKitDOMHTMLAppletElement* kit(WebCore::HTMLAppletElement* obj) |
44 | { |
45 | return WEBKIT_DOM_HTML_APPLET_ELEMENT(kit(static_cast<WebCore::Node*>(obj))); |
46 | } |
47 | |
48 | WebCore::HTMLAppletElement* core(WebKitDOMHTMLAppletElement* request) |
49 | { |
50 | return request ? static_cast<WebCore::HTMLAppletElement*>(WEBKIT_DOM_OBJECT(request)->coreObject) : 0; |
51 | } |
52 | |
53 | WebKitDOMHTMLAppletElement* wrapHTMLAppletElement(WebCore::HTMLAppletElement* coreObject) |
54 | { |
55 | ASSERT(coreObject); |
56 | return WEBKIT_DOM_HTML_APPLET_ELEMENT(g_object_new(WEBKIT_DOM_TYPE_HTML_APPLET_ELEMENT, "core-object" , coreObject, nullptr)); |
57 | } |
58 | |
59 | } // namespace WebKit |
60 | |
61 | static gboolean webkit_dom_html_applet_element_dispatch_event(WebKitDOMEventTarget* target, WebKitDOMEvent* event, GError** error) |
62 | { |
63 | WebCore::Event* coreEvent = WebKit::core(event); |
64 | if (!coreEvent) |
65 | return false; |
66 | WebCore::HTMLAppletElement* coreTarget = static_cast<WebCore::HTMLAppletElement*>(WEBKIT_DOM_OBJECT(target)->coreObject); |
67 | |
68 | auto result = coreTarget->dispatchEventForBindings(*coreEvent); |
69 | if (result.hasException()) { |
70 | auto description = WebCore::DOMException::description(result.releaseException().code()); |
71 | g_set_error_literal(error, g_quark_from_string("WEBKIT_DOM" ), description.legacyCode, description.name); |
72 | return false; |
73 | } |
74 | return result.releaseReturnValue(); |
75 | } |
76 | |
77 | static gboolean webkit_dom_html_applet_element_add_event_listener(WebKitDOMEventTarget* target, const char* eventName, GClosure* handler, gboolean useCapture) |
78 | { |
79 | WebCore::HTMLAppletElement* coreTarget = static_cast<WebCore::HTMLAppletElement*>(WEBKIT_DOM_OBJECT(target)->coreObject); |
80 | return WebKit::GObjectEventListener::addEventListener(G_OBJECT(target), coreTarget, eventName, handler, useCapture); |
81 | } |
82 | |
83 | static gboolean webkit_dom_html_applet_element_remove_event_listener(WebKitDOMEventTarget* target, const char* eventName, GClosure* handler, gboolean useCapture) |
84 | { |
85 | WebCore::HTMLAppletElement* coreTarget = static_cast<WebCore::HTMLAppletElement*>(WEBKIT_DOM_OBJECT(target)->coreObject); |
86 | return WebKit::GObjectEventListener::removeEventListener(G_OBJECT(target), coreTarget, eventName, handler, useCapture); |
87 | } |
88 | |
89 | static void webkit_dom_html_applet_element_dom_event_target_init(WebKitDOMEventTargetIface* iface) |
90 | { |
91 | iface->dispatch_event = webkit_dom_html_applet_element_dispatch_event; |
92 | iface->add_event_listener = webkit_dom_html_applet_element_add_event_listener; |
93 | iface->remove_event_listener = webkit_dom_html_applet_element_remove_event_listener; |
94 | } |
95 | |
96 | G_DEFINE_TYPE_WITH_CODE(WebKitDOMHTMLAppletElement, webkit_dom_html_applet_element, WEBKIT_DOM_TYPE_HTML_ELEMENT, G_IMPLEMENT_INTERFACE(WEBKIT_DOM_TYPE_EVENT_TARGET, webkit_dom_html_applet_element_dom_event_target_init)) |
97 | |
98 | enum { |
99 | DOM_HTML_APPLET_ELEMENT_PROP_0, |
100 | DOM_HTML_APPLET_ELEMENT_PROP_ALIGN, |
101 | DOM_HTML_APPLET_ELEMENT_PROP_ALT, |
102 | DOM_HTML_APPLET_ELEMENT_PROP_ARCHIVE, |
103 | DOM_HTML_APPLET_ELEMENT_PROP_CODE, |
104 | DOM_HTML_APPLET_ELEMENT_PROP_CODE_BASE, |
105 | DOM_HTML_APPLET_ELEMENT_PROP_HEIGHT, |
106 | DOM_HTML_APPLET_ELEMENT_PROP_HSPACE, |
107 | DOM_HTML_APPLET_ELEMENT_PROP_NAME, |
108 | DOM_HTML_APPLET_ELEMENT_PROP_OBJECT, |
109 | DOM_HTML_APPLET_ELEMENT_PROP_VSPACE, |
110 | DOM_HTML_APPLET_ELEMENT_PROP_WIDTH, |
111 | }; |
112 | |
113 | static void webkit_dom_html_applet_element_set_property(GObject* object, guint propertyId, const GValue* value, GParamSpec* pspec) |
114 | { |
115 | WebKitDOMHTMLAppletElement* self = WEBKIT_DOM_HTML_APPLET_ELEMENT(object); |
116 | |
117 | switch (propertyId) { |
118 | case DOM_HTML_APPLET_ELEMENT_PROP_ALIGN: |
119 | webkit_dom_html_applet_element_set_align(self, g_value_get_string(value)); |
120 | break; |
121 | case DOM_HTML_APPLET_ELEMENT_PROP_ALT: |
122 | webkit_dom_html_applet_element_set_alt(self, g_value_get_string(value)); |
123 | break; |
124 | case DOM_HTML_APPLET_ELEMENT_PROP_ARCHIVE: |
125 | webkit_dom_html_applet_element_set_archive(self, g_value_get_string(value)); |
126 | break; |
127 | case DOM_HTML_APPLET_ELEMENT_PROP_CODE: |
128 | webkit_dom_html_applet_element_set_code(self, g_value_get_string(value)); |
129 | break; |
130 | case DOM_HTML_APPLET_ELEMENT_PROP_CODE_BASE: |
131 | webkit_dom_html_applet_element_set_code_base(self, g_value_get_string(value)); |
132 | break; |
133 | case DOM_HTML_APPLET_ELEMENT_PROP_HEIGHT: |
134 | webkit_dom_html_applet_element_set_height(self, g_value_get_string(value)); |
135 | break; |
136 | case DOM_HTML_APPLET_ELEMENT_PROP_HSPACE: |
137 | webkit_dom_html_applet_element_set_hspace(self, g_value_get_long(value)); |
138 | break; |
139 | case DOM_HTML_APPLET_ELEMENT_PROP_NAME: |
140 | webkit_dom_html_applet_element_set_name(self, g_value_get_string(value)); |
141 | break; |
142 | case DOM_HTML_APPLET_ELEMENT_PROP_OBJECT: |
143 | webkit_dom_html_applet_element_set_object(self, g_value_get_string(value)); |
144 | break; |
145 | case DOM_HTML_APPLET_ELEMENT_PROP_VSPACE: |
146 | webkit_dom_html_applet_element_set_vspace(self, g_value_get_long(value)); |
147 | break; |
148 | case DOM_HTML_APPLET_ELEMENT_PROP_WIDTH: |
149 | webkit_dom_html_applet_element_set_width(self, g_value_get_string(value)); |
150 | break; |
151 | default: |
152 | G_OBJECT_WARN_INVALID_PROPERTY_ID(object, propertyId, pspec); |
153 | break; |
154 | } |
155 | } |
156 | |
157 | static void webkit_dom_html_applet_element_get_property(GObject* object, guint propertyId, GValue* value, GParamSpec* pspec) |
158 | { |
159 | WebKitDOMHTMLAppletElement* self = WEBKIT_DOM_HTML_APPLET_ELEMENT(object); |
160 | |
161 | switch (propertyId) { |
162 | case DOM_HTML_APPLET_ELEMENT_PROP_ALIGN: |
163 | g_value_take_string(value, webkit_dom_html_applet_element_get_align(self)); |
164 | break; |
165 | case DOM_HTML_APPLET_ELEMENT_PROP_ALT: |
166 | g_value_take_string(value, webkit_dom_html_applet_element_get_alt(self)); |
167 | break; |
168 | case DOM_HTML_APPLET_ELEMENT_PROP_ARCHIVE: |
169 | g_value_take_string(value, webkit_dom_html_applet_element_get_archive(self)); |
170 | break; |
171 | case DOM_HTML_APPLET_ELEMENT_PROP_CODE: |
172 | g_value_take_string(value, webkit_dom_html_applet_element_get_code(self)); |
173 | break; |
174 | case DOM_HTML_APPLET_ELEMENT_PROP_CODE_BASE: |
175 | g_value_take_string(value, webkit_dom_html_applet_element_get_code_base(self)); |
176 | break; |
177 | case DOM_HTML_APPLET_ELEMENT_PROP_HEIGHT: |
178 | g_value_take_string(value, webkit_dom_html_applet_element_get_height(self)); |
179 | break; |
180 | case DOM_HTML_APPLET_ELEMENT_PROP_HSPACE: |
181 | g_value_set_long(value, webkit_dom_html_applet_element_get_hspace(self)); |
182 | break; |
183 | case DOM_HTML_APPLET_ELEMENT_PROP_NAME: |
184 | g_value_take_string(value, webkit_dom_html_applet_element_get_name(self)); |
185 | break; |
186 | case DOM_HTML_APPLET_ELEMENT_PROP_OBJECT: |
187 | g_value_take_string(value, webkit_dom_html_applet_element_get_object(self)); |
188 | break; |
189 | case DOM_HTML_APPLET_ELEMENT_PROP_VSPACE: |
190 | g_value_set_long(value, webkit_dom_html_applet_element_get_vspace(self)); |
191 | break; |
192 | case DOM_HTML_APPLET_ELEMENT_PROP_WIDTH: |
193 | g_value_take_string(value, webkit_dom_html_applet_element_get_width(self)); |
194 | break; |
195 | default: |
196 | G_OBJECT_WARN_INVALID_PROPERTY_ID(object, propertyId, pspec); |
197 | break; |
198 | } |
199 | } |
200 | |
201 | static void webkit_dom_html_applet_element_class_init(WebKitDOMHTMLAppletElementClass* requestClass) |
202 | { |
203 | GObjectClass* gobjectClass = G_OBJECT_CLASS(requestClass); |
204 | gobjectClass->set_property = webkit_dom_html_applet_element_set_property; |
205 | gobjectClass->get_property = webkit_dom_html_applet_element_get_property; |
206 | |
207 | g_object_class_install_property( |
208 | gobjectClass, |
209 | DOM_HTML_APPLET_ELEMENT_PROP_ALIGN, |
210 | g_param_spec_string( |
211 | "align" , |
212 | "HTMLAppletElement:align" , |
213 | "read-write gchar* HTMLAppletElement:align" , |
214 | "" , |
215 | WEBKIT_PARAM_READWRITE)); |
216 | |
217 | g_object_class_install_property( |
218 | gobjectClass, |
219 | DOM_HTML_APPLET_ELEMENT_PROP_ALT, |
220 | g_param_spec_string( |
221 | "alt" , |
222 | "HTMLAppletElement:alt" , |
223 | "read-write gchar* HTMLAppletElement:alt" , |
224 | "" , |
225 | WEBKIT_PARAM_READWRITE)); |
226 | |
227 | g_object_class_install_property( |
228 | gobjectClass, |
229 | DOM_HTML_APPLET_ELEMENT_PROP_ARCHIVE, |
230 | g_param_spec_string( |
231 | "archive" , |
232 | "HTMLAppletElement:archive" , |
233 | "read-write gchar* HTMLAppletElement:archive" , |
234 | "" , |
235 | WEBKIT_PARAM_READWRITE)); |
236 | |
237 | g_object_class_install_property( |
238 | gobjectClass, |
239 | DOM_HTML_APPLET_ELEMENT_PROP_CODE, |
240 | g_param_spec_string( |
241 | "code" , |
242 | "HTMLAppletElement:code" , |
243 | "read-write gchar* HTMLAppletElement:code" , |
244 | "" , |
245 | WEBKIT_PARAM_READWRITE)); |
246 | |
247 | g_object_class_install_property( |
248 | gobjectClass, |
249 | DOM_HTML_APPLET_ELEMENT_PROP_CODE_BASE, |
250 | g_param_spec_string( |
251 | "code-base" , |
252 | "HTMLAppletElement:code-base" , |
253 | "read-write gchar* HTMLAppletElement:code-base" , |
254 | "" , |
255 | WEBKIT_PARAM_READWRITE)); |
256 | |
257 | g_object_class_install_property( |
258 | gobjectClass, |
259 | DOM_HTML_APPLET_ELEMENT_PROP_HEIGHT, |
260 | g_param_spec_string( |
261 | "height" , |
262 | "HTMLAppletElement:height" , |
263 | "read-write gchar* HTMLAppletElement:height" , |
264 | "" , |
265 | WEBKIT_PARAM_READWRITE)); |
266 | |
267 | g_object_class_install_property( |
268 | gobjectClass, |
269 | DOM_HTML_APPLET_ELEMENT_PROP_HSPACE, |
270 | g_param_spec_long( |
271 | "hspace" , |
272 | "HTMLAppletElement:hspace" , |
273 | "read-write glong HTMLAppletElement:hspace" , |
274 | G_MINLONG, G_MAXLONG, 0, |
275 | WEBKIT_PARAM_READWRITE)); |
276 | |
277 | g_object_class_install_property( |
278 | gobjectClass, |
279 | DOM_HTML_APPLET_ELEMENT_PROP_NAME, |
280 | g_param_spec_string( |
281 | "name" , |
282 | "HTMLAppletElement:name" , |
283 | "read-write gchar* HTMLAppletElement:name" , |
284 | "" , |
285 | WEBKIT_PARAM_READWRITE)); |
286 | |
287 | g_object_class_install_property( |
288 | gobjectClass, |
289 | DOM_HTML_APPLET_ELEMENT_PROP_OBJECT, |
290 | g_param_spec_string( |
291 | "object" , |
292 | "HTMLAppletElement:object" , |
293 | "read-write gchar* HTMLAppletElement:object" , |
294 | "" , |
295 | WEBKIT_PARAM_READWRITE)); |
296 | |
297 | g_object_class_install_property( |
298 | gobjectClass, |
299 | DOM_HTML_APPLET_ELEMENT_PROP_VSPACE, |
300 | g_param_spec_long( |
301 | "vspace" , |
302 | "HTMLAppletElement:vspace" , |
303 | "read-write glong HTMLAppletElement:vspace" , |
304 | G_MINLONG, G_MAXLONG, 0, |
305 | WEBKIT_PARAM_READWRITE)); |
306 | |
307 | g_object_class_install_property( |
308 | gobjectClass, |
309 | DOM_HTML_APPLET_ELEMENT_PROP_WIDTH, |
310 | g_param_spec_string( |
311 | "width" , |
312 | "HTMLAppletElement:width" , |
313 | "read-write gchar* HTMLAppletElement:width" , |
314 | "" , |
315 | WEBKIT_PARAM_READWRITE)); |
316 | |
317 | } |
318 | |
319 | static void webkit_dom_html_applet_element_init(WebKitDOMHTMLAppletElement* request) |
320 | { |
321 | UNUSED_PARAM(request); |
322 | } |
323 | |
324 | gchar* webkit_dom_html_applet_element_get_align(WebKitDOMHTMLAppletElement* self) |
325 | { |
326 | WebCore::JSMainThreadNullState state; |
327 | g_return_val_if_fail(WEBKIT_DOM_IS_HTML_APPLET_ELEMENT(self), 0); |
328 | WebCore::HTMLAppletElement* item = WebKit::core(self); |
329 | gchar* result = convertToUTF8String(item->attributeWithoutSynchronization(WebCore::HTMLNames::alignAttr)); |
330 | return result; |
331 | } |
332 | |
333 | void webkit_dom_html_applet_element_set_align(WebKitDOMHTMLAppletElement* self, const gchar* value) |
334 | { |
335 | WebCore::JSMainThreadNullState state; |
336 | g_return_if_fail(WEBKIT_DOM_IS_HTML_APPLET_ELEMENT(self)); |
337 | g_return_if_fail(value); |
338 | WebCore::HTMLAppletElement* item = WebKit::core(self); |
339 | WTF::String convertedValue = WTF::String::fromUTF8(value); |
340 | item->setAttributeWithoutSynchronization(WebCore::HTMLNames::alignAttr, convertedValue); |
341 | } |
342 | |
343 | gchar* webkit_dom_html_applet_element_get_alt(WebKitDOMHTMLAppletElement* self) |
344 | { |
345 | WebCore::JSMainThreadNullState state; |
346 | g_return_val_if_fail(WEBKIT_DOM_IS_HTML_APPLET_ELEMENT(self), 0); |
347 | WebCore::HTMLAppletElement* item = WebKit::core(self); |
348 | gchar* result = convertToUTF8String(item->attributeWithoutSynchronization(WebCore::HTMLNames::altAttr)); |
349 | return result; |
350 | } |
351 | |
352 | void webkit_dom_html_applet_element_set_alt(WebKitDOMHTMLAppletElement* self, const gchar* value) |
353 | { |
354 | WebCore::JSMainThreadNullState state; |
355 | g_return_if_fail(WEBKIT_DOM_IS_HTML_APPLET_ELEMENT(self)); |
356 | g_return_if_fail(value); |
357 | WebCore::HTMLAppletElement* item = WebKit::core(self); |
358 | WTF::String convertedValue = WTF::String::fromUTF8(value); |
359 | item->setAttributeWithoutSynchronization(WebCore::HTMLNames::altAttr, convertedValue); |
360 | } |
361 | |
362 | gchar* webkit_dom_html_applet_element_get_archive(WebKitDOMHTMLAppletElement* self) |
363 | { |
364 | WebCore::JSMainThreadNullState state; |
365 | g_return_val_if_fail(WEBKIT_DOM_IS_HTML_APPLET_ELEMENT(self), 0); |
366 | WebCore::HTMLAppletElement* item = WebKit::core(self); |
367 | gchar* result = convertToUTF8String(item->attributeWithoutSynchronization(WebCore::HTMLNames::archiveAttr)); |
368 | return result; |
369 | } |
370 | |
371 | void webkit_dom_html_applet_element_set_archive(WebKitDOMHTMLAppletElement* self, const gchar* value) |
372 | { |
373 | WebCore::JSMainThreadNullState state; |
374 | g_return_if_fail(WEBKIT_DOM_IS_HTML_APPLET_ELEMENT(self)); |
375 | g_return_if_fail(value); |
376 | WebCore::HTMLAppletElement* item = WebKit::core(self); |
377 | WTF::String convertedValue = WTF::String::fromUTF8(value); |
378 | item->setAttributeWithoutSynchronization(WebCore::HTMLNames::archiveAttr, convertedValue); |
379 | } |
380 | |
381 | gchar* webkit_dom_html_applet_element_get_code(WebKitDOMHTMLAppletElement* self) |
382 | { |
383 | WebCore::JSMainThreadNullState state; |
384 | g_return_val_if_fail(WEBKIT_DOM_IS_HTML_APPLET_ELEMENT(self), 0); |
385 | WebCore::HTMLAppletElement* item = WebKit::core(self); |
386 | gchar* result = convertToUTF8String(item->attributeWithoutSynchronization(WebCore::HTMLNames::codeAttr)); |
387 | return result; |
388 | } |
389 | |
390 | void webkit_dom_html_applet_element_set_code(WebKitDOMHTMLAppletElement* self, const gchar* value) |
391 | { |
392 | WebCore::JSMainThreadNullState state; |
393 | g_return_if_fail(WEBKIT_DOM_IS_HTML_APPLET_ELEMENT(self)); |
394 | g_return_if_fail(value); |
395 | WebCore::HTMLAppletElement* item = WebKit::core(self); |
396 | WTF::String convertedValue = WTF::String::fromUTF8(value); |
397 | item->setAttributeWithoutSynchronization(WebCore::HTMLNames::codeAttr, convertedValue); |
398 | } |
399 | |
400 | gchar* webkit_dom_html_applet_element_get_code_base(WebKitDOMHTMLAppletElement* self) |
401 | { |
402 | WebCore::JSMainThreadNullState state; |
403 | g_return_val_if_fail(WEBKIT_DOM_IS_HTML_APPLET_ELEMENT(self), 0); |
404 | WebCore::HTMLAppletElement* item = WebKit::core(self); |
405 | gchar* result = convertToUTF8String(item->attributeWithoutSynchronization(WebCore::HTMLNames::codebaseAttr)); |
406 | return result; |
407 | } |
408 | |
409 | void webkit_dom_html_applet_element_set_code_base(WebKitDOMHTMLAppletElement* self, const gchar* value) |
410 | { |
411 | WebCore::JSMainThreadNullState state; |
412 | g_return_if_fail(WEBKIT_DOM_IS_HTML_APPLET_ELEMENT(self)); |
413 | g_return_if_fail(value); |
414 | WebCore::HTMLAppletElement* item = WebKit::core(self); |
415 | WTF::String convertedValue = WTF::String::fromUTF8(value); |
416 | item->setAttributeWithoutSynchronization(WebCore::HTMLNames::codebaseAttr, convertedValue); |
417 | } |
418 | |
419 | gchar* webkit_dom_html_applet_element_get_height(WebKitDOMHTMLAppletElement* self) |
420 | { |
421 | WebCore::JSMainThreadNullState state; |
422 | g_return_val_if_fail(WEBKIT_DOM_IS_HTML_APPLET_ELEMENT(self), 0); |
423 | WebCore::HTMLAppletElement* item = WebKit::core(self); |
424 | gchar* result = convertToUTF8String(item->attributeWithoutSynchronization(WebCore::HTMLNames::heightAttr)); |
425 | return result; |
426 | } |
427 | |
428 | void webkit_dom_html_applet_element_set_height(WebKitDOMHTMLAppletElement* self, const gchar* value) |
429 | { |
430 | WebCore::JSMainThreadNullState state; |
431 | g_return_if_fail(WEBKIT_DOM_IS_HTML_APPLET_ELEMENT(self)); |
432 | g_return_if_fail(value); |
433 | WebCore::HTMLAppletElement* item = WebKit::core(self); |
434 | WTF::String convertedValue = WTF::String::fromUTF8(value); |
435 | item->setAttributeWithoutSynchronization(WebCore::HTMLNames::heightAttr, convertedValue); |
436 | } |
437 | |
438 | glong webkit_dom_html_applet_element_get_hspace(WebKitDOMHTMLAppletElement* self) |
439 | { |
440 | WebCore::JSMainThreadNullState state; |
441 | g_return_val_if_fail(WEBKIT_DOM_IS_HTML_APPLET_ELEMENT(self), 0); |
442 | WebCore::HTMLAppletElement* item = WebKit::core(self); |
443 | glong result = item->getIntegralAttribute(WebCore::HTMLNames::hspaceAttr); |
444 | return result; |
445 | } |
446 | |
447 | void webkit_dom_html_applet_element_set_hspace(WebKitDOMHTMLAppletElement* self, glong value) |
448 | { |
449 | WebCore::JSMainThreadNullState state; |
450 | g_return_if_fail(WEBKIT_DOM_IS_HTML_APPLET_ELEMENT(self)); |
451 | WebCore::HTMLAppletElement* item = WebKit::core(self); |
452 | item->setIntegralAttribute(WebCore::HTMLNames::hspaceAttr, value); |
453 | } |
454 | |
455 | gchar* webkit_dom_html_applet_element_get_name(WebKitDOMHTMLAppletElement* self) |
456 | { |
457 | WebCore::JSMainThreadNullState state; |
458 | g_return_val_if_fail(WEBKIT_DOM_IS_HTML_APPLET_ELEMENT(self), 0); |
459 | WebCore::HTMLAppletElement* item = WebKit::core(self); |
460 | gchar* result = convertToUTF8String(item->getNameAttribute()); |
461 | return result; |
462 | } |
463 | |
464 | void webkit_dom_html_applet_element_set_name(WebKitDOMHTMLAppletElement* self, const gchar* value) |
465 | { |
466 | WebCore::JSMainThreadNullState state; |
467 | g_return_if_fail(WEBKIT_DOM_IS_HTML_APPLET_ELEMENT(self)); |
468 | g_return_if_fail(value); |
469 | WebCore::HTMLAppletElement* item = WebKit::core(self); |
470 | WTF::String convertedValue = WTF::String::fromUTF8(value); |
471 | item->setAttributeWithoutSynchronization(WebCore::HTMLNames::nameAttr, convertedValue); |
472 | } |
473 | |
474 | gchar* webkit_dom_html_applet_element_get_object(WebKitDOMHTMLAppletElement* self) |
475 | { |
476 | WebCore::JSMainThreadNullState state; |
477 | g_return_val_if_fail(WEBKIT_DOM_IS_HTML_APPLET_ELEMENT(self), 0); |
478 | WebCore::HTMLAppletElement* item = WebKit::core(self); |
479 | gchar* result = convertToUTF8String(item->attributeWithoutSynchronization(WebCore::HTMLNames::objectAttr)); |
480 | return result; |
481 | } |
482 | |
483 | void webkit_dom_html_applet_element_set_object(WebKitDOMHTMLAppletElement* self, const gchar* value) |
484 | { |
485 | WebCore::JSMainThreadNullState state; |
486 | g_return_if_fail(WEBKIT_DOM_IS_HTML_APPLET_ELEMENT(self)); |
487 | g_return_if_fail(value); |
488 | WebCore::HTMLAppletElement* item = WebKit::core(self); |
489 | WTF::String convertedValue = WTF::String::fromUTF8(value); |
490 | item->setAttributeWithoutSynchronization(WebCore::HTMLNames::objectAttr, convertedValue); |
491 | } |
492 | |
493 | glong webkit_dom_html_applet_element_get_vspace(WebKitDOMHTMLAppletElement* self) |
494 | { |
495 | WebCore::JSMainThreadNullState state; |
496 | g_return_val_if_fail(WEBKIT_DOM_IS_HTML_APPLET_ELEMENT(self), 0); |
497 | WebCore::HTMLAppletElement* item = WebKit::core(self); |
498 | glong result = item->getIntegralAttribute(WebCore::HTMLNames::vspaceAttr); |
499 | return result; |
500 | } |
501 | |
502 | void webkit_dom_html_applet_element_set_vspace(WebKitDOMHTMLAppletElement* self, glong value) |
503 | { |
504 | WebCore::JSMainThreadNullState state; |
505 | g_return_if_fail(WEBKIT_DOM_IS_HTML_APPLET_ELEMENT(self)); |
506 | WebCore::HTMLAppletElement* item = WebKit::core(self); |
507 | item->setIntegralAttribute(WebCore::HTMLNames::vspaceAttr, value); |
508 | } |
509 | |
510 | gchar* webkit_dom_html_applet_element_get_width(WebKitDOMHTMLAppletElement* self) |
511 | { |
512 | WebCore::JSMainThreadNullState state; |
513 | g_return_val_if_fail(WEBKIT_DOM_IS_HTML_APPLET_ELEMENT(self), 0); |
514 | WebCore::HTMLAppletElement* item = WebKit::core(self); |
515 | gchar* result = convertToUTF8String(item->attributeWithoutSynchronization(WebCore::HTMLNames::widthAttr)); |
516 | return result; |
517 | } |
518 | |
519 | void webkit_dom_html_applet_element_set_width(WebKitDOMHTMLAppletElement* self, const gchar* value) |
520 | { |
521 | WebCore::JSMainThreadNullState state; |
522 | g_return_if_fail(WEBKIT_DOM_IS_HTML_APPLET_ELEMENT(self)); |
523 | g_return_if_fail(value); |
524 | WebCore::HTMLAppletElement* item = WebKit::core(self); |
525 | WTF::String convertedValue = WTF::String::fromUTF8(value); |
526 | item->setAttributeWithoutSynchronization(WebCore::HTMLNames::widthAttr, convertedValue); |
527 | } |
528 | |
529 | G_GNUC_END_IGNORE_DEPRECATIONS; |
530 | |