Changeset 24392

Show
Ignore:
Timestamp:
07/17/07 16:39:54 (2 years ago)
Author:
thatcher
Message:

Reviewed by Geoff.

< rdar://problem/5336267> loadData:MIMEType:textEncodingName:baseURL: doesn't like relative URLs

Get the absoluteURL from any user supplied NSURL before we pass it down to WebCore.

  • WebView/WebFrame.mm: (-[WebFrame _loadURL:referrer:intoChild:]): (-[WebFrame _loadData:MIMEType:textEncodingName:baseURL:unreachableURL:]):
  • WebView/WebView.mm: (-[WebView userAgentForURL:]):
Location:
trunk/WebKit
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/WebKit/ChangeLog

    r24381 r24392  
     12007-07-17  Timothy Hatcher  <timothy@apple.com> 
     2 
     3        Reviewed by Geoff. 
     4 
     5        <rdar://problem/5336267> loadData:MIMEType:textEncodingName:baseURL: doesn't like relative URLs 
     6 
     7        Get the absoluteURL from any user supplied NSURL before we pass it down to WebCore. 
     8 
     9        * WebView/WebFrame.mm: 
     10        (-[WebFrame _loadURL:referrer:intoChild:]): 
     11        (-[WebFrame _loadData:MIMEType:textEncodingName:baseURL:unreachableURL:]): 
     12        * WebView/WebView.mm: 
     13        (-[WebView userAgentForURL:]): 
     14 
    1152007-07-17  Adam Roben  <aroben@apple.com> 
    216 
  • trunk/WebKit/WebView/WebFrame.mm

    r24369 r24392  
    322322        [childFrame loadArchive:archive]; 
    323323    else 
    324         [childFrame _frameLoader]->load(URL, referrer, childLoadType, 
     324        [childFrame _frameLoader]->load([URL absoluteURL], referrer, childLoadType, 
    325325                                        String(), 0, 0); 
    326326} 
     
    769769    } 
    770770     
    771     ResourceRequest request(URL); 
     771    ResourceRequest request([URL absoluteURL]); 
    772772 
    773773    // hack because Mail checks for this property to detect data / archive loads 
    774774    [NSURLProtocol setProperty:@"" forKey:@"WebDataRequest" inRequest:(NSMutableURLRequest *)request.nsURLRequest()]; 
    775775 
    776     SubstituteData substituteData(WebCore::SharedBuffer::wrapNSData(data), MIMEType, encodingName, unreachableURL, responseURL); 
     776    SubstituteData substituteData(WebCore::SharedBuffer::wrapNSData(data), MIMEType, encodingName, [unreachableURL absoluteURL], responseURL); 
    777777 
    778778    [self _frameLoader]->load(request, substituteData); 
  • trunk/WebKit/WebView/WebView.mm

    r24378 r24392  
    22692269- (NSString *)userAgentForURL:(NSURL *)url 
    22702270{ 
    2271     return [self _userAgentForURL:KURL(url)]; 
     2271    return [self _userAgentForURL:KURL([url absoluteURL])]; 
    22722272} 
    22732273