diff options
Diffstat (limited to 'Source/WebKit/qt/Api')
-rw-r--r-- | Source/WebKit/qt/Api/qwebelement.cpp | 24 | ||||
-rw-r--r-- | Source/WebKit/qt/Api/qwebpage.cpp | 2 |
2 files changed, 12 insertions, 14 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) diff --git a/Source/WebKit/qt/Api/qwebpage.cpp b/Source/WebKit/qt/Api/qwebpage.cpp index 9e84eeeab..d9b00773b 100644 --- a/Source/WebKit/qt/Api/qwebpage.cpp +++ b/Source/WebKit/qt/Api/qwebpage.cpp @@ -2143,7 +2143,7 @@ bool QWebPage::javaScriptPrompt(QWebFrame *frame, const QString& msg, const QStr // double the &'s because single & will underline the following character // (Accelerator mnemonics) QString escMsg(msg); - escMsg.replace(QChar::fromAscii('&'), QString::fromAscii("&&")); + escMsg.replace(QChar::fromLatin1('&'), QLatin1String("&&")); dlg.setLabelText(escMsg); dlg.setTextEchoMode(QLineEdit::Normal); |