Changeset 19322 in webkit
- Timestamp:
- Jan 31, 2007, 7:51:00 PM (18 years ago)
- Location:
- trunk
- Files:
-
- 5 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r19313 r19322 1 2007-01-31 Anders Carlsson <acarlsson@apple.com> 2 3 Reviewed by Maciej. 4 5 <rdar://problem/4886776> 6 REGRESSION: After opening a web archive, location shows the actual URL, not the webarchive file 7 8 * webarchive/loading/resources/helloworld.webarchive: Added. 9 * webarchive/loading/test-loading-archive-expected.txt: Added. 10 * webarchive/loading/test-loading-archive.html: Added. 11 1 12 2007-01-31 Adele Peterson <adele@apple.com> 2 13 -
trunk/WebCore/ChangeLog
r19319 r19322 1 2007-01-31 Anders Carlsson <acarlsson@apple.com> 2 3 Reviewed by Maciej. 4 5 <rdar://problem/4886776> 6 REGRESSION: After opening a web archive, location shows the actual URL, not the webarchive file 7 8 * WebCore.exp: 9 * loader/FrameLoader.cpp: 10 (WebCore::FrameLoader::continueLoadWithData): 11 * loader/FrameLoader.h: 12 New function which continues a load but using a given buffer instead. 13 1 14 2007-01-31 Adele Peterson <adele@apple.com> 2 15 -
trunk/WebCore/WebCore.exp
r19237 r19322 139 139 __ZN7WebCore11FrameLoader16detachFromParentEv 140 140 __ZN7WebCore11FrameLoader18currentHistoryItemEv 141 __ZN7WebCore11FrameLoader20continueLoadWithDataEPNS_12SharedBufferERKNS_6StringES5_RKNS_4KURLE 141 142 __ZN7WebCore11FrameLoader21addPlugInStreamLoaderEPNS_14ResourceLoaderE 142 143 __ZN7WebCore11FrameLoader21setCurrentHistoryItemEN3WTF10PassRefPtrINS_11HistoryItemEEE -
trunk/WebCore/loader/FrameLoader.cpp
r19289 r19322 4279 4279 } 4280 4280 4281 void FrameLoader::continueLoadWithData(SharedBuffer* buffer, const String& mimeType, const String& textEncoding, const KURL& url) 4282 { 4283 m_responseMIMEType = mimeType; 4284 didOpenURL(url); 4285 4286 String encoding; 4287 if (m_frame) 4288 encoding = documentLoader()->overrideEncoding(); 4289 bool userChosen = !encoding.isNull(); 4290 if (encoding.isNull()) 4291 encoding = textEncoding; 4292 setEncoding(encoding, userChosen); 4293 4294 if (!m_frame->document()) 4295 return; 4296 4297 addData(buffer->data(), buffer->size()); 4298 } 4299 4281 4300 } // namespace WebCore -
trunk/WebCore/loader/FrameLoader.h
r19218 r19322 421 421 void setProvisionalHistoryItem(PassRefPtr<HistoryItem>); 422 422 423 void continueLoadWithData(SharedBuffer*, const String& mimeType, const String& textEncoding, const KURL&); 423 424 private: 424 425 PassRefPtr<HistoryItem> createHistoryItem(bool useOriginal); -
trunk/WebKit/ChangeLog
r19318 r19322 1 2007-01-31 Anders Carlsson <acarlsson@apple.com> 2 3 Reviewed by Maciej. 4 5 <rdar://problem/4886776> 6 REGRESSION: After opening a web archive, location shows the actual URL, not the webarchive file 7 8 "Revert" the change done in 13734. 9 10 * WebView/WebHTMLRepresentation.mm: 11 (-[WebHTMLRepresentation loadArchive]): 12 Don't do a new load here, as this would cancel the current load and call the resource load 13 delegate's didFailLoadingWithError: method. Instead, call continueLoadWithData. 14 1 15 2007-02-01 Nikolas Zimmermann <zimmermann@kde.org> 2 16 -
trunk/WebKit/WebView/WebHTMLRepresentation.mm
r18764 r19322 47 47 #import <WebCore/Document.h> 48 48 #import <WebCore/DocumentLoader.h> 49 #import <WebCore/FrameLoader.h> 49 50 #import <WebCore/FrameMac.h> 50 51 #import <WebCore/MimeTypeRegistry.h> … … 190 191 } 191 192 192 - (void) loadArchive193 - (void)_loadDataSourceAsWebArchive 193 194 { 194 195 WebArchive *archive = [[WebArchive alloc] initWithData:[_private->dataSource data]]; 195 [[_private->dataSource webFrame] loadArchive:archive]; 196 WebResource *mainResource = [archive mainResource]; 197 if (!mainResource) { 198 [archive release]; 199 return; 200 } 201 202 NSData *data = [mainResource data]; 203 [data retain]; 204 [_private->parsedArchiveData release]; 205 _private->parsedArchiveData = data; 206 207 [_private->dataSource _addToUnarchiveState:archive]; 208 [archive release]; 209 210 WebFrame *webFrame = [_private->dataSource webFrame]; 211 212 if (!webFrame) 213 return; 214 215 core(webFrame)->loader()->continueLoadWithData(SharedBuffer::wrapNSData(data).get(), [mainResource MIMEType], [mainResource textEncodingName], [mainResource URL]); 196 216 } 197 217 … … 207 227 if (frame) { 208 228 if ([self _isDisplayingWebArchive]) 209 [self loadArchive];229 [self _loadDataSourceAsWebArchive]; 210 230 else 211 231 // Telling the bridge we received some data and passing nil as the data is our … … 232 252 - (NSString *)documentSource 233 253 { 254 if ([self _isDisplayingWebArchive]) 255 return [[[NSString alloc] initWithData:_private->parsedArchiveData encoding:NSUTF8StringEncoding] autorelease]; 256 234 257 return [_private->bridge stringWithData:[_private->dataSource data]]; 235 258 }
Note:
See TracChangeset
for help on using the changeset viewer.