[webkit-dev] problem with ChromeClient::createWindow & NewWindow policy
Anton V. Tarasov
Anton.Tarasov at Sun.COM
Thu Sep 18 23:38:57 PDT 2008
Ones again about creating new window & policy. Please, have a look.
Say, we have main.html as below:
<a href="main.html" target="_blank">Open new window</a>
The first link opens main.html in new window, the second does the same
However, I'm observing quite different behavior of WebCore.
A new window is opened by a client via ChromeClient::createWindow callback.
There's also a mechanism to check NewWindow policy, implemented
Now, when I'm clicking the first link, ChromeClient::createWindow is not called
at all, FrameLoaderClient::dispatchDecidePolicyForNewWindowAction is called.
Simple grep in WebCore sources gives the following. ChromeClient::createWindow
is called only by:
- ContextMenuController (on selecting "Open link in new window" item)
With the second link there's another issue. Just the reverse, ChromeClient::createWindow
is called, FrameLoaderClient::dispatchDecidePolicyForNewWindowAction is not...
Why that difference? How to open new window in the first case, and why policy check
is not triggered in the second?
More information about the webkit-dev