Ensure that the default wxWebView backends are registered.
Fixes #15261 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74251 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
d5bfe58482
commit
8fdbcf4de8
@ -89,8 +89,7 @@ void wxWebView::RegisterFactory(const wxString& backend,
|
|||||||
// static
|
// static
|
||||||
wxStringWebViewFactoryMap::iterator wxWebView::FindFactory(const wxString &backend)
|
wxStringWebViewFactoryMap::iterator wxWebView::FindFactory(const wxString &backend)
|
||||||
{
|
{
|
||||||
// Initialise the map if needed
|
// Initialise the map, it checks internally for existing factories
|
||||||
if(m_factoryMap.empty())
|
|
||||||
InitFactoryMap();
|
InitFactoryMap();
|
||||||
|
|
||||||
return m_factoryMap.find(backend);
|
return m_factoryMap.find(backend);
|
||||||
@ -100,9 +99,11 @@ wxStringWebViewFactoryMap::iterator wxWebView::FindFactory(const wxString &backe
|
|||||||
void wxWebView::InitFactoryMap()
|
void wxWebView::InitFactoryMap()
|
||||||
{
|
{
|
||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
|
if(m_factoryMap.find(wxWebViewBackendIE) == m_factoryMap.end())
|
||||||
RegisterFactory(wxWebViewBackendIE, wxSharedPtr<wxWebViewFactory>
|
RegisterFactory(wxWebViewBackendIE, wxSharedPtr<wxWebViewFactory>
|
||||||
(new wxWebViewFactoryIE));
|
(new wxWebViewFactoryIE));
|
||||||
#else
|
#else
|
||||||
|
if(m_factoryMap.find(wxWebViewBackendWebKit) == m_factoryMap.end())
|
||||||
RegisterFactory(wxWebViewBackendWebKit, wxSharedPtr<wxWebViewFactory>
|
RegisterFactory(wxWebViewBackendWebKit, wxSharedPtr<wxWebViewFactory>
|
||||||
(new wxWebViewFactoryWebKit));
|
(new wxWebViewFactoryWebKit));
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user