Commit da28d259 authored by kenneth@webkit.org's avatar kenneth@webkit.org

2009-08-25 Antonio Gomes <antonio.gomes@openbossa.org>

        Reviewed by Ariya Hidayat.

        Bug 28708 - Make possible to better use ResourceError in FrameLoaderClientQt class.

        * Api/qwebframe.cpp:
        (QWebFrame::requestedUrl):
        * WebCoreSupport/FrameLoaderClientQt.cpp:
        (WebCore::FrameLoaderClientQt::FrameLoaderClientQt):
        (WebCore::FrameLoaderClientQt::dispatchDidFinishLoad):
        (WebCore::FrameLoaderClientQt::postProgressFinishedNotification):
        (WebCore::FrameLoaderClientQt::dispatchDidFailProvisionalLoad):
        (WebCore::FrameLoaderClientQt::dispatchDidFailLoad):
        * WebCoreSupport/FrameLoaderClientQt.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47746 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 77eb8cba
......@@ -542,7 +542,7 @@ QUrl QWebFrame::requestedUrl() const
// 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());
......
2009-08-25 Antonio Gomes <antonio.gomes@openbossa.org>
Reviewed by Ariya Hidayat.
Bug 28708 - Make possible to better use ResourceError in FrameLoaderClientQt class.
* Api/qwebframe.cpp:
(QWebFrame::requestedUrl):
* WebCoreSupport/FrameLoaderClientQt.cpp:
(WebCore::FrameLoaderClientQt::FrameLoaderClientQt):
(WebCore::FrameLoaderClientQt::dispatchDidFinishLoad):
(WebCore::FrameLoaderClientQt::postProgressFinishedNotification):
(WebCore::FrameLoaderClientQt::dispatchDidFailProvisionalLoad):
(WebCore::FrameLoaderClientQt::dispatchDidFailLoad):
* WebCoreSupport/FrameLoaderClientQt.h:
2009-08-22 Adam Barth <abarth@webkit.org>
Revert 47684. We're going to do this later once clients have had a
......
......@@ -144,7 +144,7 @@ FrameLoaderClientQt::FrameLoaderClientQt()
, m_pluginView(0)
, m_hasSentResponseToPlugin(false)
, m_firstData(false)
, m_loadSucceeded(false)
, m_loadError (ResourceError())
{
}
......@@ -376,7 +376,7 @@ void FrameLoaderClientQt::dispatchDidFinishLoad()
if (dumpFrameLoaderCallbacks)
printf("%s - didFinishLoadForFrame\n", qPrintable(drtDescriptionSuitableForTestResult(m_frame)));
m_loadSucceeded = true;
m_loadError = ResourceError(); // clears the previous error
if (!m_webFrame)
return;
......@@ -461,7 +461,7 @@ void FrameLoaderClientQt::postProgressFinishedNotification()
}
if (m_webFrame && m_frame->page())
emit loadFinished(m_loadSucceeded);
emit loadFinished(m_loadError.isNull());
}
void FrameLoaderClientQt::setMainFrameDocumentReady(bool b)
......@@ -850,20 +850,20 @@ void FrameLoaderClientQt::dispatchDidLoadResourceByXMLHttpRequest(unsigned long,
notImplemented();
}
void FrameLoaderClientQt::dispatchDidFailProvisionalLoad(const WebCore::ResourceError&)
void FrameLoaderClientQt::dispatchDidFailProvisionalLoad(const WebCore::ResourceError& error)
{
if (dumpFrameLoaderCallbacks)
printf("%s - didFailProvisionalLoadWithError\n", qPrintable(drtDescriptionSuitableForTestResult(m_frame)));
m_loadSucceeded = false;
m_loadError = error;
}
void FrameLoaderClientQt::dispatchDidFailLoad(const WebCore::ResourceError&)
void FrameLoaderClientQt::dispatchDidFailLoad(const WebCore::ResourceError& error)
{
if (dumpFrameLoaderCallbacks)
printf("%s - didFailLoadWithError\n", qPrintable(drtDescriptionSuitableForTestResult(m_frame)));
m_loadSucceeded = false;
m_loadError = error;
}
WebCore::Frame* FrameLoaderClientQt::dispatchCreatePage()
......
......@@ -211,7 +211,7 @@ namespace WebCore {
WebCore::PluginView* m_pluginView;
bool m_hasSentResponseToPlugin;
bool m_loadSucceeded;
ResourceError m_loadError;
};
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment