[WebKit-devel] Review Request: Honour the "Open links in new tab instead of new window" option
Jonathan Marten
jjm at keelhaul.me.uk
Tue Nov 20 09:18:02 UTC 2012
> On Nov. 8, 2012, 5:20 p.m., Dawit Alemayehu wrote:
> > I see you did some testing which is good, but did you test to make sure that javascript popups with a size or other window related information are still opened in a new window regardless of the options in this setting ? There is a file called link_tests.html under the tests directory in kwebkitpart's source code for testing that stuff. More specifically, the 1st link under the "Javascript Link Tests" section should open a new window regardless of whether this option or the "Open popups in a new tab instead of in new window" are checked or not. If that works fine then, please change it in slotFinished as well and commit the fix.
> >
> > Thanks for the patch.
> >
> >
Have tested that page with all 4 possible combinations of the two popup options, with both KHTML and WebKit. Results are as would be expected, and identical between the two engines in all cases. JS dialogue-style popups (the first two of "Javascript Link Tests") always open in a popup window regardless of the Konqueror options. New window (the third in that section) honours the tab option.
- Jonathan
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/107238/#review21633
-----------------------------------------------------------
On Nov. 7, 2012, 12:02 p.m., Jonathan Marten wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/107238/
> -----------------------------------------------------------
>
> (Updated Nov. 7, 2012, 12:02 p.m.)
>
>
> Review request for kwebkitpart.
>
>
> Description
> -------
>
> If using the WebKit part as the default HTML engine in Konqueror, its "Open links in new tab instead of in new window" option appears to be ignored. I'm not intimately familiar with the kwebkitpart code, but what appears to be happening is that it is setting the "action requested by user" flag to always false for any navigation request. This then ignores the Konqueror setting in KonqMainWindow::slotCreateNewWindow().
>
> Looking at the logic in NewWindowPage::acceptNavigationRequest(), the m_disableJSOpenwindowCheck appears to be a flag saying whether this page is being opened as a result of a JS popup. I'm assuming, therefore, that the reverse of that is a normal user interaction, and "requested by user" should be set accordingly.
>
> Should this also be done in NewWindowPage::slotLoadFinished()?
>
>
> This addresses bug 309649.
> http://bugs.kde.org/show_bug.cgi?id=309649
>
>
> Diffs
> -----
>
> src/webpage.cpp 2f224dc
>
> Diff: http://git.reviewboard.kde.org/r/107238/diff/
>
>
> Testing
> -------
>
> Built kwebitpart with this change, checked operation with the test case as described in the bug and other web browsing (including sites which open new windows and JS popups). New windows and tabs are opened as expected.
>
>
> Thanks,
>
> Jonathan Marten
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/webkit-devel/attachments/20121120/191a993d/attachment.html>
More information about the WebKit-devel
mailing list