Bug 38658 - [Qt] tst_QWebFrame::popupFocus() fails on Mac OS
Summary: [Qt] tst_QWebFrame::popupFocus() fails on Mac OS
Status: RESOLVED WORKSFORME
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: Qt, QtTriaged
Depends on:
Blocks: 38654
  Show dependency treegraph
 
Reported: 2010-05-06 10:30 PDT by Jesus Sanchez-Palencia
Modified: 2011-06-14 06:07 PDT (History)
4 users (show)

See Also:


Attachments
proposal fix (2.18 KB, patch)
2010-10-20 06:55 PDT, Yi Shen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jesus Sanchez-Palencia 2010-05-06 10:30:30 PDT
Using WebKit r58755 and Qt 4.7 HEAD 32ecf8e8ad326ea13ec9a430c99ce540e8b4efac I noticed that this test fails on Mac OS.

The message is: 'view.hasFocus() && !combo->view()->hasFocus()' returned FALSE .
Comment 1 Jesus Sanchez-Palencia 2010-05-06 13:25:36 PDT
(In reply to comment #0)
> Using WebKit r58755 and Qt 4.7 HEAD 32ecf8e8ad326ea13ec9a430c99ce540e8b4efac I
> noticed that this test fails on Mac OS.
> 
> The message is: 'view.hasFocus() && !combo->view()->hasFocus()' returned FALSE
> .

It also fails on Maemo5 with Qt 4.6 and the same stated revision of WebKit, with the message: ('combo != 0' returned FALSE).
Comment 2 Luiz Agostini 2010-05-07 14:57:13 PDT
(In reply to comment #1)
> (In reply to comment #0)
> > Using WebKit r58755 and Qt 4.7 HEAD 32ecf8e8ad326ea13ec9a430c99ce540e8b4efac I
> > noticed that this test fails on Mac OS.
> > 
> > The message is: 'view.hasFocus() && !combo->view()->hasFocus()' returned FALSE
> > .
> 
> It also fails on Maemo5 with Qt 4.6 and the same stated revision of WebKit,
> with the message: ('combo != 0' returned FALSE).

In Maemo5 no combo box is used. The test will not work in Maemo5.
Comment 3 Kenneth Rohde Christiansen 2010-05-07 14:58:38 PDT
Then we should add a #ifdef or an XFAIL for maemo. I am not sure which one makes most sense.
Comment 4 Kenneth Rohde Christiansen 2010-05-07 15:14:22 PDT
I suggest we split this bug up into two as the failures are not really related.

Mac fails because it does not give the focus back to the view, and Maemo has no QComboBox, thus the test doesn't really apply and we might thus mark it XFAIL or adapt the test to make sense on Maemo.
Comment 5 Luiz Agostini 2010-05-18 15:01:35 PDT
The maemo issue has been handled in bug 39314.
Comment 6 Luiz Agostini 2010-05-19 12:05:57 PDT
Mac does not give the focus back to the view. I believe that it is a problem in Qt for Mac OS.
Comment 7 Yi Shen 2010-10-20 06:55:14 PDT
Created attachment 71289 [details]
proposal fix
Comment 8 Yi Shen 2010-10-20 07:02:35 PDT
I think this test case might be incorrect. I tested both firefox and safari, and none of them give the focus back to webview after click outside of a select list. (e.g. a page has a select list and input field. First, click the list to popup the select list; then click the input field; The result is that no focus/cursor shows in the input field and you have to click the input filed again to set the focus/cursor on it).

Also, I checked the Qt code and found the first click event is eaten by qcombox to hide itself. Then the second click event can reach the webview. So, I made a few changes to this test case to help pass the test.
Comment 9 Alexis Menard (darktears) 2011-06-14 06:07:36 PDT
I'm curious I can't reproduce the failure here with QtWebKit 2.2 (or trunk) with a recent 4.7 Cocoa build.

Please re-open if more informations