w3c / webdriver

Remote control interface that enables introspection and control of user agents.
https://w3c.github.io/webdriver/
Other
676 stars 190 forks source link

Editorial: use navigables #1694

Closed marcoscaceres closed 1 year ago

marcoscaceres commented 1 year ago

Fixes cross-refs

@jakearchibald, I was unsure what to replace "nested browsing context" in this PR... I think what was currently specified here is incorrect, but I think it's trying to pull the [sic] browser context from the iframe (but unsure why it was trying with all the nested ones).

Anyone who knows this spec well, can you also advise on the above? @AutomatedTester maybe?


Preview | Diff

jakearchibald commented 1 year ago

There's a lot of "browsing context" in this spec. The question to ask is: does this spec actually care about browsing contexts?

For example, if this spec has a reference to a top-level browsing context, and the navigation changes the isolation such that the browsing context is swapped, would this spec want to now refer to the new browsing context, or continue to refer to the old one.

If it should be referring to the new browsing context, then it probably should be anchored in navigables rather than browsing contexts. If it really needs a browsing context at some point, it can get it from the navigable's active browsing context.

marcoscaceres commented 1 year ago

As an aside (and totally not the right place to have this discussion, but YOLO)... I wonder if we could work together on some kind of diagram that shows how all these things relate?

I should also read the spec more... I know, but I'd find something like the following really useful as fast reference on my day to day work (none of the below is probably right... just for illustrative purposes):

Screenshot 2022-11-17 at 10 14 30 am

I'd love to then link these concepts to actual/real things... you know, like "browser tab", "browser window that contains tabs", "iframe", etc.

domenic commented 1 year ago

There's a lot of "browsing context" in this spec. The question to ask is: does this spec actually care about browsing contexts?

I am almost certain it does not.

I wonder if we could work together on some kind of diagram that shows how all these things relate?

I think https://html.spec.whatwg.org/#infrastructure-for-sequences-of-documents provides some of that.

Your diagram is... very incorrect :(. The hierarchy is navigable > browsing context/WindowProxy > Window/Document.

marcoscaceres commented 1 year ago

Your diagram is... very incorrect :(. The hierarchy is navigable > browsing context/WindowProxy > Window/Document.

I know :) I was just trying to quickly (literally) illustrate a point. I need to go through the new spec text properly.

My question was really if I should bother trying to diagram the relationships? (or can it even be mapped out)

domenic commented 1 year ago

I think I am not the best person to ask... I find the text descriptions pretty helpful, and the diagrams redundant. E.g. there's a concurrent discussion at https://github.com/whatwg/storage/issues/151 about adding a diagram, which to me feels just duplicative. Like, it's just replacing "X has a Y" with arrows drawn between X and Y with the words "has a"? (And similar for other relationships.)

However, it does seem other people find them helpful, and I don't want to stand in the way of clarifying the spec!

marcoscaceres commented 1 year ago

Ok, I'm going to close this PR as it's not solving the actual problems with this spec.

I'll need to brush up a bit more on the new navigable terminology before attempting this again (or hopefully one of the actual spec editors can take this on.)