Changeset 26758 in webkit
- Timestamp:
- Oct 18, 2007 5:33:19 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r26750 r26758 1 2007-10-18 Dan Bernstein <dan.bernstein@apple.com> 2 3 Reviewed by Adam Roben. 4 5 - removing fixed test 6 7 * platform/mac-leopard/Skipped: 8 1 9 2007-10-18 Darin Adler <darin@apple.com> 2 10 -
trunk/LayoutTests/platform/mac-leopard/Skipped
r26556 r26758 1 1 # <rdar://problem/5313520> editing/pasteboard/4076267-2.html fails on Leopard 2 2 editing/pasteboard/4076267-2.html 3 4 # <rdar://problem/5313523> http/tests/incremental/slow-utf8-text.pl fails on Leopard5 http/tests/incremental/slow-utf8-text.pl6 3 7 4 # <rdar://problem/5228256> Leopard regression test failures: security/block-test -
trunk/WebCore/ChangeLog
r26757 r26758 1 2007-10-18 Dan Bernstein <dan.bernstein@apple.com> 2 3 Reviewed by Adam Roben. 4 5 - fix <rdar://problem/5313523> 6 REGRESSION(Leopard): http/tests/incremental/slow-utf8-text.pl fails on Leopard 7 8 * platform/network/mac/ResourceResponseMac.mm: 9 (WebCore::ResourceResponse::doUpdateResourceResponse): Work around 10 <rdar://problem/5321972> by testing for the case of a response 11 with a MIME type of application/octet-stream and a Content-Type header 12 starting with text/plain and setting the MIME type to text/plain in 13 that case. 14 1 15 2007-10-18 Mark Rowe <mrowe@apple.com> 2 16 -
trunk/WebCore/platform/network/mac/ResourceResponseMac.mm
r23964 r26758 88 88 while (NSString *name = [e nextObject]) 89 89 m_httpHeaderFields.set(name, [headers objectForKey:name]); 90 #ifndef BUILDING_ON_TIGER 91 // FIXME: This is part of a workaround for <rdar://problem/5321972> REGRESSION: Plain text document from HTTP server detected 92 // as application/octet-stream 93 if (m_mimeType == "application/octet-stream") { 94 static const String textPlainMIMEType("text/plain"); 95 if (m_httpHeaderFields.get("Content-Type").startsWith(textPlainMIMEType)) 96 m_mimeType = textPlainMIMEType; 97 } 98 #endif 90 99 } else { 91 100 m_httpStatusCode = 0; -
trunk/WebKit/ChangeLog
r26709 r26758 1 2007-10-18 Dan Bernstein <dan.bernstein@apple.com> 2 3 Reviewed by Adam Roben. 4 5 - fix <rdar://problem/5313523> 6 REGRESSION(Leopard): http/tests/incremental/slow-utf8-text.pl fails on Leopard 7 8 * WebCoreSupport/WebFrameLoaderClient.mm: 9 (WebFrameLoaderClient::makeDocumentView): Changed to use _responseMIMEType. 10 * WebView/WebDataSource.mm: 11 (-[WebDataSource _MIMETypeOfResponse:]): Added. Works around 12 <rdar://problem/5321972> by testing for the case of an NSHTTPURLResponse 13 with a MIMEType of application/octet-stream and a Content-Type header 14 starting with text/plain and returning text/plain as the MIME type in 15 that case. 16 (-[WebDataSource _responseMIMEType]): Added. Used to get the correct 17 response MIME type. 18 (-[WebDataSource _isDocumentHTML]): Changed to use _responseMIMEType. 19 (-[WebDataSource _makeRepresentation]): Ditto. 20 (-[WebDataSource mainResource]): Ditto. 21 (-[WebDataSource subresources]): Changed to use _MIMETypeOfResponse and 22 pass the MIME type explicitly. 23 (-[WebDataSource subresourceForURL:]): Ditto. 24 * WebView/WebDataSourcePrivate.h: 25 * WebView/WebFrameView.mm: 26 (-[WebFrameView _makeDocumentViewForDataSource:]): Changed to use 27 _responseMIMEType. 28 * WebView/WebResource.mm: 29 (-[WebResource _initWithData:URL:response:MIMEType:]): Changed this 30 method to take a MIME type instead of extracting it from the response, 31 so that WebDataSource could pass the correct MIME type. 32 * WebView/WebResourcePrivate.h: 33 1 34 2007-10-17 Darin Adler <darin@apple.com> 2 35 -
trunk/WebKit/WebCoreSupport/WebFrameLoaderClient.mm
r26694 r26758 157 157 WebDataSource *ds = [m_webFrame.get() _dataSource]; 158 158 159 bool willProduceHTMLView = [[WebFrameView class] _viewClassForMIMEType:[ [ds response]MIMEType]] == [WebHTMLView class];159 bool willProduceHTMLView = [[WebFrameView class] _viewClassForMIMEType:[ds _responseMIMEType]] == [WebHTMLView class]; 160 160 bool canSkipCreation = [m_webFrame.get() _frameLoader]->committingFirstRealLoad() && willProduceHTMLView; 161 161 if (canSkipCreation) { -
trunk/WebKit/WebView/WebDataSource.mm
r24417 r26758 137 137 } 138 138 139 #ifndef BUILDING_ON_TIGER 140 - (NSString *)_MIMETypeOfResponse:(NSURLResponse *)response 141 { 142 // FIXME: This is part of a workaround for <rdar://problem/5321972> REGRESSION: Plain text document from HTTP server detected 143 // as application/octet-stream 144 NSString *MIMEType = [response MIMEType]; 145 if ([MIMEType isEqualToString:@"application/octet-stream"] && [response isKindOfClass:[NSHTTPURLResponse class]] && [[[(NSHTTPURLResponse *)response allHeaderFields] objectForKey:@"Content-Type"] hasPrefix:@"text/plain"]) 146 return @"text/plain"; 147 return MIMEType; 148 } 149 #endif 139 150 @end 140 151 … … 173 184 174 185 return nil; 186 } 187 188 - (NSString *)_responseMIMEType 189 { 190 #ifdef BUILDING_ON_TIGER 191 return [[self response] MIMEType]; 192 #else 193 return [self _MIMETypeOfResponse:[self response]]; 194 #endif 175 195 } 176 196 … … 320 340 - (BOOL)_isDocumentHTML 321 341 { 322 NSString *MIMEType = [ [self response]MIMEType];342 NSString *MIMEType = [self _responseMIMEType]; 323 343 return [WebView canShowMIMETypeAsHTML:MIMEType]; 324 344 } … … 326 346 -(void)_makeRepresentation 327 347 { 328 Class repClass = [[self class] _representationClassForMIMEType:[ [self response]MIMEType]];348 Class repClass = [[self class] _representationClassForMIMEType:[self _responseMIMEType]]; 329 349 330 350 // Check if the data source was already bound? … … 472 492 return [[[WebResource alloc] initWithData:[self data] 473 493 URL:[response URL] 474 MIMEType:[ responseMIMEType]494 MIMEType:[self _responseMIMEType] 475 495 textEncodingName:[response textEncodingName] 476 496 frameName:[[self webFrame] name]] autorelease]; … … 490 510 for (unsigned i = 0; i < [datas count]; ++i) { 491 511 NSURLResponse *response = [responses objectAtIndex:i]; 492 [subresources addObject:[[[WebResource alloc] _initWithData:[datas objectAtIndex:i] URL:[response URL] response:response ] autorelease]];512 [subresources addObject:[[[WebResource alloc] _initWithData:[datas objectAtIndex:i] URL:[response URL] response:response MIMEType:[self _MIMETypeOfResponse:response]] autorelease]]; 493 513 } 494 514 … … 506 526 return [self _archivedSubresourceForURL:URL]; 507 527 508 return [[[WebResource alloc] _initWithData:data URL:URL response:response ] autorelease];528 return [[[WebResource alloc] _initWithData:data URL:URL response:response MIMEType:[self _MIMETypeOfResponse:response]] autorelease]; 509 529 } 510 530 -
trunk/WebKit/WebView/WebDataSourcePrivate.h
r14999 r26758 36 36 37 37 - (NSError *)_mainDocumentError; 38 39 - (NSString *)_responseMIMEType; 38 40 @end -
trunk/WebKit/WebView/WebFrameView.mm
r25467 r26758 30 30 31 31 #import "WebClipView.h" 32 #import "WebDataSource .h"32 #import "WebDataSourcePrivate.h" 33 33 #import "WebDocument.h" 34 34 #import "WebDynamicScrollBarsView.h" … … 188 188 -(NSView <WebDocumentView> *)_makeDocumentViewForDataSource:(WebDataSource *)dataSource 189 189 { 190 NSString* MIMEType = [ [dataSource response]MIMEType];190 NSString* MIMEType = [dataSource _responseMIMEType]; 191 191 if (!MIMEType) 192 192 MIMEType = @"text/html"; -
trunk/WebKit/WebView/WebResource.mm
r25571 r26758 249 249 } 250 250 251 - (id)_initWithData:(NSData *)data URL:(NSURL *)URL response:(NSURLResponse *)response 251 - (id)_initWithData:(NSData *)data URL:(NSURL *)URL response:(NSURLResponse *)response MIMEType:(NSString *)MIMEType 252 252 { 253 253 // Pass NO for copyData since the data doesn't need to be copied since we know that callers will no longer modify it. … … 255 255 return [self _initWithData:data 256 256 URL:URL 257 MIMEType: [response MIMEType]257 MIMEType:MIMEType 258 258 textEncodingName:[response textEncodingName] 259 259 frameName:nil -
trunk/WebKit/WebView/WebResourcePrivate.h
r20217 r26758 39 39 copyData:(BOOL)copyData; 40 40 41 - (id)_initWithData:(NSData *)data URL:(NSURL *)URL response:(NSURLResponse *)response ;41 - (id)_initWithData:(NSData *)data URL:(NSURL *)URL response:(NSURLResponse *)response MIMEType:(NSString *)MIMEType; 42 42 43 43 - (BOOL)_shouldIgnoreWhenUnarchiving; -
trunk/WebKitTools/ChangeLog
r26734 r26758 1 2007-10-18 Dan Bernstein <dan.bernstein@apple.com> 2 3 Reviewed by Adam Roben. 4 5 - fix <rdar://problem/5313523> 6 REGRESSION(Leopard): http/tests/incremental/slow-utf8-text.pl fails on Leopard 7 8 * DumpRenderTree/mac/DumpRenderTree.mm: 9 (dump): Changed to use _responseMIMEType. 10 1 11 2007-10-17 Adam Roben <aroben@apple.com> 2 12 -
trunk/WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm
r25578 r26758 52 52 #import <WebKit/WebBackForwardList.h> 53 53 #import <WebKit/WebCoreStatistics.h> 54 #import <WebKit/WebDataSource .h>54 #import <WebKit/WebDataSourcePrivate.h> 55 55 #import <WebKit/WebDocumentPrivate.h> 56 56 #import <WebKit/WebEditingDelegate.h> … … 841 841 842 842 bool dumpAsText = layoutTestController->dumpAsText(); 843 dumpAsText |= [[[ [mainFrame dataSource] response]MIMEType] isEqualToString:@"text/plain"];843 dumpAsText |= [[[mainFrame dataSource] _responseMIMEType] isEqualToString:@"text/plain"]; 844 844 layoutTestController->setDumpAsText(dumpAsText); 845 845 if (layoutTestController->dumpAsText()) {
Note: See TracChangeset
for help on using the changeset viewer.