• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
implementationFront(Document * document)32 DOMImplementationFront* implementationFront(Document* document)
33 {
34     return reinterpret_cast<DOMImplementationFront*>(document->implementation());
35 }
36 
implementationFront(JSDOMImplementation * wrapper)37 DOMImplementationFront* implementationFront(JSDOMImplementation* wrapper)
38 {
39     return reinterpret_cast<DOMImplementationFront*>(wrapper->impl());
40 }
41 
ref()42 void DOMImplementationFront::ref()
43 {
44     reinterpret_cast<DOMImplementation*>(this)->ref();
45 }
46 
deref()47 void DOMImplementationFront::deref()
48 {
49     reinterpret_cast<DOMImplementation*>(this)->deref();
50 }
51 
hasFeature(const String & feature,const String & version) const52 bool DOMImplementationFront::hasFeature(const String& feature, const String& version) const
53 {
54     return reinterpret_cast<const DOMImplementation*>(this)->hasFeature(feature, version);
55 }
56 
createDocumentType(const String & qualifiedName,const String & publicId,const String & systemId,ExceptionCode & ec)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 
createDocument(const String & namespaceURI,const String & qualifiedName,DocumentType * type,ExceptionCode & ec)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 
getInterface(const String & feature)67 DOMImplementationFront* DOMImplementationFront::getInterface(const String& feature)
68 {
69     return reinterpret_cast<DOMImplementationFront*>(reinterpret_cast<DOMImplementation*>(this)->getInterface(feature));
70 }
71 
createCSSStyleSheet(const String & title,const String & media,ExceptionCode & ec)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 
createHTMLDocument(const String & title)77 PassRefPtr<HTMLDocument> DOMImplementationFront::createHTMLDocument(const String& title)
78 {
79     return reinterpret_cast<DOMImplementation*>(this)->createHTMLDocument(title);
80 }
81 
82 } //namespace
83