Bug 81424 - WebUIDelegate call should pass URL
Summary: WebUIDelegate call should pass URL
Status: UNCONFIRMED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows 7
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-16 15:48 PDT by Lynn Neir
Modified: 2012-03-16 15:48 PDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lynn Neir 2012-03-16 15:48:43 PDT
Currently, call to createWebViewWithRequest passes null for request arg in WebFrameLoaderClient::dispatchCreatePage (WebKit/win/WebCoreSupport/WebFrameLoadClient.cpp).  

Would like it to pass through URL (if available). 

Current code:
...
    COMPtr<IWebView> newWebView;
    if (FAILED(ui->createWebViewWithRequest(webView, 0, &newWebView)))
        return 0;
...

Proposed Change:
...
  COMPtr<IWebMutableURLRequest> request(AdoptCOM, WebMutableURLRequest::createInstance());
  if (!action.isEmpty())
  {
     BString urlBstr(action.url());
     request->setURL(urlBstr);
  }

  COMPtr<IWebView> newWebView;
  if (FAILED(ui->createWebViewWithRequest(webView, request.get(), &newWebView)))
    return 0;
...