Changeset 61857 in webkit


Ignore:
Timestamp:
Jun 25, 2010 6:13:04 AM (14 years ago)
Author:
commit-queue@webkit.org
Message:

2010-06-25 Lucas De Marchi <lucas.demarchi@profusion.mobi>

Reviewed by Kenneth Rohde Christiansen.

[EFL] Do not load error message for download and cancellation.
When a download is made or a request is cancelled an error page should
not be shown.
https://bugs.webkit.org/show_bug.cgi?id=40956

  • efl/WebCoreSupport/FrameLoaderClientEfl.cpp: (WebCore::FrameLoaderClientEfl::dispatchDidFailLoading): return if it should not fallback. (WebCore::FrameLoaderClientEfl::dispatchDidFailLoad): return if it should not fallback. (WebCore::FrameLoaderClientEfl::interruptForPolicyChangeError): fix typo in related error message. (WebCore::FrameLoaderClientEfl::shouldFallBack): if user cancelled the request or the policy changed (for example, because the request is a download) then it should not fallback.
Location:
trunk/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit/ChangeLog

    r61848 r61857  
     12010-06-25  Lucas De Marchi  <lucas.demarchi@profusion.mobi>
     2
     3        Reviewed by Kenneth Rohde Christiansen.
     4
     5        [EFL] Do not load error message for download and cancellation.
     6        When a download is made or a request is cancelled an error page should
     7        not be shown.
     8        https://bugs.webkit.org/show_bug.cgi?id=40956
     9
     10        * efl/WebCoreSupport/FrameLoaderClientEfl.cpp:
     11        (WebCore::FrameLoaderClientEfl::dispatchDidFailLoading): return if it
     12        should not fallback.
     13        (WebCore::FrameLoaderClientEfl::dispatchDidFailLoad): return if it
     14        should not fallback.
     15        (WebCore::FrameLoaderClientEfl::interruptForPolicyChangeError): fix
     16        typo in related error message.
     17        (WebCore::FrameLoaderClientEfl::shouldFallBack): if user cancelled the
     18        request or the policy changed (for example, because the request is a
     19        download) then it should not fallback.
     20
    1212010-06-25  Lucas De Marchi  <lucas.demarchi@profusion.mobi>
    222
  • trunk/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp

    r61706 r61857  
    708708}
    709709
    710 void FrameLoaderClientEfl::dispatchDidFailLoading(DocumentLoader* loader, unsigned long identifier, const ResourceError&)
    711 {
     710void FrameLoaderClientEfl::dispatchDidFailLoading(DocumentLoader* loader, unsigned long identifier, const ResourceError& err)
     711{
     712    if (!shouldFallBack(err))
     713        return;
     714
    712715    if (m_firstData) {
    713716        FrameLoader* fl = loader->frameLoader();
     
    736739void FrameLoaderClientEfl::dispatchDidFailLoad(const ResourceError& err)
    737740{
     741    if (!shouldFallBack(err))
     742        return;
     743
    738744    m_loadError = err;
    739745    ewk_frame_load_error(m_frame,
     
    783789{
    784790    return ResourceError("Error", WebKitErrorFrameLoadInterruptedByPolicyChange,
    785                          request.url().string(), "Frame load interruped by policy change");
     791                         request.url().string(), "Frame load interrupted by policy change");
    786792}
    787793
     
    804810}
    805811
    806 bool FrameLoaderClientEfl::shouldFallBack(const ResourceError&)
    807 {
    808     notImplemented();
    809     return false;
     812bool FrameLoaderClientEfl::shouldFallBack(const ResourceError& error)
     813{
     814    return !(error.isCancellation() || (error.errorCode() == WebKitErrorFrameLoadInterruptedByPolicyChange));
    810815}
    811816
Note: See TracChangeset for help on using the changeset viewer.