Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / core / dom / DOMImplementation.h
index 041ca94..faa1874 100644 (file)
@@ -40,14 +40,19 @@ class HTMLDocument;
 class KURL;
 class XMLDocument;
 
-class DOMImplementation : public ScriptWrappable {
-    WTF_MAKE_FAST_ALLOCATED;
+class DOMImplementation FINAL : public NoBaseWillBeGarbageCollectedFinalized<DOMImplementation>, public ScriptWrappable {
+    WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED;
 public:
-    static PassOwnPtr<DOMImplementation> create(Document& document) { return adoptPtr(new DOMImplementation(document)); }
-
-    void ref() { m_document.ref(); }
-    void deref() { m_document.deref(); }
-    Document& document() const { return m_document; }
+    static PassOwnPtrWillBeRawPtr<DOMImplementation> create(Document& document)
+    {
+        return adoptPtrWillBeNoop(new DOMImplementation(document));
+    }
+
+#if !ENABLE(OILPAN)
+    void ref() { m_document->ref(); }
+    void deref() { m_document->deref(); }
+#endif
+    Document& document() const { return *m_document; }
 
     // DOM methods & attributes for DOMImplementation
     static bool hasFeature(const String& feature, const String& version);
@@ -55,11 +60,6 @@ public:
     PassRefPtr<DocumentType> createDocumentType(const AtomicString& qualifiedName, const String& publicId, const String& systemId, ExceptionState&);
     PassRefPtr<XMLDocument> createDocument(const AtomicString& namespaceURI, const AtomicString& qualifiedName, DocumentType*, ExceptionState&);
 
-    DOMImplementation* getInterface(const String& feature);
-
-    // From the DOMImplementationCSS interface
-    static PassRefPtrWillBeRawPtr<CSSStyleSheet> createCSSStyleSheet(const String& title, const String& media);
-
     // From the HTMLDOMImplementation interface
     PassRefPtr<HTMLDocument> createHTMLDocument(const String& title);
 
@@ -71,10 +71,12 @@ public:
     static bool isTextMIMEType(const String&);
     static bool isJSONMIMEType(const String&);
 
+    void trace(Visitor*);
+
 private:
     explicit DOMImplementation(Document&);
 
-    Document& m_document;
+    RawPtrWillBeMember<Document> m_document;
 };
 
 } // namespace WebCore