Reviewed by hyatt.
authorvicki <vicki@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 21 Apr 2005 16:02:24 +0000 (16:02 +0000)
committervicki <vicki@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 21 Apr 2005 16:02:24 +0000 (16:02 +0000)
- fixed <rdar://problem/4065447> support outerHTML on IMG elements

        * khtml/html/html_elementimpl.cpp:
        (HTMLElementImpl::setOuterHTML):

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

WebCore/ChangeLog-2005-08-23
WebCore/khtml/html/html_elementimpl.cpp

index d78ed7453c67de6db97364eabc326c38c12e225e..083c4bdbb59aa3b71231bf6674ac8b2d1cc2d0b7 100644 (file)
@@ -1,3 +1,12 @@
+2005-04-20  Vicki Murley  <vicki@apple.com>
+
+        Reviewed by hyatt.
+
+       - fixed <rdar://problem/4065447> support outerHTML on IMG elements
+
+        * khtml/html/html_elementimpl.cpp:
+        (HTMLElementImpl::setOuterHTML):
+
 2005-04-18  David Hyatt  <hyatt@apple.com>
 
        Fix min-height so that when it resolves to auto it does not use the box's intrinsic height.
index bfe4b94c0bbaf9fe4ab497e31511fed7af83a1c4..36941e1fa083773d60474b26dba794b3f1a2a437 100644 (file)
@@ -847,7 +847,12 @@ bool HTMLElementImpl::setInnerHTML( const DOMString &html )
 
 bool HTMLElementImpl::setOuterHTML( const DOMString &html )
 {
-    DocumentFragmentImpl *fragment = createContextualFragment( html );
+    NodeImpl *p = parent();
+    if (!p->isHTMLElement())
+        return false;
+    HTMLElementImpl *parent = static_cast<HTMLElementImpl *>(p);
+    DocumentFragmentImpl *fragment = parent->createContextualFragment( html );
+
     if (fragment == NULL) {
        return false;
     }