|
1 /* |
|
2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. |
|
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 |
|
21 #include "config.h" |
|
22 #include "DOMImplementationFront.h" |
|
23 |
|
24 #include "CSSStyleSheet.h" |
|
25 #include "DocumentType.h" |
|
26 #include "DOMImplementation.h" |
|
27 #include "HTMLDocument.h" |
|
28 #include "JSDOMImplementation.h" |
|
29 |
|
30 namespace WebCore { |
|
31 |
|
32 DOMImplementationFront* implementationFront(Document* document) |
|
33 { |
|
34 return reinterpret_cast<DOMImplementationFront*>(document->implementation()); |
|
35 } |
|
36 |
|
37 DOMImplementationFront* implementationFront(JSDOMImplementation* wrapper) |
|
38 { |
|
39 return reinterpret_cast<DOMImplementationFront*>(wrapper->impl()); |
|
40 } |
|
41 |
|
42 void DOMImplementationFront::ref() |
|
43 { |
|
44 reinterpret_cast<DOMImplementation*>(this)->ref(); |
|
45 } |
|
46 |
|
47 void DOMImplementationFront::deref() |
|
48 { |
|
49 reinterpret_cast<DOMImplementation*>(this)->deref(); |
|
50 } |
|
51 |
|
52 bool DOMImplementationFront::hasFeature(const String& feature, const String& version) const |
|
53 { |
|
54 return reinterpret_cast<const DOMImplementation*>(this)->hasFeature(feature, version); |
|
55 } |
|
56 |
|
57 PassRefPtr<DocumentType> DOMImplementationFront::createDocumentType(const String& qualifiedName, const String& publicId, const String& systemId, ExceptionCode& ec) |
|
58 { |
|
59 return reinterpret_cast<DOMImplementation*>(this)->createDocumentType(qualifiedName, publicId, systemId, ec); |
|
60 } |
|
61 |
|
62 PassRefPtr<Document> DOMImplementationFront::createDocument(const String& namespaceURI, const String& qualifiedName, DocumentType* type, ExceptionCode& ec) |
|
63 { |
|
64 return reinterpret_cast<DOMImplementation*>(this)->createDocument(namespaceURI, qualifiedName, type, ec); |
|
65 } |
|
66 |
|
67 DOMImplementationFront* DOMImplementationFront::getInterface(const String& feature) |
|
68 { |
|
69 return reinterpret_cast<DOMImplementationFront*>(reinterpret_cast<DOMImplementation*>(this)->getInterface(feature)); |
|
70 } |
|
71 |
|
72 PassRefPtr<CSSStyleSheet> DOMImplementationFront::createCSSStyleSheet(const String& title, const String& media, ExceptionCode& ec) |
|
73 { |
|
74 return reinterpret_cast<DOMImplementation*>(this)->createCSSStyleSheet(title, media, ec); |
|
75 } |
|
76 |
|
77 PassRefPtr<HTMLDocument> DOMImplementationFront::createHTMLDocument(const String& title) |
|
78 { |
|
79 return reinterpret_cast<DOMImplementation*>(this)->createHTMLDocument(title); |
|
80 } |
|
81 |
|
82 } //namespace |