summaryrefslogtreecommitdiff
path: root/Source/WebKit/qt/Api/qwebelement.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-05-27 21:51:42 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-05-27 21:51:42 +0200
commitbe01689f43cf6882cf670d33df49ead1f570c53a (patch)
tree4bb2161d8983b38e3e7ed37b4a50303bfd5e2e85 /Source/WebKit/qt/Api/qwebelement.cpp
parenta89b2ebb8e192c5e8cea21079bda2ee2c0c7dddd (diff)
downloadqtwebkit-be01689f43cf6882cf670d33df49ead1f570c53a.tar.gz
Imported WebKit commit 8d6c5efc74f0222dfc7bcce8d845d4a2707ed9e6 (http://svn.webkit.org/repository/webkit/trunk@118629)
Diffstat (limited to 'Source/WebKit/qt/Api/qwebelement.cpp')
-rw-r--r--Source/WebKit/qt/Api/qwebelement.cpp24
1 files changed, 11 insertions, 13 deletions
diff --git a/Source/WebKit/qt/Api/qwebelement.cpp b/Source/WebKit/qt/Api/qwebelement.cpp
index 1d020e11c..bdf204b14 100644
--- a/Source/WebKit/qt/Api/qwebelement.cpp
+++ b/Source/WebKit/qt/Api/qwebelement.cpp
@@ -1011,9 +1011,9 @@ void QWebElement::appendInside(const QString &markup)
if (!m_element->isHTMLElement())
return;
- RefPtr<DocumentFragment> fragment = createContextualFragment(markup, toHTMLElement(m_element), AllowScriptingContent);
-
ExceptionCode exception = 0;
+ RefPtr<DocumentFragment> fragment = createContextualFragment(markup, toHTMLElement(m_element), AllowScriptingContent, exception);
+
m_element->appendChild(fragment, exception);
}
@@ -1056,9 +1056,8 @@ void QWebElement::prependInside(const QString &markup)
if (!m_element->isHTMLElement())
return;
- RefPtr<DocumentFragment> fragment = createContextualFragment(markup, toHTMLElement(m_element), AllowScriptingContent);
-
ExceptionCode exception = 0;
+ RefPtr<DocumentFragment> fragment = createContextualFragment(markup, toHTMLElement(m_element), AllowScriptingContent, exception);
if (m_element->hasChildNodes())
m_element->insertBefore(fragment, m_element->firstChild(), exception);
@@ -1108,9 +1107,9 @@ void QWebElement::prependOutside(const QString &markup)
if (!parent->isHTMLElement())
return;
- RefPtr<DocumentFragment> fragment = createContextualFragment(markup, toHTMLElement(parent), AllowScriptingContent);
-
ExceptionCode exception = 0;
+ RefPtr<DocumentFragment> fragment = createContextualFragment(markup, toHTMLElement(parent), AllowScriptingContent, exception);
+
parent->insertBefore(fragment, m_element, exception);
}
@@ -1158,9 +1157,9 @@ void QWebElement::appendOutside(const QString &markup)
if (!parent->isHTMLElement())
return;
- RefPtr<DocumentFragment> fragment = createContextualFragment(markup, toHTMLElement(parent), AllowScriptingContent);
-
ExceptionCode exception = 0;
+ RefPtr<DocumentFragment> fragment = createContextualFragment(markup, toHTMLElement(parent), AllowScriptingContent, exception);
+
if (!m_element->nextSibling())
parent->appendChild(fragment, exception);
else
@@ -1304,7 +1303,8 @@ void QWebElement::encloseContentsWith(const QString &markup)
if (!m_element->isHTMLElement())
return;
- RefPtr<DocumentFragment> fragment = createContextualFragment(markup, toHTMLElement(m_element), AllowScriptingContent);
+ ExceptionCode exception = 0;
+ RefPtr<DocumentFragment> fragment = createContextualFragment(markup, toHTMLElement(m_element), AllowScriptingContent, exception);
if (!fragment || !fragment->firstChild())
return;
@@ -1314,8 +1314,6 @@ void QWebElement::encloseContentsWith(const QString &markup)
if (!insertionPoint)
return;
- ExceptionCode exception = 0;
-
// reparent children
for (RefPtr<Node> child = m_element->firstChild(); child;) {
RefPtr<Node> next = child->nextSibling();
@@ -1379,7 +1377,8 @@ void QWebElement::encloseWith(const QString &markup)
if (!parent->isHTMLElement())
return;
- RefPtr<DocumentFragment> fragment = createContextualFragment(markup, toHTMLElement(parent), AllowScriptingContent);
+ ExceptionCode exception = 0;
+ RefPtr<DocumentFragment> fragment = createContextualFragment(markup, toHTMLElement(parent), AllowScriptingContent, exception);
if (!fragment || !fragment->firstChild())
return;
@@ -1395,7 +1394,6 @@ void QWebElement::encloseWith(const QString &markup)
// we no longer have access to the nodes it contained.
Node* siblingNode = m_element->nextSibling();
- ExceptionCode exception = 0;
insertionPoint->appendChild(m_element, exception);
if (!siblingNode)