Add WKPageLoadData and WKPageLoadDataWithUserData SPI to support loading arbitrary...
[WebKit-https.git] / Source / WebKit2 / UIProcess / WebPageProxy.cpp
index c11ee4267c48fea9b1728e574886de0fa5b992d3..925206cf455e0543fb7eb7d7d8626e9030efc84c 100644 (file)
@@ -725,6 +725,16 @@ void WebPageProxy::loadFile(const String& fileURLString, const String& resourceD
     m_process->responsivenessTimer()->start();
 }
 
+void WebPageProxy::loadData(WebData* data, const String& MIMEType, const String& encoding, const String& baseURL, APIObject* userData)
+{
+    if (!isValid())
+        reattachToWebProcess();
+
+    m_process->assumeReadAccessToBaseURL(baseURL);
+    m_process->send(Messages::WebPage::LoadData(data->dataReference(), MIMEType, encoding, baseURL, WebContextUserMessageEncoder(userData)), m_pageID);
+    m_process->responsivenessTimer()->start();
+}
+
 void WebPageProxy::loadHTMLString(const String& htmlString, const String& baseURL, APIObject* userData)
 {
     if (!isValid())