Move URL from WebCore to WTF
[WebKit-https.git] / Source / WebKitLegacy / mac / DOM / DOMHTMLAppletElement.mm
1 /*
2  * Copyright (C) 2004-2016 Apple Inc. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  * 1. Redistributions of source code must retain the above copyright
8  *    notice, this list of conditions and the following disclaimer.
9  * 2. Redistributions in binary form must reproduce the above copyright
10  *    notice, this list of conditions and the following disclaimer in the
11  *    documentation and/or other materials provided with the distribution.
12  *
13  * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
14  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
17  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24  */
25
26 #import "DOMHTMLAppletElement.h"
27
28 #import "DOMNodeInternal.h"
29 #import "ExceptionHandlers.h"
30 #import <WebCore/HTMLAppletElement.h>
31 #import <WebCore/HTMLNames.h>
32 #import <WebCore/JSExecState.h>
33 #import <WebCore/ThreadCheck.h>
34 #import <WebCore/WebScriptObjectPrivate.h>
35 #import <wtf/GetPtr.h>
36 #import <wtf/URL.h>
37
38 #define IMPL static_cast<WebCore::HTMLAppletElement*>(reinterpret_cast<WebCore::Node*>(_internal))
39
40 @implementation DOMHTMLAppletElement
41
42 - (NSString *)align
43 {
44     WebCore::JSMainThreadNullState state;
45     return IMPL->getAttribute(WebCore::HTMLNames::alignAttr);
46 }
47
48 - (void)setAlign:(NSString *)newAlign
49 {
50     WebCore::JSMainThreadNullState state;
51     IMPL->setAttributeWithoutSynchronization(WebCore::HTMLNames::alignAttr, newAlign);
52 }
53
54 - (NSString *)alt
55 {
56     WebCore::JSMainThreadNullState state;
57     return IMPL->getAttribute(WebCore::HTMLNames::altAttr);
58 }
59
60 - (void)setAlt:(NSString *)newAlt
61 {
62     WebCore::JSMainThreadNullState state;
63     IMPL->setAttributeWithoutSynchronization(WebCore::HTMLNames::altAttr, newAlt);
64 }
65
66 - (NSString *)archive
67 {
68     WebCore::JSMainThreadNullState state;
69     return IMPL->getAttribute(WebCore::HTMLNames::archiveAttr);
70 }
71
72 - (void)setArchive:(NSString *)newArchive
73 {
74     WebCore::JSMainThreadNullState state;
75     IMPL->setAttributeWithoutSynchronization(WebCore::HTMLNames::archiveAttr, newArchive);
76 }
77
78 - (NSString *)code
79 {
80     WebCore::JSMainThreadNullState state;
81     return IMPL->getAttribute(WebCore::HTMLNames::codeAttr);
82 }
83
84 - (void)setCode:(NSString *)newCode
85 {
86     WebCore::JSMainThreadNullState state;
87     IMPL->setAttributeWithoutSynchronization(WebCore::HTMLNames::codeAttr, newCode);
88 }
89
90 - (NSString *)codeBase
91 {
92     WebCore::JSMainThreadNullState state;
93     return IMPL->getAttribute(WebCore::HTMLNames::codebaseAttr);
94 }
95
96 - (void)setCodeBase:(NSString *)newCodeBase
97 {
98     WebCore::JSMainThreadNullState state;
99     IMPL->setAttributeWithoutSynchronization(WebCore::HTMLNames::codebaseAttr, newCodeBase);
100 }
101
102 - (NSString *)height
103 {
104     WebCore::JSMainThreadNullState state;
105     return IMPL->getAttribute(WebCore::HTMLNames::heightAttr);
106 }
107
108 - (void)setHeight:(NSString *)newHeight
109 {
110     WebCore::JSMainThreadNullState state;
111     IMPL->setAttributeWithoutSynchronization(WebCore::HTMLNames::heightAttr, newHeight);
112 }
113
114 - (int)hspace
115 {
116     WebCore::JSMainThreadNullState state;
117     return IMPL->getIntegralAttribute(WebCore::HTMLNames::hspaceAttr);
118 }
119
120 - (void)setHspace:(int)newHspace
121 {
122     WebCore::JSMainThreadNullState state;
123     IMPL->setIntegralAttribute(WebCore::HTMLNames::hspaceAttr, newHspace);
124 }
125
126 - (NSString *)name
127 {
128     WebCore::JSMainThreadNullState state;
129     return IMPL->getNameAttribute();
130 }
131
132 - (void)setName:(NSString *)newName
133 {
134     WebCore::JSMainThreadNullState state;
135     IMPL->setAttributeWithoutSynchronization(WebCore::HTMLNames::nameAttr, newName);
136 }
137
138 - (NSString *)object
139 {
140     WebCore::JSMainThreadNullState state;
141     return IMPL->getAttribute(WebCore::HTMLNames::objectAttr);
142 }
143
144 - (void)setObject:(NSString *)newObject
145 {
146     WebCore::JSMainThreadNullState state;
147     IMPL->setAttributeWithoutSynchronization(WebCore::HTMLNames::objectAttr, newObject);
148 }
149
150 - (int)vspace
151 {
152     WebCore::JSMainThreadNullState state;
153     return IMPL->getIntegralAttribute(WebCore::HTMLNames::vspaceAttr);
154 }
155
156 - (void)setVspace:(int)newVspace
157 {
158     WebCore::JSMainThreadNullState state;
159     IMPL->setIntegralAttribute(WebCore::HTMLNames::vspaceAttr, newVspace);
160 }
161
162 - (NSString *)width
163 {
164     WebCore::JSMainThreadNullState state;
165     return IMPL->getAttribute(WebCore::HTMLNames::widthAttr);
166 }
167
168 - (void)setWidth:(NSString *)newWidth
169 {
170     WebCore::JSMainThreadNullState state;
171     IMPL->setAttributeWithoutSynchronization(WebCore::HTMLNames::widthAttr, newWidth);
172 }
173
174 @end