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 .
(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 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.
Then we should add a #ifdef or an XFAIL for maemo. I am not sure which one makes most sense.
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.
The maemo issue has been handled in bug 39314.
Mac does not give the focus back to the view. I believe that it is a problem in Qt for Mac OS.
Created attachment 71289 [details] proposal fix
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.
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