diff options
| author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-05-27 21:51:42 +0200 |
|---|---|---|
| committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-05-27 21:51:42 +0200 |
| commit | be01689f43cf6882cf670d33df49ead1f570c53a (patch) | |
| tree | 4bb2161d8983b38e3e7ed37b4a50303bfd5e2e85 /Source/WebCore/html/HTMLElement.cpp | |
| parent | a89b2ebb8e192c5e8cea21079bda2ee2c0c7dddd (diff) | |
| download | qtwebkit-be01689f43cf6882cf670d33df49ead1f570c53a.tar.gz | |
Imported WebKit commit 8d6c5efc74f0222dfc7bcce8d845d4a2707ed9e6 (http://svn.webkit.org/repository/webkit/trunk@118629)
Diffstat (limited to 'Source/WebCore/html/HTMLElement.cpp')
| -rw-r--r-- | Source/WebCore/html/HTMLElement.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Source/WebCore/html/HTMLElement.cpp b/Source/WebCore/html/HTMLElement.cpp index b420c342b..3d4ee8d29 100644 --- a/Source/WebCore/html/HTMLElement.cpp +++ b/Source/WebCore/html/HTMLElement.cpp @@ -342,7 +342,7 @@ String HTMLElement::outerHTML() const void HTMLElement::setInnerHTML(const String& html, ExceptionCode& ec) { - if (RefPtr<DocumentFragment> fragment = createFragmentForInnerOuterHTML(html, this, ec)) + if (RefPtr<DocumentFragment> fragment = createFragmentForInnerOuterHTML(html, this, AllowScriptingContent, ec)) replaceChildrenWithFragment(this, fragment.release(), ec); } @@ -373,7 +373,7 @@ void HTMLElement::setOuterHTML(const String& html, ExceptionCode& ec) RefPtr<Node> prev = previousSibling(); RefPtr<Node> next = nextSibling(); - RefPtr<DocumentFragment> fragment = createFragmentForInnerOuterHTML(html, parent.get(), ec); + RefPtr<DocumentFragment> fragment = createFragmentForInnerOuterHTML(html, parent.get(), AllowScriptingContent, ec); if (ec) return; @@ -578,9 +578,8 @@ void HTMLElement::insertAdjacentHTML(const String& where, const String& markup, Element* contextElement = contextElementForInsertion(where, this, ec); if (!contextElement) return; - ExceptionCode ignoredEc = 0; // FIXME: We should propagate a syntax error exception out here. - RefPtr<DocumentFragment> fragment = createFragmentForInnerOuterHTML(markup, this, ignoredEc); - if (ignoredEc) + RefPtr<DocumentFragment> fragment = createFragmentForInnerOuterHTML(markup, this, AllowScriptingContent, ec); + if (!fragment) return; insertAdjacent(where, fragment.get(), ec); } |
