[Win] Implement some methods in DOMHTMLDocument interface.
authorpeavo@outlook.com <peavo@outlook.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 10 Apr 2015 18:07:05 +0000 (18:07 +0000)
committerpeavo@outlook.com <peavo@outlook.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 10 Apr 2015 18:07:05 +0000 (18:07 +0000)
https://bugs.webkit.org/show_bug.cgi?id=143602

Reviewed by Alex Christensen.

* DOMHTMLClasses.cpp:
(DOMHTMLDocument::open):
(DOMHTMLDocument::close):
(DOMHTMLDocument::write):
(DOMHTMLDocument::writeln):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@182632 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/win/ChangeLog
Source/WebKit/win/DOMHTMLClasses.cpp

index a55f0d5..13c02b6 100644 (file)
@@ -1,3 +1,16 @@
+2015-04-10  Per Arne Vollan  <peavo@outlook.com>
+
+        [Win] Implement some methods in DOMHTMLDocument interface.
+        https://bugs.webkit.org/show_bug.cgi?id=143602
+
+        Reviewed by Alex Christensen.
+
+        * DOMHTMLClasses.cpp:
+        (DOMHTMLDocument::open):
+        (DOMHTMLDocument::close):
+        (DOMHTMLDocument::write):
+        (DOMHTMLDocument::writeln):
+
 2015-04-09  Chris Dumez  <cdumez@apple.com>
 
         [WK2][iOS] editorState() should not cause a synchronous layout
index 0bee641..68556e1 100644 (file)
@@ -332,28 +332,40 @@ HRESULT STDMETHODCALLTYPE DOMHTMLDocument::setCookie(
     
 HRESULT STDMETHODCALLTYPE DOMHTMLDocument::open( void)
 {
-    ASSERT_NOT_REACHED();
-    return E_NOTIMPL;
+    if (!m_document)
+        return E_FAIL;
+
+    m_document->open();
+    return S_OK;
 }
     
 HRESULT STDMETHODCALLTYPE DOMHTMLDocument::close( void)
 {
-    ASSERT_NOT_REACHED();
-    return E_NOTIMPL;
+    if (!m_document)
+        return E_FAIL;
+
+    m_document->close();
+    return S_OK;
 }
     
-HRESULT STDMETHODCALLTYPE DOMHTMLDocument::write( 
-        /* [in] */ BSTR /*text*/)
+HRESULT STDMETHODCALLTYPE DOMHTMLDocument::write(/* [in] */ BSTR text)
 {
-    ASSERT_NOT_REACHED();
-    return E_NOTIMPL;
+    if (!m_document)
+        return E_FAIL;
+
+    String string(text);
+    m_document->write(string);
+    return S_OK;
 }
     
-HRESULT STDMETHODCALLTYPE DOMHTMLDocument::writeln( 
-        /* [in] */ BSTR /*text*/)
+HRESULT STDMETHODCALLTYPE DOMHTMLDocument::writeln(/* [in] */ BSTR text)
 {
-    ASSERT_NOT_REACHED();
-    return E_NOTIMPL;
+    if (!m_document)
+        return E_FAIL;
+
+    String string(text);
+    m_document->writeln(string);
+    return S_OK;
 }
     
 HRESULT STDMETHODCALLTYPE DOMHTMLDocument::getElementById_(