Changeset 67223 in webkit
- Timestamp:
- Sep 10, 2010 12:54:10 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 24 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r67222 r67223 1 2010-09-10 Adam Barth <abarth@webkit.org> 2 3 Reviewed by Eric Seidel. 4 5 Main resource bytes shouldn't bounce through FrameLoader 6 https://bugs.webkit.org/show_bug.cgi?id=45496 7 8 After the MainResourceLoader hands the bytes for the main resource to 9 the DocumentLoader, the DocumentLoader hands the bytes to the 10 FrameLoaderClient. The FrameLoaderClient, in turn, returns the bytes 11 to WebCore. Prior to this patch, the FrameLoaderClient returned the 12 bytes to the FrameLoader. However, the FrameLoader was actually adding 13 any value. 14 15 In this patch, we change the FrameLoaderClient to return the bytes to 16 the DocumentLoader directly. In a future patch, we'll cut out the 17 FrameLoaderClient middleman and handle the bytes internally in the 18 DocumentLoader. 19 20 * WebCore.exp.in: 21 * loader/DocumentLoader.cpp: 22 (WebCore::DocumentLoader::addData): 23 * loader/DocumentLoader.h: 24 * loader/FrameLoader.cpp: 25 (WebCore::FrameLoader::finishedLoadingDocument): 26 * loader/FrameLoader.h: 27 1 28 2010-09-10 Oliver Hunt <oliver@apple.com> 2 29 -
trunk/WebCore/WebCore.exp.in
r67219 r67223 171 171 __ZN7WebCore11FrameLoader4loadERKNS_15ResourceRequestEb 172 172 __ZN7WebCore11FrameLoader6reloadEb 173 __ZN7WebCore11FrameLoader7addDataEPKci174 173 __ZN7WebCore11Geolocation12setIsAllowedEb 175 174 __ZN7WebCore11GeolocationD1Ev … … 300 299 __ZN7WebCore14DocumentLoader22cancelMainResourceLoadERKNS_13ResourceErrorE 301 300 __ZN7WebCore14DocumentLoader24removePlugInStreamLoaderEPNS_14ResourceLoaderE 301 __ZN7WebCore14DocumentLoader7addDataEPKci 302 302 __ZN7WebCore14DocumentLoader7requestEv 303 303 __ZN7WebCore14DocumentLoader8setFrameEPNS_5FrameE -
trunk/WebCore/loader/DocumentLoader.cpp
r67198 r67223 287 287 } 288 288 289 void DocumentLoader::addData(const char* bytes, int length) 290 { 291 ASSERT(m_frame->document()); 292 ASSERT(m_frame->document()->parsing()); 293 // FIXME: DocumentWriter should move to be owned by DocumentLoader. 294 frameLoader()->writer()->addData(bytes, length); 295 } 296 289 297 bool DocumentLoader::doesProgressiveLoad(const String& MIMEType) const 290 298 { -
trunk/WebCore/loader/DocumentLoader.h
r65573 r67223 212 212 void resetTiming() { m_documentLoadTiming = DocumentLoadTiming(); } 213 213 214 void addData(const char* bytes, int length); 215 214 216 #if ENABLE(OFFLINE_WEB_APPLICATIONS) 215 217 ApplicationCacheHost* applicationCacheHost() const { return m_applicationCacheHost.get(); } -
trunk/WebCore/loader/FrameLoader.cpp
r67198 r67223 1090 1090 } 1091 1091 1092 void FrameLoader::addData(const char* bytes, int length)1093 {1094 ASSERT(m_workingURL.isEmpty());1095 ASSERT(m_frame->document());1096 ASSERT(m_frame->document()->parsing());1097 writer()->addData(bytes, length);1098 }1099 1100 1092 #if ENABLE(WML) 1101 1093 static inline bool frameContainsWMLContent(Frame* frame) … … 2256 2248 ASSERT(m_frame->document()); 2257 2249 2258 addData(mainResource->data()->data(), mainResource->data()->size());2250 loader->addData(mainResource->data()->data(), mainResource->data()->size()); 2259 2251 } 2260 2252 -
trunk/WebCore/loader/FrameLoader.h
r67198 r67223 262 262 void resetMultipleFormSubmissionProtection(); 263 263 264 void addData(const char* bytes, int length);265 266 264 void checkCallImplicitClose(); 267 265 -
trunk/WebKit/chromium/ChangeLog
r67188 r67223 1 2010-09-10 Adam Barth <abarth@webkit.org> 2 3 Reviewed by Eric Seidel. 4 5 Main resource bytes shouldn't bounce through FrameLoader 6 https://bugs.webkit.org/show_bug.cgi?id=45496 7 8 Now return the bytes to the DocumentLoader. 9 10 Also, removed comment about wrong code in the Mac port. 11 12 * src/WebFrameImpl.cpp: 13 (WebKit::WebFrameImpl::commitDocumentData): 14 1 15 2010-09-08 Darin Adler <darin@apple.com> 2 16 -
trunk/WebKit/chromium/src/WebFrameImpl.cpp
r67122 r67223 1013 1013 } 1014 1014 1015 void WebFrameImpl::commitDocumentData(const char* data, size_t dataLen) 1015 // FIXME: This function should be moved into WebCore. 1016 void WebFrameImpl::commitDocumentData(const char* data, size_t length) 1016 1017 { 1017 1018 DocumentLoader* documentLoader = m_frame->loader()->documentLoader(); … … 1026 1027 } 1027 1028 m_frame->loader()->writer()->setEncoding(encoding, userChosen); 1028 1029 // NOTE: mac only does this if there is a document 1030 m_frame->loader()->addData(data, dataLen); 1029 m_frame->documentLoader()->addData(data, length); 1031 1030 } 1032 1031 -
trunk/WebKit/efl/ChangeLog
r67122 r67223 1 2010-09-10 Adam Barth <abarth@webkit.org> 2 3 Reviewed by Eric Seidel. 4 5 Main resource bytes shouldn't bounce through FrameLoader 6 https://bugs.webkit.org/show_bug.cgi?id=45496 7 8 Now return the bytes to the DocumentLoader. 9 10 * WebCoreSupport/FrameLoaderClientEfl.cpp: 11 (WebCore::FrameLoaderClientEfl::committedLoad): 12 1 13 2010-09-08 Darin Adler <darin@apple.com> 2 14 -
trunk/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp
r66839 r67223 183 183 } 184 184 185 185 // FIXME: This function should be moved into WebCore. 186 186 void FrameLoaderClientEfl::committedLoad(DocumentLoader* loader, const char* data, int length) 187 187 { … … 195 195 m_firstData = false; 196 196 } 197 fl-> addData(data, length);197 fl->documentLoader()->addData(data, length); 198 198 } 199 199 -
trunk/WebKit/gtk/ChangeLog
r67215 r67223 1 2010-09-10 Adam Barth <abarth@webkit.org> 2 3 Reviewed by Eric Seidel. 4 5 Main resource bytes shouldn't bounce through FrameLoader 6 https://bugs.webkit.org/show_bug.cgi?id=45496 7 8 Now return the bytes to the DocumentLoader. 9 10 * WebCoreSupport/FrameLoaderClientGtk.cpp: 11 (WebKit::FrameLoaderClient::committedLoad): 12 1 13 2010-09-10 Martin Robinson <mrobinson@igalia.com> 2 14 -
trunk/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
r67211 r67223 246 246 } 247 247 248 248 // FIXME: This function should be moved into WebCore. 249 249 void FrameLoaderClient::committedLoad(WebCore::DocumentLoader* loader, const char* data, int length) 250 250 { … … 261 261 frameLoader->writer()->setEncoding(encoding, userChosen); 262 262 if (data) 263 frameLoader-> addData(data, length);263 frameLoader->documentLoader()->addData(data, length); 264 264 265 265 Frame* coreFrame = loader->frame(); -
trunk/WebKit/haiku/ChangeLog
r65021 r67223 1 2010-09-10 Adam Barth <abarth@webkit.org> 2 3 Reviewed by Eric Seidel. 4 5 Main resource bytes shouldn't bounce through FrameLoader 6 https://bugs.webkit.org/show_bug.cgi?id=45496 7 8 Now return the bytes to the DocumentLoader. 9 10 * WebCoreSupport/FrameLoaderClientHaiku.cpp: 11 (WebCore::FrameLoaderClientHaiku::committedLoad): 12 1 13 2010-08-06 Gavin Barraclough <barraclough@apple.com> 2 14 -
trunk/WebKit/haiku/WebCoreSupport/FrameLoaderClientHaiku.cpp
r57927 r67223 505 505 } 506 506 507 // FIXME: This function should be moved into WebCore. 507 508 void FrameLoaderClientHaiku::committedLoad(WebCore::DocumentLoader* loader, const char* data, int length) 508 509 { … … 512 513 FrameLoader* frameLoader = loader->frameLoader(); 513 514 frameLoader->writer()->setEncoding(m_response.textEncodingName(), false); 514 frameLoader-> addData(data, length);515 frameLoader->documentLoader()->addData(data, length); 515 516 } 516 517 -
trunk/WebKit/mac/ChangeLog
r67130 r67223 1 2010-09-10 Adam Barth <abarth@webkit.org> 2 3 Reviewed by Eric Seidel. 4 5 Main resource bytes shouldn't bounce through FrameLoader 6 https://bugs.webkit.org/show_bug.cgi?id=45496 7 8 Now return the bytes to the DocumentLoader. 9 10 Previously, we were checking the document for null. However, Frame can 11 never have a null document, so this check is no longer needed. 12 13 * WebView/WebFrame.mm: 14 (-[WebFrame _addData:]): 15 1 16 2010-09-09 John Therrell <jtherrell@apple.com> 2 17 -
trunk/WebKit/mac/WebView/WebFrame.mm
r67122 r67223 491 491 { 492 492 Document* document = _private->coreFrame->document(); 493 494 // Document may be nil if the part is about to redirect495 // as a result of JS executing during load, i.e. one frame496 // changing another's location before the frame's document497 // has been created.498 if (!document)499 return;500 493 501 494 document->setShouldCreateRenderers(_private->shouldCreateRenderers); 502 _private->coreFrame->loader()-> addData((const char *)[data bytes], [data length]);495 _private->coreFrame->loader()->documentLoader()->addData((const char *)[data bytes], [data length]); 503 496 } 504 497 -
trunk/WebKit/qt/ChangeLog
r67122 r67223 1 2010-09-10 Adam Barth <abarth@webkit.org> 2 3 Reviewed by Eric Seidel. 4 5 Main resource bytes shouldn't bounce through FrameLoader 6 https://bugs.webkit.org/show_bug.cgi?id=45496 7 8 Now return the bytes to the DocumentLoader. 9 10 * WebCoreSupport/FrameLoaderClientQt.cpp: 11 (WebCore::FrameLoaderClientQt::committedLoad): 12 1 13 2010-09-08 Darin Adler <darin@apple.com> 2 14 -
trunk/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
r66794 r67223 790 790 } 791 791 792 // FIXME: This function should be moved into WebCore. 792 793 void FrameLoaderClientQt::committedLoad(WebCore::DocumentLoader* loader, const char* data, int length) 793 794 { … … 800 801 m_firstData = false; 801 802 } 802 fl-> addData(data, length);803 fl->documentLoader()->addData(data, length); 803 804 } 804 805 -
trunk/WebKit/win/ChangeLog
r67125 r67223 1 2010-09-10 Adam Barth <abarth@webkit.org> 2 3 Reviewed by Eric Seidel. 4 5 Main resource bytes shouldn't bounce through FrameLoader 6 https://bugs.webkit.org/show_bug.cgi?id=45496 7 8 Now return the bytes to the DocumentLoader. 9 10 * WebCoreSupport/WebFrameLoaderClient.cpp: 11 (WebFrameLoaderClient::receivedData): 12 1 13 2010-09-09 Simon Fraser <simon.fraser@apple.com> 2 14 -
trunk/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp
r58154 r67223 513 513 } 514 514 515 // FIXME: This function should be moved into WebCore. 515 516 void WebFrameLoaderClient::receivedData(const char* data, int length, const String& textEncoding) 516 517 { … … 525 526 encoding = textEncoding; 526 527 coreFrame->loader()->writer()->setEncoding(encoding, userChosen); 527 528 coreFrame->loader()->addData(data, length); 528 coreFrame->loader()->documentLoader()->addData(data, length); 529 529 } 530 530 -
trunk/WebKit/wx/ChangeLog
r67122 r67223 1 2010-09-10 Adam Barth <abarth@webkit.org> 2 3 Reviewed by Eric Seidel. 4 5 Main resource bytes shouldn't bounce through FrameLoader 6 https://bugs.webkit.org/show_bug.cgi?id=45496 7 8 Now return the bytes to the DocumentLoader. 9 10 * WebKitSupport/FrameLoaderClientWx.cpp: 11 (WebCore::FrameLoaderClientWx::committedLoad): 12 1 13 2010-09-08 Darin Adler <darin@apple.com> 2 14 -
trunk/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp
r64229 r67223 613 613 } 614 614 615 // FIXME: This function should be moved into WebCore. 615 616 void FrameLoaderClientWx::committedLoad(WebCore::DocumentLoader* loader, const char* data, int length) 616 617 { … … 620 621 FrameLoader* fl = loader->frameLoader(); 621 622 fl->writer()->setEncoding(m_response.textEncodingName(), false); 622 fl-> addData(data, length);623 fl->documentLoader()->addData(data, length); 623 624 } 624 625 -
trunk/WebKit2/ChangeLog
r67202 r67223 1 2010-09-10 Adam Barth <abarth@webkit.org> 2 3 Reviewed by Eric Seidel. 4 5 Main resource bytes shouldn't bounce through FrameLoader 6 https://bugs.webkit.org/show_bug.cgi?id=45496 7 8 Now return the bytes to the DocumentLoader. 9 10 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: 11 (WebKit::WebFrameLoaderClient::receivedData): 12 1 13 2010-09-10 Adam Roben <aroben@apple.com> 2 14 -
trunk/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
r66894 r67223 621 621 } 622 622 623 // FIXME: This function should be moved into WebCore. 623 624 void WebFrameLoaderClient::receivedData(const char* data, int length, const String& textEncoding) 624 625 { … … 634 635 coreFrame->loader()->writer()->setEncoding(encoding, userChosen); 635 636 636 coreFrame->loader()-> addData(data, length);637 coreFrame->loader()->documentLoader()->addData(data, length); 637 638 } 638 639
Note: See TracChangeset
for help on using the changeset viewer.