Changeset 21480 in webkit


Ignore:
Timestamp:
May 15, 2007 1:27:42 AM (17 years ago)
Author:
andersca
Message:

Reviewed by Geoff.

<rdar://problem/5200816>
REGRESSION: With Shiira 1.2.2 , I can't open embedded link in flash object by clicking (http:/www.adobe.com )


Shiira under some circumstances passes nil as the request to -[WebFrame loadRequest:]. ToT WebKit doesn't call any policy
delegate methods in this case, which means that the page is actually being loaded.


This patch makes ToT WebKit behave in the same way as Tiger WebKit when the request is nil.


  • loader/FrameLoader.cpp: (WebCore::FrameLoader::checkNavigationPolicy): Don't continue without calling the navigation policy method if the request is null.


(WebCore::FrameLoader::continueAfterNavigationPolicy):
If the request can't be handled, don't continue the load.


  • platform/network/mac/ResourceRequestMac.mm: (WebCore::ResourceRequest::doUpdatePlatformRequest): Don't create an NSURLRequest object if the request is null.
Location:
trunk/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r21479 r21480  
     12007-05-14  Anders Carlsson  <andersca@apple.com>
     2
     3        Reviewed by Geoff.
     4
     5        <rdar://problem/5200816>
     6        REGRESSION: With Shiira 1.2.2 , I can't open embedded link in flash object by clicking (http:/www.adobe.com )
     7       
     8        Shiira under some circumstances passes nil as the request to -[WebFrame loadRequest:]. ToT WebKit doesn't call any policy
     9        delegate methods in this case, which means that the page is actually being loaded.
     10       
     11        This patch makes ToT WebKit behave in the same way as Tiger WebKit when the request is nil.
     12       
     13        * loader/FrameLoader.cpp:
     14        (WebCore::FrameLoader::checkNavigationPolicy):
     15        Don't continue without calling the navigation policy method if the request is null.
     16       
     17        (WebCore::FrameLoader::continueAfterNavigationPolicy):
     18        If the request can't be handled, don't continue the load.
     19       
     20        * platform/network/mac/ResourceRequestMac.mm:
     21        (WebCore::ResourceRequest::doUpdatePlatformRequest):
     22        Don't create an NSURLRequest object if the request is null.
     23
    1242007-05-15  Maciej Stachowiak  <mjs@apple.com>
    225
  • trunk/WebCore/loader/FrameLoader.cpp

    r21479 r21480  
    33153315    // Don't ask more than once for the same request or if we are loading an empty URL.
    33163316    // This avoids confusion on the part of the client.
    3317     if (request == loader->lastCheckedRequest() || request.url().isEmpty()) {
     3317    if (request == loader->lastCheckedRequest() || (!request.isNull() && request.url().isEmpty())) {
    33183318        function(argument, request, 0, true);
    33193319        return;
     
    33443344    m_policyCheck.clear();
    33453345
     3346    bool shouldContinue = policy == PolicyUse;
     3347   
    33463348    switch (policy) {
    33473349        case PolicyIgnore:
     
    33583360                handleUnimplementablePolicy(m_client->cannotShowURLError(check.request()));
    33593361                check.clearRequest();
     3362                shouldContinue = false;
    33603363            }
    33613364            break;
     
    33633366    }
    33643367
    3365     check.call(policy == PolicyUse);
     3368    check.call(shouldContinue);
    33663369}
    33673370
  • trunk/WebCore/platform/network/mac/ResourceRequestMac.mm

    r19660 r21480  
    6868void ResourceRequest::doUpdatePlatformRequest()
    6969{
     70    if (isNull()) {
     71        m_nsRequest = nil;
     72        return;
     73    }
     74   
    7075    NSMutableURLRequest* nsRequest = [m_nsRequest.get() mutableCopy];
    7176
Note: See TracChangeset for help on using the changeset viewer.