Bug 69105 - [Qt][WK2] Event delivery in QDesktopWebView is broken after merge of Qt5 refactor branch
Summary: [Qt][WK2] Event delivery in QDesktopWebView is broken after merge of Qt5 refa...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Qt (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Zeno Albisser
URL:
Keywords:
Depends on:
Blocks: 69104
  Show dependency treegraph
 
Reported: 2011-09-29 14:14 PDT by Zeno Albisser
Modified: 2011-09-30 04:57 PDT (History)
1 user (show)

See Also:


Attachments
patch for review. (19.47 KB, patch)
2011-09-30 02:27 PDT, Zeno Albisser
no flags Details | Formatted Diff | Diff
patch for review - fixed coding style issues (20.55 KB, patch)
2011-09-30 03:43 PDT, Zeno Albisser
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Zeno Albisser 2011-09-29 14:14:37 PDT
inputMethodEvents produce endless loops due to QSGItem::event(), QSGItem::inputMethodEvent() and virtual functions in QDesktopWebView.
Comment 1 Zeno Albisser 2011-09-29 14:31:25 PDT
it seems that QSGItem changed from using QGraphicsSceneMouseEvents to QMouseEvents.
Comment 2 Zeno Albisser 2011-09-30 02:27:59 PDT
Created attachment 109269 [details]
patch for review.
Comment 3 WebKit Review Bot 2011-09-30 02:30:37 PDT
Attachment 109269 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebKit2/ChangeLog', u'Source/WebKit..." exit_code: 1

Source/WebKit2/Shared/qt/WebEventFactoryQt.h:44:  The parameter name "event" adds no information, so it should be removed.  [readability/parameter_name] [5]
Source/WebKit2/Shared/qt/WebEventFactoryQt.h:45:  The parameter name "event" adds no information, so it should be removed.  [readability/parameter_name] [5]
Source/WebKit2/Shared/qt/WebEventFactoryQt.cpp:56:  A case label should not be indented, but line up with its switch statement.  [whitespace/indent] [4]
Total errors found: 3 in 11 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Andreas Kling 2011-09-30 02:48:12 PDT
Comment on attachment 109269 [details]
patch for review.

View in context: https://bugs.webkit.org/attachment.cgi?id=109269&action=review

> Source/WebKit2/UIProcess/API/qt/qdesktopwebview.cpp:360
> +    if (ev->type() == QEvent::InputMethod)
> +        return false; // This is necessary to avoid an endless loop in connection with QSGItem::event().

I thought that happened because we reimplemented inputMethodEvent()?
Comment 5 Zeno Albisser 2011-09-30 02:56:42 PDT
(In reply to comment #4)
> (From update of attachment 109269 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=109269&action=review
> 
> > Source/WebKit2/UIProcess/API/qt/qdesktopwebview.cpp:360
> > +    if (ev->type() == QEvent::InputMethod)
> > +        return false; // This is necessary to avoid an endless loop in connection with QSGItem::event().
> 
> I thought that happened because we reimplemented inputMethodEvent()?

Yes... this, or the other way round.
I did not remove the inputMethodEvent() function because it seems we still need to feed the events into QSGItem. But we don't want QSGItem to return us the same events again.
I think there is still room for improvement in QSGItem. I don't see why this one only handles InputMethodEvents but no other events.
Comment 6 Zeno Albisser 2011-09-30 03:43:58 PDT
Created attachment 109278 [details]
patch for review - fixed coding style issues
Comment 7 Andreas Kling 2011-09-30 03:53:34 PDT
Comment on attachment 109278 [details]
patch for review - fixed coding style issues

r=me
Comment 8 WebKit Review Bot 2011-09-30 04:57:36 PDT
Comment on attachment 109278 [details]
patch for review - fixed coding style issues

Clearing flags on attachment: 109278

Committed r96399: <http://trac.webkit.org/changeset/96399>
Comment 9 WebKit Review Bot 2011-09-30 04:57:40 PDT
All reviewed patches have been landed.  Closing bug.