I tried to submit a ticket but trac is down.
Summary: On Windows wxWbView doesn't trigger EVT_WEBVIEW_NAVIGATING event
Description: with IE backend the event EVT_WEBVIEW_NAVIGATING is not triggered on a page redirection.
Steps to reproduce:
1. Build webview sample
2. Launch webview sample
3. Visit "https://google.com"
On Linux with GTK+ you'll see the events (the second 'Navigation request' is the redirection)
Code: Select all
13:41:06: Navigation request to 'https://google.com/' (target='')
13:41:07: Navigation request to 'https://www.google.com/' (target='')
13:41:07: Navigation complete; url='https://www.google.com/'
Code: Select all
13:41:32: Navigation request to 'https://google.com/' (target='')
13:41:33: Navigation complete; url='https://www.google.com/'
See patch below:
Code: Select all
diff --git a/src/msw/webview_ie.cpp b/src/msw/webview_ie.cpp
index 46f7f410e0..43f97a52ce 100644
--- a/src/msw/webview_ie.cpp
+++ b/src/msw/webview_ie.cpp
@@ -31,6 +31,10 @@
#include <initguid.h>
#include <wininet.h>
+#ifndef DOCHOSTUIFLAG_ENABLE_REDIRECT_NOTIFICATION
+#define DOCHOSTUIFLAG_ENABLE_REDIRECT_NOTIFICATION 0x04000000
+#endif
+
/* These GUID definitions are our own implementation to support interfaces
* normally in urlmon.h. See include/wx/msw/webview_ie.h
*/
@@ -1629,7 +1633,7 @@ HRESULT wxSTDCALL DocHostUIHandler::ShowContextMenu(DWORD dwID, POINT *ppt,
HRESULT wxSTDCALL DocHostUIHandler::GetHostInfo(DOCHOSTUIINFO *pInfo)
{
//don't show 3d border and enable themes.
- pInfo->dwFlags = pInfo->dwFlags | DOCHOSTUIFLAG_NO3DBORDER | DOCHOSTUIFLAG_THEME;
+ pInfo->dwFlags = pInfo->dwFlags | DOCHOSTUIFLAG_NO3DBORDER | DOCHOSTUIFLAG_THEME | DOCHOSTUIFLAG_ENABLE_REDIRECT_NOTIFICATION;
return S_OK;
}