Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce an abstraction between pipeline and constellation? #11344

Closed
asajeffrey opened this issue May 23, 2016 · 16 comments
Closed

Introduce an abstraction between pipeline and constellation? #11344

asajeffrey opened this issue May 23, 2016 · 16 comments
Assignees

Comments

@asajeffrey
Copy link
Member

@asajeffrey asajeffrey commented May 23, 2016

At the moment, we have two levels of abstraction:

  • Pipeline is per-browsing context
  • Constellation is global

we do not have a level of abstraction between these, that is per-top-level-browsing-context. This causes issues in the context of browser.html, where there is more than one tlbc, e.g. #11220.

cc @Ms2ger @ConnorGBrewster @paulrouget

@jdm
Copy link
Member

@jdm jdm commented May 23, 2016

There is only one top-level browsing context in browser.html, which is the root page that contains the iframes for the tabs. Let us not confuse the issue further by claiming otherwise :)

@cbrewster cbrewster mentioned this issue May 23, 2016
8 of 10 tasks complete
@asajeffrey
Copy link
Member Author

@asajeffrey asajeffrey commented May 23, 2016

@jdm: oh, do we have a naming issue here? The history API talks about top-level browsing contexts, and in the case of browser.html there'll be one those per tab, yes?

@asajeffrey
Copy link
Member Author

@asajeffrey asajeffrey commented May 23, 2016

@jdm
Copy link
Member

@jdm jdm commented May 23, 2016

@asajeffrey A top-level browsing context has a strict definition. If we want to treat the browsing contexts that represent tabs in browser.html in a special manner, we should use a different name for them.

@asajeffrey
Copy link
Member Author

@asajeffrey asajeffrey commented May 23, 2016

@jdm yes, but from the point of view of a tab running inside browser.html, shouldn't the tab be the top-level browsing context, not browser.html itself?

@cbrewster
Copy link
Member

@cbrewster cbrewster commented May 23, 2016

@jdm since each tab is a mozbrowser iframe shouldn't each frame appear as a top-level browsing context https://developer.mozilla.org/en-US/docs/Web/API/Using_the_Browser_API

@paulrouget
Copy link
Contributor

@paulrouget paulrouget commented May 24, 2016

In a mozbrowser iframe, window == top.window.

@Ms2ger
Copy link
Contributor

@Ms2ger Ms2ger commented May 24, 2016

There's two other concepts we have to take into account: the unit of related browsing contexts and the unit of related similar-origin browsing contexts. I think the latter would correspond to a ScriptThread.

@asajeffrey
Copy link
Member Author

@asajeffrey asajeffrey commented May 24, 2016

Oh, and there's auxiliary browsing contexts too. What fun! At the moment, I don't think Servo has these, since it doesn't have tabs or windows.

Can we treat mozbrowser iframes as auxiliary browsing contexts? They are very similar, in that they create new top-level browsing contexts. This would give us one less thing to think about :) @paulrouget?

@paulrouget
Copy link
Contributor

@paulrouget paulrouget commented May 25, 2016

Can we treat mozbrowser iframes as auxiliary browsing contexts?

Looks about right. What about window.opener in this case?
What was the initial use case that a auxiliary browsing contexts was supposed to cover?

@asajeffrey
Copy link
Member Author

@asajeffrey asajeffrey commented May 25, 2016

@asajeffrey
Copy link
Member Author

@asajeffrey asajeffrey commented May 25, 2016

Urgh, I realized a tricky case... @paulrouget, when a mozbrowser iframe completes loading, does it send a load event to its opener? Or should it send just a mozbrowserloadend event?

@asajeffrey
Copy link
Member Author

@asajeffrey asajeffrey commented May 26, 2016

#11430 is a first step towards this, making the constellation aware of which frames are mozbrowser iframes.

@paulrouget
Copy link
Contributor

@paulrouget paulrouget commented May 26, 2016

does it send a load event to its opener? Or should it send just a mozbrowserloadend event?

I don't know how Gecko/Gaia works, but in browserhtml, we only rely on the mozbrowserloadend event.

@asajeffrey
Copy link
Member Author

@asajeffrey asajeffrey commented May 26, 2016

OK, that's good, we can treat a mozbrowser iframe as an auxiliary browsing context for most things, I think it's just the moz* events that are special.

@asajeffrey
Copy link
Member Author

@asajeffrey asajeffrey commented Jun 7, 2016

It looks like we can get away with just making the constellation and script threads aware of which frames are top-level browsing contexts, so we don't need a separate abstraction layer.

@asajeffrey asajeffrey closed this Jun 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.