[Webkit-unassigned] [Bug 104087] New: "hitTestContent" function bug for <span> tag

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Dec 4 22:01:04 PST 2012


           Summary: "hitTestContent" function bug for <span> tag
           Product: WebKit
           Version: 417.x
          Platform: Other
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: Major
          Priority: P3
         Component: HTML Events
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: khpatel.11 at gmail.com

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();
    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.

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the webkit-unassigned mailing list