WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
37847
QWebPage::linkClicked() should give an indication of the target frame
https://bugs.webkit.org/show_bug.cgi?id=37847
Summary
QWebPage::linkClicked() should give an indication of the target frame
Bernhard Rosenkraenzer
Reported
2010-04-20 03:28:52 PDT
There's currently no way (or at least no obvious way) for a QWebView that needs customized handling of links to see the target frame of a link. It would be good if QWebPage::linkClicked() provided both the clicked url and the link's target frame, or maybe even the QWebHitTestResult that caused linkClicked() to be triggered.
Attachments
Add attachment
proposed patch, testcase, etc.
Simon Hausmann
Comment 1
2010-06-04 05:26:42 PDT
Indeed, linkClicked() doesn't provide this functionality. But you can easily get the information you're looking for by re-implementing QWebPage::acceptNavigationRequest. Its default implementatino is the place where linkClicked() is emitted from. This function has the target QWebFrame as a parameter.
Bernhard Rosenkraenzer
Comment 2
2010-06-04 05:36:21 PDT
Right... but it would IMO be better to just change lines 2376 and 2380 of qwebpage.cpp to emit linkClicked(request.url(), frame); [once changing the ABI is ok, so probably not before Qt5] -- the information is rather relevant, and having to overload QWebPage to access it is not a very convenient way to get it (also implies having to setPage() on any QWebView).
Simon Hausmann
Comment 3
2010-06-04 06:20:10 PDT
Fair enough, we could overload linkClicked() I think.
Jocelyn Turcotte
Comment 4
2014-02-03 03:50:42 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. 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.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug