The function findTopLevelParent is used when the active state of the browser is determined. It usually works very well, but when there is a window with the style WS_POPUP in the hierarchy which has a parent, the function will not return this window, but keep walking the hierarchy. A window with the WS_POPUP style cannot have the WS_CHILD style, and is a type of top level window, even though it can have a parent/owner.
Created attachment 277151 [details] Patch
Comment on attachment 277151 [details] Patch How did you test this change?
Comment on attachment 277151 [details] Patch r-, as this has been pending review for over a year now. It is near-impossible that this patch still applies to trunk and unlikely to still be relevant in its current form.
This seems to be not applied: https://github.com/WebKit/WebKit/blob/02f9dd1869da489a1d8ccc25e7e9b8a86aadef58/Source/WebKit/UIProcess/win/WebView.cpp#L302