From 8972f99ed6c9f97d059a0c9f8f642545286648e6 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Fri, 18 Sep 2009 16:43:27 +0200 Subject: Fix up these QtWebKit files after the merge from 4.6. I should've used checkout --theirs src/3rdparty/webkit after the merge, instead of permitting git's auto-merge for these files. Reviewed-by: Paul --- src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp | 12 +++++++----- .../webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp | 2 -- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp index 41e73fc..fe813b8 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp @@ -540,8 +540,12 @@ QUrl QWebFrame::url() const */ QUrl QWebFrame::requestedUrl() const { + // In the following edge cases (where the failing document + // loader does not get commited by the frame loader) it is + // safer to rely on outgoingReferrer than originalRequest. if (!d->frame->loader()->activeDocumentLoader() - || !d->frameLoaderClient->m_loadSucceeded) + || (!d->frameLoaderClient->m_loadError.isNull() + && !d->frame->loader()->outgoingReferrer().isEmpty())) return QUrl(d->frame->loader()->outgoingReferrer()); return d->frame->loader()->originalRequest().url(); @@ -799,13 +803,11 @@ void QWebFrame::setScrollBarPolicy(Qt::Orientation orientation, Qt::ScrollBarPol d->horizontalScrollBarPolicy = policy; if (d->frame->view()) { d->frame->view()->setHorizontalScrollbarMode((ScrollbarMode)policy); - d->frame->view()->updateDefaultScrollbarState(); } } else { d->verticalScrollBarPolicy = policy; if (d->frame->view()) { d->frame->view()->setVerticalScrollbarMode((ScrollbarMode)policy); - d->frame->view()->updateDefaultScrollbarState(); } } } @@ -1023,7 +1025,7 @@ qreal QWebFrame::zoomFactor() const bool QWebFrame::hasFocus() const { WebCore::Frame* ff = d->frame->page()->focusController()->focusedFrame(); - return QWebFramePrivate::kit(ff) == this; + return ff && QWebFramePrivate::kit(ff) == this; } /*! @@ -1245,7 +1247,7 @@ QVariant QWebFrame::evaluateJavaScript(const QString& scriptSource) ScriptController *proxy = d->frame->script(); QVariant rc; if (proxy) { - JSC::JSValue v = proxy->evaluate(ScriptSourceCode(scriptSource)).jsValue(); + JSC::JSValue v = d->frame->loader()->executeScript(ScriptSourceCode(scriptSource)).jsValue(); int distance = 0; rc = JSC::Bindings::convertValueToQVariant(proxy->globalObject()->globalExec(), v, QMetaType::Void, &distance); } diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp index 9023047..c575137 100644 --- a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp +++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp @@ -116,8 +116,6 @@ private slots: void consoleOutput(); - void consoleOutput(); - private: -- cgit v0.12