WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
104087
[Qt] "hitTestContent" function bug for <span> tag
https://bugs.webkit.org/show_bug.cgi?id=104087
Summary
[Qt] "hitTestContent" function bug for <span> tag
kkpatel
Reported
2012-12-04 22:03:30 PST
I have implemented a code to get a name of html tag from webpage where user clicked. To get tag name, I have used “hitTestContent” function. Below is the code which I used in Qt 4.8 demo browser:- void WebView::mousePressEvent(QMouseEvent *event) { m_page->m_pressedButtons = event->buttons(); m_page->m_keyboardModifiers = event->modifiers(); QWebView::mousePressEvent(event); QWebFrame *pFrame = m_page->frameAt(event->pos()); QWebHitTestResult HitResult = pFrame->hitTestContent(event->pos()); QWebElement WebElement = HitResult.element(); if (!WebElement.isNull()) //Control does not enter in this loop for <span> tag { qDebug() << "Mouse Pressed:" << WebElement.localName() << WebElement.parent().localName(); } } I am able to get almost all tag name when I clicked on webpage. But this code fails for <span> tag. I have checked this in Qt 4.7, but the result is same.
Attachments
Add attachment
proposed patch, testcase, etc.
Antonio Gomes
Comment 1
2013-08-21 09:04:24 PDT
Do you have a test case?
bugmenot
Comment 2
2013-12-11 20:34:47 PST
I suspect this is a duplicate of
bug #87341
, which I hope will be fixed. I am experiencing a problem (Qt 4.7.1) with QWebHitTestResult::element(). Whenever any TEXT is hit by the point passed to hitTestContent(), the element returned is null, even though the QWebHitTestResult::boundingRect() is correct and valid. Regards Ryan Cuthbertson
Jocelyn Turcotte
Comment 3
2014-02-03 03:23:47 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.
Lucas Forschler
Comment 4
2019-02-06 09:19:02 PST
Mass move bugs into the DOM component.
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