From a89b2ebb8e192c5e8cea21079bda2ee2c0c7dddd Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Fri, 25 May 2012 15:09:11 +0200 Subject: Imported WebKit commit eb5c1b8fe4d4b1b90b5137433fc58a91da0e6878 (http://svn.webkit.org/repository/webkit/trunk@118516) --- Source/WebKit/qt/Api/qwebelement.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'Source/WebKit/qt/Api/qwebelement.cpp') diff --git a/Source/WebKit/qt/Api/qwebelement.cpp b/Source/WebKit/qt/Api/qwebelement.cpp index fb9be7892..1d020e11c 100644 --- a/Source/WebKit/qt/Api/qwebelement.cpp +++ b/Source/WebKit/qt/Api/qwebelement.cpp @@ -51,6 +51,7 @@ #include "ScriptState.h" #include "StaticNodeList.h" #include "StyleResolver.h" +#include "markup.h" #include "qwebframe.h" #include "qwebframe_p.h" #if USE(JSC) @@ -1010,7 +1011,7 @@ void QWebElement::appendInside(const QString &markup) if (!m_element->isHTMLElement()) return; - RefPtr fragment = Range::createDocumentFragmentForElement(markup, toHTMLElement(m_element)); + RefPtr fragment = createContextualFragment(markup, toHTMLElement(m_element), AllowScriptingContent); ExceptionCode exception = 0; m_element->appendChild(fragment, exception); @@ -1055,7 +1056,7 @@ void QWebElement::prependInside(const QString &markup) if (!m_element->isHTMLElement()) return; - RefPtr fragment = Range::createDocumentFragmentForElement(markup, toHTMLElement(m_element)); + RefPtr fragment = createContextualFragment(markup, toHTMLElement(m_element), AllowScriptingContent); ExceptionCode exception = 0; @@ -1107,7 +1108,7 @@ void QWebElement::prependOutside(const QString &markup) if (!parent->isHTMLElement()) return; - RefPtr fragment = Range::createDocumentFragmentForElement(markup, toHTMLElement(parent)); + RefPtr fragment = createContextualFragment(markup, toHTMLElement(parent), AllowScriptingContent); ExceptionCode exception = 0; parent->insertBefore(fragment, m_element, exception); @@ -1157,7 +1158,7 @@ void QWebElement::appendOutside(const QString &markup) if (!parent->isHTMLElement()) return; - RefPtr fragment = Range::createDocumentFragmentForElement(markup, toHTMLElement(parent)); + RefPtr fragment = createContextualFragment(markup, toHTMLElement(parent), AllowScriptingContent); ExceptionCode exception = 0; if (!m_element->nextSibling()) @@ -1303,7 +1304,7 @@ void QWebElement::encloseContentsWith(const QString &markup) if (!m_element->isHTMLElement()) return; - RefPtr fragment = Range::createDocumentFragmentForElement(markup, toHTMLElement(m_element)); + RefPtr fragment = createContextualFragment(markup, toHTMLElement(m_element), AllowScriptingContent); if (!fragment || !fragment->firstChild()) return; @@ -1378,7 +1379,7 @@ void QWebElement::encloseWith(const QString &markup) if (!parent->isHTMLElement()) return; - RefPtr fragment = Range::createDocumentFragmentForElement(markup, toHTMLElement(parent)); + RefPtr fragment = createContextualFragment(markup, toHTMLElement(parent), AllowScriptingContent); if (!fragment || !fragment->firstChild()) return; -- cgit v1.2.1