From be19c556083cc197be55acbd05db76ec6dc2e0c4 Mon Sep 17 00:00:00 2001 From: Steve Lamerton Date: Thu, 19 May 2011 20:14:27 +0000 Subject: [PATCH] Block new frames being created in wxWebViewIE, bringing it into line with the other ports. The existing code was mostly correct but a missing break in the switch caused many spurious events. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/SOC2011_WEBVIEW@67766 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/webview.h | 4 ++-- src/msw/webview_ie.cpp | 8 +++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/include/wx/webview.h b/include/wx/webview.h index 28d0b5b141..365e7664e4 100644 --- a/include/wx/webview.h +++ b/include/wx/webview.h @@ -290,8 +290,8 @@ public: // provide a behavior consistent across ports. // - OSX : I receive an event for new frames opened with HTML target, and // currently block them all. - // - IE : The DISPID_NEWWINDOW2 event looks like it should work, but I - // receive way too many of them. A new IE instance opens. + // - IE : An event is recieved for new frames and they are currently + // blocked // - GTK : All frame open requests are blocked. A slot exists that I could // connect to to be notified if ever needed diff --git a/src/msw/webview_ie.cpp b/src/msw/webview_ie.cpp index 6bf16f78ce..7838686bcc 100644 --- a/src/msw/webview_ie.cpp +++ b/src/msw/webview_ie.cpp @@ -656,17 +656,15 @@ void wxWebViewIE::onActiveXEvent(wxActiveXEvent& evt) { m_canNavigateForward = enable; } + break; } - - /* case DISPID_NEWWINDOW2: - //case DISPID_NEWWINDOW3: { - wxLogMessage("DISPID_NEWWINDOW2\n"); wxActiveXEventNativeMSW* nativeParams = evt.GetNativeParameters(); // Cancel the attempt to open a new window *V_BOOLREF(&nativeParams->pDispParams->rgvarg[0]) = VARIANT_TRUE; - }*/ + break; + } } evt.Skip(); -- 2.45.2