On Mon Oct 9 15:39:26 2023 +0000, Gabriel Ivăncescu wrote:
From the point of view of a script, there is only one window, so the event target is the outer window's (which forwards to the current inner window), and we already have tests for it. There's other places that use the inner window though, which makes it inconsistent with this, so it solves that problem. I also have other patches later that will get it in line with this, and it's also cleaner, IMO. We also don't have to deal with the potential NULL outer window everywhere (which I suspect isn't even correct, we don't have tests for it, so I guess it was added just to prevent implementation detail crashes? pretty sure native would just return outer window ref in the first place). Anyway the point I'm trying to say is that the inner window shouldn't, in practice, be "available" as a reference, so if we hold it anywhere (like we do internally), it *must* act like it's on the outer window. This patch does that. Scripts will need to obtain ref to the outer window at some point, but like I said those patches will come later. So in this case it wouldn't make a difference and this patch is just a simplification + consistency with implementation details, so we can continue using inner window internally without issue.
If native doesn't have inner windows, then how can you claim how it must act? As I said, previous windows shouldn't affect current window, so I'm curious why exactly you need it.