diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-05-25 15:09:11 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-05-25 15:09:11 +0200 |
commit | a89b2ebb8e192c5e8cea21079bda2ee2c0c7dddd (patch) | |
tree | b7abd9f49ae1d4d2e426a5883bfccd42b8e2ee12 /Source/WebKit/qt/Api/qwebelement.cpp | |
parent | 8d473cf9743f1d30a16a27114e93bd5af5648d23 (diff) | |
download | qtwebkit-a89b2ebb8e192c5e8cea21079bda2ee2c0c7dddd.tar.gz |
Imported WebKit commit eb5c1b8fe4d4b1b90b5137433fc58a91da0e6878 (http://svn.webkit.org/repository/webkit/trunk@118516)
Diffstat (limited to 'Source/WebKit/qt/Api/qwebelement.cpp')
-rw-r--r-- | Source/WebKit/qt/Api/qwebelement.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
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<DocumentFragment> fragment = Range::createDocumentFragmentForElement(markup, toHTMLElement(m_element)); + RefPtr<DocumentFragment> 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<DocumentFragment> fragment = Range::createDocumentFragmentForElement(markup, toHTMLElement(m_element)); + RefPtr<DocumentFragment> 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<DocumentFragment> fragment = Range::createDocumentFragmentForElement(markup, toHTMLElement(parent)); + RefPtr<DocumentFragment> 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<DocumentFragment> fragment = Range::createDocumentFragmentForElement(markup, toHTMLElement(parent)); + RefPtr<DocumentFragment> 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<DocumentFragment> fragment = Range::createDocumentFragmentForElement(markup, toHTMLElement(m_element)); + RefPtr<DocumentFragment> 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<DocumentFragment> fragment = Range::createDocumentFragmentForElement(markup, toHTMLElement(parent)); + RefPtr<DocumentFragment> fragment = createContextualFragment(markup, toHTMLElement(parent), AllowScriptingContent); if (!fragment || !fragment->firstChild()) return; |