[Webkit-unassigned] [Bug 38614] New: QGraphicsWebView and QWebView does not call QInoutContext::mouseHandler()

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed May 5 17:31:16 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=38614

           Summary: QGraphicsWebView and QWebView does not call
                    QInoutContext::mouseHandler()
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: UNCONFIRMED
          Severity: Critical
          Priority: P1
         Component: WebKit API
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: manish.s.sharma at nokia.com
                CC: manish.s.sharma at nokia.com


QGraphicsWebView and QWebView widgets do not call QInputContext::mouseHandler. 
Below is the description for QInputContext::mouseHandler().

---------------------------------------------------------------------

void QInputContext::mouseHandler ( int x, QMouseEvent * event )   [virtual]
This function can be reimplemented in a subclass to handle mouse press,
release, double-click, and move events within the preedit text. You can use the
function to implement mouse-oriented user interface such as text selection or
popup menu for candidate selection.

The x parameter is the offset within the string that was sent with the
InputMethodCompose event. The alteration boundary of x is ensured as character
boundary of preedit string accurately.

---------------------------------------------------------------------


QInputContext::mouseHandler should be called from QGraphicsWebView and QWebView
similar to QLineEdit and QTextEdit because they are the one which gets the
mousePress and mouseRelease events. Below is the reference code from QLineEdit.


void QLineEdit::mousePressEvent(QMouseEvent* e)
{
    Q_D(QLineEdit);
    if (d->sendMouseEventToInputContext(e))
        return;
.
.
.

}


bool QLineEditPrivate::sendMouseEventToInputContext( QMouseEvent *e )
{
#if !defined QT_NO_IM
    Q_Q(QLineEdit);
    if ( control->composeMode() ) {
    int tmp_cursor = xToPos(e->pos().x());
    int mousePos = tmp_cursor - control->cursor();
    if ( mousePos < 0 || mousePos > control->preeditAreaText().length() ) {
            mousePos = -1;
        // don't send move events outside the preedit area
            if ( e->type() == QEvent::MouseMove )
                return true;
        }

        QInputContext *qic = q->inputContext();
        if ( qic )
            // may be causing reset() in some input methods
            qic->mouseHandler(mousePos, e);
        if (!control->preeditAreaText().isEmpty())
            return true;
    }
#else
    Q_UNUSED(e);
#endif

    return false;
}

-- 
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