[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

jhoneycutt at apple.com jhoneycutt at apple.com
Thu Apr 8 02:06:16 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 38db597800a2b0cc7c39307df36b1cd2dfbd44f5
Author: jhoneycutt at apple.com <jhoneycutt at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Mar 2 04:14:39 2010 +0000

    Some WebKit DOMNode API is unimplemented.
    https://bugs.webkit.org/show_bug.cgi?id=35554
    
    Reviewed by Alice Liu.
    
    * DOMCoreClasses.cpp:
    (DOMNode::nextSibling):
    Create a DOMNode to wrap m_node's next sibling, and assign it to the
    out param 'result'.
    (DOMNode::insertBefore):
    Query for the DOMNode for newChild, and return early if we fail. Query
    refChild for DOMNode. Call insertBefore(), passing the newChild's
    WebCore node and refChild's WebCore node (if refChild is non-null). If
    we successfully insert the child, fill the result out param with
    newChild, ref it, and return S_OK. Otherwise, return E_FAIL.
    (DOMNode::removeChild):
    Query oldChild for DOMNode. If we fail, return E_FAIL. Call
    removeChild(), passing the node's WebCore node. If this fails, return
    E_FAIL. Otherwise, fill the result out param with oldChild, ref it, and
    return S_OK.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55398 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/win/ChangeLog b/WebKit/win/ChangeLog
index 70b3155..525b5bd 100644
--- a/WebKit/win/ChangeLog
+++ b/WebKit/win/ChangeLog
@@ -1,3 +1,26 @@
+2010-03-01  Jon Honeycutt  <jhoneycutt at apple.com>
+
+        Some WebKit DOMNode API is unimplemented.
+        https://bugs.webkit.org/show_bug.cgi?id=35554
+
+        Reviewed by Alice Liu.
+
+        * DOMCoreClasses.cpp:
+        (DOMNode::nextSibling):
+        Create a DOMNode to wrap m_node's next sibling, and assign it to the
+        out param 'result'.
+        (DOMNode::insertBefore):
+        Query for the DOMNode for newChild, and return early if we fail. Query
+        refChild for DOMNode. Call insertBefore(), passing the newChild's
+        WebCore node and refChild's WebCore node (if refChild is non-null). If
+        we successfully insert the child, fill the result out param with
+        newChild, ref it, and return S_OK. Otherwise, return E_FAIL.
+        (DOMNode::removeChild):
+        Query oldChild for DOMNode. If we fail, return E_FAIL. Call
+        removeChild(), passing the node's WebCore node. If this fails, return
+        E_FAIL. Otherwise, fill the result out param with oldChild, ref it, and
+        return S_OK.
+
 2010-03-01  Jakob Petsovits  <jpetsovits at rim.com>
 
         Reviewed by Adam Barth.
diff --git a/WebKit/win/DOMCoreClasses.cpp b/WebKit/win/DOMCoreClasses.cpp
index 8ea7c84..3a979fa 100644
--- a/WebKit/win/DOMCoreClasses.cpp
+++ b/WebKit/win/DOMCoreClasses.cpp
@@ -184,10 +184,15 @@ HRESULT STDMETHODCALLTYPE DOMNode::previousSibling(
 }
 
 HRESULT STDMETHODCALLTYPE DOMNode::nextSibling( 
-    /* [retval][out] */ IDOMNode** /*result*/)
+    /* [retval][out] */ IDOMNode** result)
 {
-    ASSERT_NOT_REACHED();
-    return E_NOTIMPL;
+    if (!result)
+        return E_POINTER;
+    *result = 0;
+    if (!m_node)
+        return E_FAIL;
+    *result = DOMNode::createInstance(m_node->nextSibling());
+    return *result ? S_OK : E_FAIL;
 }
 
 HRESULT STDMETHODCALLTYPE DOMNode::attributes( 
@@ -210,12 +215,31 @@ HRESULT STDMETHODCALLTYPE DOMNode::ownerDocument(
 }
 
 HRESULT STDMETHODCALLTYPE DOMNode::insertBefore( 
-    /* [in] */ IDOMNode* /*newChild*/,
-    /* [in] */ IDOMNode* /*refChild*/,
-    /* [retval][out] */ IDOMNode** /*result*/)
+    /* [in] */ IDOMNode* newChild,
+    /* [in] */ IDOMNode* refChild,
+    /* [retval][out] */ IDOMNode** result)
 {
-    ASSERT_NOT_REACHED();
-    return E_NOTIMPL;
+    if (!result)
+        return E_POINTER;
+
+    *result = 0;
+
+    if (!m_node)
+        return E_FAIL;
+
+    COMPtr<DOMNode> newChildNode(Query, newChild);
+    if (!newChildNode)
+        return E_FAIL;
+
+    COMPtr<DOMNode> refChildNode(Query, refChild);
+
+    ExceptionCode ec;
+    if (!m_node->insertBefore(newChildNode->node(), refChildNode ? refChildNode->node() : 0, ec))
+        return E_FAIL;
+
+    *result = newChild;
+    (*result)->AddRef();
+    return S_OK;
 }
 
 HRESULT STDMETHODCALLTYPE DOMNode::replaceChild( 
@@ -228,11 +252,28 @@ HRESULT STDMETHODCALLTYPE DOMNode::replaceChild(
 }
 
 HRESULT STDMETHODCALLTYPE DOMNode::removeChild( 
-    /* [in] */ IDOMNode* /*oldChild*/,
-    /* [retval][out] */ IDOMNode** /*result*/)
+    /* [in] */ IDOMNode* oldChild,
+    /* [retval][out] */ IDOMNode** result)
 {
-    ASSERT_NOT_REACHED();
-    return E_NOTIMPL;
+    if (!result)
+        return E_POINTER;
+
+    *result = 0;
+
+    if (!m_node)
+        return E_FAIL;
+
+    COMPtr<DOMNode> oldChildNode(Query, oldChild);
+    if (!oldChildNode)
+        return E_FAIL;
+
+    ExceptionCode ec;
+    if (!m_node->removeChild(oldChildNode->node(), ec))
+        return E_FAIL;
+
+    *result = oldChild;
+    (*result)->AddRef();
+    return S_OK;
 }
 
 HRESULT STDMETHODCALLTYPE DOMNode::appendChild( 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list