Skip to content

Introduce an abstraction between pipeline and constellation? #11344

Closed

Description

@asajeffrey

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

Activity

  1. added
    I-refactor
    A-constellation
    on May 23, 2016
  2. self-assigned this
    on May 23, 2016
  3. jdm commented on May 23, 2016

    @jdm
    Member

    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 :)

  4. asajeffrey commented on May 23, 2016

    @asajeffrey
    ContributorAuthor

    @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?

  5. jdm commented on May 23, 2016

    @jdm
    Member

    @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.

  6. asajeffrey commented on May 23, 2016

    @asajeffrey
    ContributorAuthor

    @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?

  7. cbrewster commented on May 23, 2016

    @cbrewster
    Contributor

    @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

  8. paulrouget commented on May 24, 2016

    @paulrouget
    Contributor

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

  9. Ms2ger commented on May 24, 2016

    @Ms2ger
    Contributor

    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.

  10. asajeffrey commented on May 24, 2016

    @asajeffrey
    ContributorAuthor

    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?

  11. paulrouget commented on May 25, 2016

    @paulrouget
    Contributor

    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?

  12. asajeffrey commented on May 25, 2016

    @asajeffrey
    ContributorAuthor
  13. asajeffrey commented on May 25, 2016

    @asajeffrey
    ContributorAuthor

    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?

  14. asajeffrey commented on May 26, 2016

    @asajeffrey
    ContributorAuthor

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

  15. paulrouget commented on May 26, 2016

    @paulrouget
    Contributor

    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.

  16. asajeffrey commented on May 26, 2016

    @asajeffrey
    ContributorAuthor

    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.

  17. asajeffrey commented on Jun 7, 2016

    @asajeffrey
    ContributorAuthor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

A-constellationI-refactor

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions