Add support for EVT_WEB_VIEW_NEWWINDOW to the OSX WebKit backend.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/SOC2011_WEBVIEW@68397 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
45aa63c288
commit
b236f090ed
@ -1170,7 +1170,6 @@ wxString nsErrorToWxHtmlError(NSError* error, wxWebNavigationError* out)
|
||||
frame:(WebFrame *)frame
|
||||
decisionListener:(id<WebPolicyDecisionListener>)listener
|
||||
{
|
||||
//wxUnusedVar(sender);
|
||||
wxUnusedVar(frame);
|
||||
|
||||
wxASSERT(wx_webviewctrls.find(sender) != wx_webviewctrls.end());
|
||||
@ -1201,8 +1200,17 @@ wxString nsErrorToWxHtmlError(NSError* error, wxWebNavigationError* out)
|
||||
newFrameName:(NSString *)frameName
|
||||
decisionListener:(id < WebPolicyDecisionListener >)listener
|
||||
{
|
||||
wxUnusedVar(sender);
|
||||
wxUnusedVar(actionInformation);
|
||||
|
||||
wxASSERT(wx_webviewctrls.find(sender) != wx_webviewctrls.end());
|
||||
NSString *url = [[request URL] absoluteString];
|
||||
wxString target = wxStringWithNSString([frame name]);
|
||||
wxWebNavigationEvent thisEvent(wxEVT_COMMAND_WEB_VIEW_NEWWINDOW,
|
||||
wx_webviewctrls[sender]->GetId(),
|
||||
wxStringWithNSString( url ), target, true);
|
||||
|
||||
if (webKitWindow && webKitWindow->GetEventHandler())
|
||||
webKitWindow->GetEventHandler()->ProcessEvent(thisEvent);
|
||||
|
||||
[listener ignore];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user