1 /* 2 * Copyright (C) 2006, 2008 Apple Inc. All rights reserved. 3 * Copyright (C) 2006 Samuel Weinig <sam.weinig (at) gmail.com> 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 22 #ifndef DOMImplementationFront_h 23 #define DOMImplementationFront_h 24 25 // FIXME: This source file exists to work around a problem that occurs trying 26 // to mix DOMImplementation and WebCore::DOMImplementation in DOM.mm. 27 // It seems to affect only older versions of gcc. Once the buildbot is upgraded, 28 // we should consider increasing the minimum required version of gcc to build 29 // WebCore, and rolling the change that introduced this file back. 30 31 #include <wtf/Forward.h> 32 33 namespace WebCore { 34 35 class CSSStyleSheet; 36 class Document; 37 class DocumentType; 38 class HTMLDocument; 39 class JSDOMImplementation; 40 41 typedef int ExceptionCode; 42 43 class DOMImplementationFront { 44 public: 45 void ref(); 46 void deref(); 47 bool hasFeature(const String& feature, const String& version) const; 48 PassRefPtr<DocumentType> createDocumentType(const String& qualifiedName, const String& publicId, const String& systemId, ExceptionCode&); 49 PassRefPtr<Document> createDocument(const String& namespaceURI, const String& qualifiedName, DocumentType*, ExceptionCode&); 50 DOMImplementationFront* getInterface(const String& feature); 51 PassRefPtr<CSSStyleSheet> createCSSStyleSheet(const String& title, const String& media, ExceptionCode&); 52 PassRefPtr<HTMLDocument> createHTMLDocument(const String& title); 53 }; 54 55 DOMImplementationFront* implementationFront(Document*); 56 DOMImplementationFront* implementationFront(JSDOMImplementation*); 57 58 } // namespace WebCore 59 60 #endif // DOMImplementationFront_h 61