RESOLVED WONTFIX99149
[EFL][WTR] Perform blur before focus on each test in WebKitTestRunner
https://bugs.webkit.org/show_bug.cgi?id=99149
Summary [EFL][WTR] Perform blur before focus on each test in WebKitTestRunner
Mariusz Grzegorczyk
Reported 2012-10-12 01:07:45 PDT
Tests, in which focus is switched to subframe left FrameSelection on main frame unfocussed. It affects tests which follow broken one - "shouldBeginEditing" callbacks are not generated.
Attachments
patch (2.62 KB, patch)
2012-10-12 01:10 PDT, Mariusz Grzegorczyk
no flags
Mariusz Grzegorczyk
Comment 1 2012-10-12 01:10:43 PDT
Kangil Han
Comment 2 2012-10-12 01:39:51 PDT
Code itself looks good to me since it's done in reset stage between run of each test case. However, as focus/blur has strong impact on layout test, I would recommend you to run full layout test and check if regression happens. :-)
Chris Dumez
Comment 3 2012-10-12 02:10:34 PDT
Comment on attachment 168374 [details] patch You say it fixes a problem but you don't unskip any test. So how do we know it is better now?
Mariusz Grzegorczyk
Comment 4 2012-10-12 02:36:24 PDT
I've ran full layout tests without http ones, and this patch fixes ~15 tests. What's more important it fixes random failures in other tests(when child processes are greater than 1)
Chris Dumez
Comment 5 2012-10-12 02:49:04 PDT
(In reply to comment #4) > I've ran full layout tests without http ones, and this patch fixes ~15 tests. What's more important it fixes random failures in other tests(when child processes are greater than 1) Then please unskip them in the same patch.
Mariusz Grzegorczyk
Comment 6 2012-10-12 03:18:55 PDT
(In reply to comment #5) > (In reply to comment #4) > > I've ran full layout tests without http ones, and this patch fixes ~15 tests. What's more important it fixes random failures in other tests(when child processes are greater than 1) > > Then please unskip them in the same patch. The problem is that this patch doesn't fix specified tests, but general flow. Problematic test is passed, but has influence on next one, and this next one is randomic.
Kangil Han
Comment 7 2012-10-12 03:32:48 PDT
(In reply to comment #4) > I've ran full layout tests without http ones, and this patch fixes ~15 tests. What's more important it fixes random failures in other tests(when child processes are greater than 1) This would prove improvement on flaky test cases. :-)
Kangil Han
Comment 8 2012-10-12 03:36:00 PDT
Please unskip passed flaky test cases here. :-)
Chris Dumez
Comment 9 2012-10-12 03:39:52 PDT
Comment on attachment 168374 [details] patch All this patch does it call: evas_object_focus_set(m_view, false); evas_object_focus_set(m_view, true); in a row, instead of simply calling: evas_object_focus_set(m_view, true); right? I don't get why this has any impact, why we need it, and why other ports don't. This fix does not look right to me.
Kangil Han
Comment 10 2012-10-12 04:55:29 PDT
(In reply to comment #9) > All this patch does it call: > evas_object_focus_set(m_view, false); > evas_object_focus_set(m_view, true); > These two lines of code is not so strange to me in practical project. Generally due to 'code guarding from another unknown bug' or 'library defect'. But, it couldn't be a solution. :-) @Mariusz, Would you please verify how focus works by using 'evas_focus_get'? You can refer to 'http://docs.enlightenment.org/auto/evas/Example_Evas_Events.html' for code details. :) Maybe, another component steal focus or efl has defect.
Mariusz Grzegorczyk
Comment 11 2012-10-12 05:15:16 PDT
evas_object_focus_set makes no effect on already focused Evas_Object. Same on widgets in gtk. Problem exists also at least on gtk port. So making only focus at the beginning of test does nothing. Problem is inside webkit: There is focus on webview(Evas_Object), Frame, FocusController and FrameSelection If some test using subframe switch focus to it, subframe takes focus, and on test exit it is destroyed, so none frame is focused, but webview is. The problem is that after this operation in following test main frame has FrameSelection unfocussed so editing callbacks don't come. Patch makes unfocus on webview so all components are blurred, than on focus all of them takes focus: FocusController and FrameSelection.
Chris Dumez
Comment 12 2012-10-14 23:20:44 PDT
Comment on attachment 168374 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=168374&action=review You should unskip the flaky tests that it fixes in the same patch otherwise we cannot tell that it changes anything. > Tools/WebKitTestRunner/TestController.cpp:518 > + m_mainWebView->blur(); We - at least - need a comment here to explain why the EFL port needs this.
Kangil Han
Comment 13 2012-10-15 00:41:59 PDT
I think gtk+ port reviewers should know this kind of behavior since you mentioned gtk+ port has same issue.
Mariusz Grzegorczyk
Comment 14 2012-10-15 06:53:45 PDT
(In reply to comment #12) > (From update of attachment 168374 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=168374&action=review > > You should unskip the flaky tests that it fixes in the same patch otherwise we cannot tell that it changes anything. In editing category there's a lot of skipped subcategories(deleting, inserting, selection, spelling, style). A lot have also missing expected results. Some of them have different cause of being skipped. To check this change you can run following 2 tests one after other: editing/undo/undo-iframe-location-change.html LayoutTests/editing/undo/undo-indent.html Without this patch you can see following lines in diff file: -EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of OL > DIV > BODY > HTML > #document to 9 of OL > DIV > BODY > HTML > #document -EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification I suggest make gardening in separate patch including this change. > > > Tools/WebKitTestRunner/TestController.cpp:518 > > + m_mainWebView->blur(); > > We - at least - need a comment here to explain why the EFL port needs this. In DRT following code at the beginning of each test solves this problem: ewk_frame_feed_focus_in(mainFrame());
Gyuyoung Kim
Comment 15 2013-02-01 17:19:21 PST
Any update ?
Gyuyoung Kim
Comment 16 2013-06-23 23:40:36 PDT
Comment on attachment 168374 [details] patch Cleared review? from attachment 168374 [details] so that this bug does not appear in http://webkit.org/pending-review. If you would like this patch reviewed, please attach it to a new bug or this bug again.
Michael Catanzaro
Comment 17 2017-03-11 10:33:14 PST
Closing this bug because the EFL port has been removed from trunk. If you feel this bug applies to a different upstream WebKit port and was closed in error, please either update the title and reopen the bug, or leave a comment to request this.
Note You need to log in before you can comment on or make changes to this bug.