Enable usage of SetPage() with empty URL

This commit is contained in:
Tobias Taschner 2018-02-22 10:09:26 +01:00
parent b4359ca33d
commit f8f93a9cab
No known key found for this signature in database
GPG key ID: AE6ECD71294F87FD

View file

@ -597,8 +597,13 @@ void wxWebViewChromium::SetEditable(bool enable)
void wxWebViewChromium::DoSetPage(const wxString& html, const wxString& baseUrl)
{
wxString pageBaseUrl = baseUrl;
// CEF needs a baseURL that is not empty, set one if not specified
if(pageBaseUrl.empty())
pageBaseUrl = "file://";
m_clientHandler->GetBrowser()->GetMainFrame()->LoadString(html.ToStdString(),
baseUrl.ToStdString());
pageBaseUrl.ToStdString());
}
wxWebViewZoom wxWebViewChromium::GetZoom() const