Changeset 242836 in webkit
- Timestamp:
- Mar 12, 2019 5:36:02 PM (5 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r242833 r242836 1 2019-03-12 Jiewen Tan <jiewen_tan@apple.com> 2 3 Add WebFrameProxy::loadData 4 https://bugs.webkit.org/show_bug.cgi?id=195647 5 <rdar://problem/48826856> 6 7 Reviewed by Youenn Fablet. 8 9 This patch adds WebFrameProxy::loadData which is a simplified version of WebPageProxy::loadData that 10 loads substitute data to an iframe. This is needed by the Load Optimizer. 11 12 * UIProcess/WebFrameProxy.cpp: 13 (WebKit::WebFrameProxy::loadData): 14 * UIProcess/WebFrameProxy.h: 15 * WebProcess/WebPage/WebPage.cpp: 16 (WebKit::WebPage::loadDataInFrame): 17 * WebProcess/WebPage/WebPage.h: 18 * WebProcess/WebPage/WebPage.messages.in: 19 1 20 2019-03-12 Wenson Hsieh <wenson_hsieh@apple.com> 2 21 -
trunk/Source/WebKit/UIProcess/WebFrameProxy.cpp
r240484 r242836 87 87 } 88 88 89 void WebFrameProxy::loadData(const IPC::DataReference& data, const String& MIMEType, const String& encodingName, const URL& baseURL) 90 { 91 if (!m_page) 92 return; 93 94 m_page->process().send(Messages::WebPage::LoadDataInFrame(data, MIMEType, encodingName, baseURL, m_frameID), m_page->pageID()); 95 } 96 89 97 void WebFrameProxy::stopLoading() const 90 98 { -
trunk/Source/WebKit/UIProcess/WebFrameProxy.h
r240484 r242836 82 82 83 83 void loadURL(const URL&); 84 void loadData(const IPC::DataReference&, const String& MIMEType, const String& encodingName, const URL& baseURL); 84 85 void stopLoading() const; 85 86 -
trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp
r242833 r242836 1391 1391 } 1392 1392 1393 void WebPage::loadDataInFrame(IPC::DataReference&& data, String&& MIMEType, String&& encodingName, URL&& baseURL, uint64_t frameID) 1394 { 1395 WebFrame* frame = WebProcess::singleton().webFrame(frameID); 1396 if (!frame) 1397 return; 1398 1399 auto sharedBuffer = SharedBuffer::create(reinterpret_cast<const char*>(data.data()), data.size()); 1400 ResourceResponse response(baseURL, MIMEType, sharedBuffer->size(), encodingName); 1401 SubstituteData substituteData(WTFMove(sharedBuffer), baseURL, WTFMove(response), SubstituteData::SessionHistoryVisibility::Hidden); 1402 frame->coreFrame()->loader().load(FrameLoadRequest(*frame->coreFrame(), ResourceRequest(baseURL), ShouldOpenExternalURLsPolicy::ShouldNotAllow, WTFMove(substituteData))); 1403 } 1404 1393 1405 #if !PLATFORM(COCOA) 1394 1406 void WebPage::platformDidReceiveLoadParameters(const LoadParameters& loadParameters) -
trunk/Source/WebKit/WebProcess/WebPage/WebPage.h
r242833 r242836 1290 1290 1291 1291 void loadURLInFrame(URL&&, uint64_t frameID); 1292 void loadDataInFrame(IPC::DataReference&&, String&& MIMEType, String&& encodingName, URL&& baseURL, uint64_t frameID); 1292 1293 1293 1294 enum class WasRestoredByAPIRequest { No, Yes }; -
trunk/Source/WebKit/WebProcess/WebPage/WebPage.messages.in
r242833 r242836 156 156 157 157 LoadURLInFrame(URL url, uint64_t frameID) 158 LoadDataInFrame(IPC::DataReference data, String MIMEType, String encodingName, URL baseURL, uint64_t frameID) 158 159 LoadRequest(struct WebKit::LoadParameters loadParameters) 159 160 LoadData(struct WebKit::LoadParameters loadParameters)
Note: See TracChangeset
for help on using the changeset viewer.