Fire wxEVT_WEBVIEW_NAVIGATING when redirecting

When using IE wxWebView backend, this event wasn't generated as expected
when the client was redirected.

Fix this by using DOCHOSTUIFLAG_ENABLE_REDIRECT_NOTIFICATION flag.

Closes https://github.com/wxWidgets/wxWidgets/pull/893
This commit is contained in:
Josue Andrade Gomes
2018-08-22 07:20:29 -03:00
committed by Vadim Zeitlin
parent 4fd80960ca
commit 0bd8fe91e7
3 changed files with 9 additions and 3 deletions

View File

@@ -135,6 +135,7 @@ wxMSW:
- Implement wxFontDialog::SetTitle() (Vitaly Stakhovsky). - Implement wxFontDialog::SetTitle() (Vitaly Stakhovsky).
- Fix build in ANSI (non-Unicode) mode. - Fix build in ANSI (non-Unicode) mode.
- Improve wxNotebook themed background drawing (Arrigo Marchiori). - Improve wxNotebook themed background drawing (Arrigo Marchiori).
- Send wxEVT_WEBVIEW_NAVIGATING when redirecting (Josue Andrade Gomes).
wxOSX: wxOSX:

View File

@@ -165,7 +165,8 @@ typedef enum _tagwxDOCHOSTUIFLAG
DOCHOSTUIFLAG_NO3DOUTERBORDER = 0x200000, DOCHOSTUIFLAG_NO3DOUTERBORDER = 0x200000,
DOCHOSTUIFLAG_DISABLE_EDIT_NS_FIXUP = 0x400000, DOCHOSTUIFLAG_DISABLE_EDIT_NS_FIXUP = 0x400000,
DOCHOSTUIFLAG_LOCAL_MACHINE_ACCESS_CHECK = 0x800000, DOCHOSTUIFLAG_LOCAL_MACHINE_ACCESS_CHECK = 0x800000,
DOCHOSTUIFLAG_DISABLE_UNTRUSTEDPROTOCOL = 0x1000000 DOCHOSTUIFLAG_DISABLE_UNTRUSTEDPROTOCOL = 0x1000000,
DOCHOSTUIFLAG_ENABLE_REDIRECT_NOTIFICATION = 0x4000000
} DOCHOSTUIFLAG; } DOCHOSTUIFLAG;
typedef struct _tagwxDOCHOSTUIINFO typedef struct _tagwxDOCHOSTUIINFO

View File

@@ -1640,8 +1640,12 @@ HRESULT wxSTDCALL DocHostUIHandler::ShowContextMenu(DWORD dwID, POINT *ppt,
HRESULT wxSTDCALL DocHostUIHandler::GetHostInfo(DOCHOSTUIINFO *pInfo) HRESULT wxSTDCALL DocHostUIHandler::GetHostInfo(DOCHOSTUIINFO *pInfo)
{ {
//don't show 3d border and enable themes. // Don't show 3d border and enable themes and also enable sending redirect
pInfo->dwFlags = pInfo->dwFlags | DOCHOSTUIFLAG_NO3DBORDER | DOCHOSTUIFLAG_THEME; // notifications as otherwise we wouldn't get wxEVT_WEBVIEW_NAVIGATING when
// redirected.
pInfo->dwFlags |= DOCHOSTUIFLAG_NO3DBORDER |
DOCHOSTUIFLAG_THEME |
DOCHOSTUIFLAG_ENABLE_REDIRECT_NOTIFICATION;
return S_OK; return S_OK;
} }