DOMImplementationFront.cpp 2.9 KB

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