WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
38614
QGraphicsWebView and QWebView does not call QInoutContext::mouseHandler()
https://bugs.webkit.org/show_bug.cgi?id=38614
Summary
QGraphicsWebView and QWebView does not call QInoutContext::mouseHandler()
Manish
Reported
2010-05-05 17:31:16 PDT
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; }
Attachments
Add attachment
proposed patch, testcase, etc.
Alexey Proskuryakov
Comment 1
2022-07-29 10:47:46 PDT
The Qt port has been removed from WebKit, resolving.
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