Make named window lookup more precise and correct BCG swap logic by kjmcnee · Pull Request #10818 · whatwg/html (original) (raw)
I did a more detailed review, and this is looking great. I guess we might have missed you, so we'll probably have to finish this ourselves, but if you're able to help, one thing that would be very nice would be a clearer documentation of the implementation-defined cases.
Hi. I'm no longer at my work computer, but I can comment on the implementation differences.
- subtreesToSearch choice is either (top, window) or (top, ..., window). Can you give us more detail on why this is implementation-defined? Like, does Chromium choose differently depending on certain circumstances, and if so, which circumstances? Do you know what would motivate one choice or another?
WebKit and Chromium search the requesting window's subtree then search from the top. Firefox iterates and searches from each ancestor. If there's a way to express in the spec that the implementation-defined behavior is fixed for the instance of the user agent, then that'd be appropriate here.
- Optionally check "allowed by sandboxing to navigate" (in two places). Why is this optional?
Firefox and Chromium do this. WebKit does not. Similarly, the choice is fixed for the implementation.
- Implementation-defined order for searching through the BCG by name. This is pretty clear from the spec, but in the interest of maybe nailing this down in the future, can you tell us what Chromium picks?
I can't remember the details, but I think Chromium and Firefox are based on creation order, or maybe reverse creation order. WebKit's ordering is arbitrary as it iterates over a hash set.