Changeset 256460 in webkit
- Timestamp:
- Feb 12, 2020 11:13:35 AM (4 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r256458 r256460 1 2020-02-12 Youenn Fablet <youenn@apple.com> 2 3 Refactor DocumentLoader::commitData to use a Document& internally 4 https://bugs.webkit.org/show_bug.cgi?id=207579 5 6 Reviewed by Chris Dumez. 7 8 Once we write some bytes, the frame has a Document. 9 Put it in a local variable to improve readability of the code. 10 No change of behavior. 11 12 * loader/DocumentLoader.cpp: 13 (WebCore::DocumentLoader::commitData): 14 1 15 2020-02-12 Zalan Bujtas <zalan@apple.com> 2 16 -
trunk/Source/WebCore/loader/DocumentLoader.cpp
r256381 r256460 1072 1072 m_writer.setDocumentWasLoadedAsPartOfNavigation(); 1073 1073 1074 auto& document = *m_frame->document(); 1075 1074 1076 if (SecurityPolicy::allowSubstituteDataAccessToLocal() && m_originalSubstituteDataWasValid) { 1075 1077 // If this document was loaded with substituteData, then the document can … … 1077 1079 // and https://bugs.webkit.org/show_bug.cgi?id=19760 for further 1078 1080 // discussion. 1079 m_frame->document()->securityOrigin().grantLoadLocalResources();1081 document.securityOrigin().grantLoadLocalResources(); 1080 1082 } 1081 1083 … … 1085 1087 #if ENABLE(WEB_ARCHIVE) || ENABLE(MHTML) 1086 1088 if (m_archive && m_archive->shouldOverrideBaseURL()) 1087 m_frame->document()->setBaseURLOverride(m_archive->mainResource()->url());1089 document.setBaseURLOverride(m_archive->mainResource()->url()); 1088 1090 #endif 1089 1091 #if ENABLE(SERVICE_WORKER) 1090 1092 if (RuntimeEnabledFeatures::sharedFeatures().serviceWorkerEnabled()) { 1091 1093 if (m_serviceWorkerRegistrationData && m_serviceWorkerRegistrationData->activeWorker) { 1092 m_frame->document()->setActiveServiceWorker(ServiceWorker::getOrCreate(*m_frame->document(), WTFMove(m_serviceWorkerRegistrationData->activeWorker.value())));1094 document.setActiveServiceWorker(ServiceWorker::getOrCreate(document, WTFMove(m_serviceWorkerRegistrationData->activeWorker.value()))); 1093 1095 m_serviceWorkerRegistrationData = { }; 1094 } else if (auto* parent = m_frame->document()->parentDocument()) {1095 if (shouldUseActiveServiceWorkerFromParent( *m_frame->document(), *parent))1096 m_frame->document()->setActiveServiceWorker(parent->activeServiceWorker());1096 } else if (auto* parent = document.parentDocument()) { 1097 if (shouldUseActiveServiceWorkerFromParent(document, *parent)) 1098 document.setActiveServiceWorker(parent->activeServiceWorker()); 1097 1099 } 1098 1100 1099 if (m_frame->document()->activeServiceWorker() || LegacySchemeRegistry::canServiceWorkersHandleURLScheme( m_frame->document()->url().protocol().toStringWithoutCopying()))1100 m_frame->document()->setServiceWorkerConnection(&ServiceWorkerProvider::singleton().serviceWorkerConnection());1101 if (m_frame->document()->activeServiceWorker() || LegacySchemeRegistry::canServiceWorkersHandleURLScheme(document.url().protocol().toStringWithoutCopying())) 1102 document.setServiceWorkerConnection(&ServiceWorkerProvider::singleton().serviceWorkerConnection()); 1101 1103 1102 1104 // We currently unregister the temporary service worker client since we now registered the real document. … … 1114 1116 return; 1115 1117 1116 if (auto* window = m_frame->document()->domWindow())1118 if (auto* window = document.domWindow()) 1117 1119 window->prewarmLocalStorageIfNecessary(); 1118 1120
Note: See TracChangeset
for help on using the changeset viewer.