Bug 49370 - [Qt] linkDelegationPolicy and linkClicked signal to the declarative WebView
Summary: [Qt] linkDelegationPolicy and linkClicked signal to the declarative WebView
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P4 Enhancement
Assignee: Nobody
URL:
Keywords: Qt, QtTriaged
Depends on:
Blocks:
 
Reported: 2010-11-11 01:23 PST by Henry Haverinen
Modified: 2014-02-03 03:16 PST (History)
4 users (show)

See Also:


Attachments
Example test app that requires the linkClicked signals and the linkDelegationPolicy to be set (47.18 KB, application/zip)
2010-11-12 02:51 PST, Mikko Vihonen
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Henry Haverinen 2010-11-11 01:23:25 PST
The QML WebView does not support the link delegation policy or linkClicked signal that are supported in QWebView (see http://doc.qt.nokia.com/4.7/qwebview.html#linkClicked). This feature would be useful for Qt Quick developers too.
Comment 1 Benjamin Poulain 2010-11-11 07:38:09 PST
Closing until you give use cases for this.

In general, this signal is too limited for the conventientional use cases. Users generally end up using QWebPage::acceptNavigationRequest() instead of linkClicked.
Comment 2 Mikko Vihonen 2010-11-12 02:51:06 PST
Created attachment 73724 [details]
Example test app that requires the linkClicked signals and the linkDelegationPolicy to be set

The linkClicked signal is important in cases where the QML programmer wants to have more control on how the WebView behaves. Here's an example:

"I want to create a new WebView with the link URL from link clicked so that I can use a QML Transition to show the user that he/she has navigated away from the application content into a 3rd party website".

Using onUrlChanged and then stopping seems to cause the WebView to start loading, which seems to cause the webView to blank. Also, doing transitions while WebView is loading content can cause choppy transitions.

See the attachment for a demo with a custom WebView with linkClicked enabled
Comment 3 Benjamin Poulain 2010-11-12 03:27:32 PST
> See the attachment for a demo with a custom WebView with linkClicked enabled

In my opinion the example attached illustrates my point on why we should not have this. :)

But I don't care that much about the issue so I can reopen this. Feel free to provide a patch for API reviews.
Comment 4 Bernd Stramm 2011-04-09 06:12:30 PDT
this functionality is valuable in 2 use case:

1 The application does not want to open the link in this instances of webview (that is embedded in the application), but wants to call xdg_open. It cannot do that with the currently supported QML WebView signals.

2. The link is not an http link, but instead some other scheme that WebView or the browser engine does not know about. With link delegation and a linkClicked signal, the application can handle this case easily.
Comment 5 Jocelyn Turcotte 2014-02-03 03:16:56 PST
=== Bulk closing of Qt bugs ===

If you believe that this bug report is still relevant for a non-Qt port of webkit.org, please re-open it and remove [Qt] from the summary.

If you believe that this is still an important QtWebKit bug, please fill a new report at https://bugreports.qt-project.org and add a link to this issue. See http://qt-project.org/wiki/ReportingBugsInQt for additional guidelines.