[M120 Migration][VD] Fix window lost focus after dialog close 30/307530/3
authorfangfengrong <fr.fang@samsung.com>
Tue, 12 Mar 2024 00:40:21 +0000 (08:40 +0800)
committerfangfengrong <fr.fang@samsung.com>
Wed, 13 Mar 2024 01:43:26 +0000 (09:43 +0800)
commita0abc23a8a028e8580ac54473f07fd5450cf383e
treef0bcd81dc8b86c1d4a48c2f67c01cabae59c2909
parent67b311ed5bf6336cdda5cbccd51147014c5fce8d
[M120 Migration][VD] Fix window lost focus after dialog close

Here an issue:
When dialog show and hide, app only receive the window.blur event,
without the window.focus event.

when dialog show, chromium set Process blocked(IsIgnoringInputEvents is true);
when dialog hide, chromium reset Process block(IsIgnoringInputEvents is false);
Once app set focus before Process block reset, the focus will been blocked.

OnWindowFocused Function, only IgnoringInputEvents for gained_focus case,
don't IgnoringInputEvents for lost_focus case, it cause the blur event
been delivered to app, but the focus event don't.

Whenever dialog show, chromium ignores the input event to avoid dismissing dialog.
While app might forcefully set focus on webview even if dialog are being shown.
So don't check IgnoringInputEvents both for gained_focus and lost_focus.

refer:
https://review.tizen.org/gerrit/#/c/304248

Change-Id: Ia998518560b7816129518a51c779d728168d8190
Signed-off-by: fangfengrong <fr.fang@samsung.com>
content/browser/renderer_host/render_frame_host_impl.cc
content/browser/renderer_host/render_widget_host_view_aura.cc
third_party/blink/renderer/core/dom/document.cc
third_party/blink/renderer/core/page/focus_controller.cc