Bug 80057 - [chromium] Pass WebNavigationPolicy to WebViewClient::createView
Summary: [chromium] Pass WebNavigationPolicy to WebViewClient::createView
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit API (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Charles Reis
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-01 15:19 PST by Charles Reis
Modified: 2012-03-05 11:50 PST (History)
4 users (show)

See Also:


Attachments
Patch (6.81 KB, patch)
2012-03-01 15:25 PST, Charles Reis
no flags Details | Formatted Diff | Diff
Patch (11.58 KB, patch)
2012-03-02 15:34 PST, Charles Reis
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Charles Reis 2012-03-01 15:19:45 PST
For the Chromium port, we would like to know the window disposition (e.g., background/foreground tab/window) inside WebViewClient::createView.

Chromium's WebNavigationPolicy enum tracks the window disposition, and it is currently stored as a member of FrameLoaderClientImpl from dispatchDecidePolicyForNewWindowAction until dispatchCreatePage, where it gets passed to WebViewImpl for use in show.  To make it available to createView, we also need to change dispatchCreatePage to give it to ChromeClientImpl.

This is useful for opening new window navigations in a new process, as part of http://crbug.com/69267.
Comment 1 Charles Reis 2012-03-01 15:25:01 PST
Created attachment 129757 [details]
Patch
Comment 2 Build Bot 2012-03-01 15:43:28 PST
Comment on attachment 129757 [details]
Patch

Attachment 129757 [details] did not pass win-ews (win):
Output: http://queues.webkit.org/results/11767628
Comment 3 Charles Reis 2012-03-01 15:50:11 PST
Note: the current patch isn't quite right yet, but it shows the general intent.  There are some paths we can take to ChromeClientImpl::createWindow without going through FrameLoaderClientImpl::dispatchCreatePage, in which case we don't set the WebNavigationPolicy first.  As a result, we fail the assert.
Comment 4 Darin Fisher (:fishd, Google) 2012-03-02 15:07:05 PST
Comment on attachment 129757 [details]
Patch

This is what I was expecting...
Comment 5 Charles Reis 2012-03-02 15:34:32 PST
Created attachment 129966 [details]
Patch
Comment 6 WebKit Review Bot 2012-03-02 15:36:44 PST
Please wait for approval from fishd@chromium.org before submitting because this patch contains changes to the Chromium public API.
Comment 7 Darin Fisher (:fishd, Google) 2012-03-02 15:38:14 PST
Comment on attachment 129966 [details]
Patch

That makes sense.  R=me
Comment 8 WebKit Review Bot 2012-03-05 11:50:23 PST
Comment on attachment 129966 [details]
Patch

Clearing flags on attachment: 129966

Committed r109778: <http://trac.webkit.org/changeset/109778>
Comment 9 WebKit Review Bot 2012-03-05 11:50:28 PST
All reviewed patches have been landed.  Closing bug.