Skip to content

Implement indexed access on Window (window.frames). #4589

Closed

Description

@Ms2ger

I believe this is implemented on WindowProxy in Gecko; @bzbarsky knows more.

Affected tests:

  • dom/nodes/Element-getElementsByTagName-change-document-HTMLNess.html
  • dom/nodes/Node-appendChild.html
  • dom/nodes/Node-removeChild.html

Activity

  1. added
    A-content/dom
    I-enhancement
    E-more-complex
    on Jan 9, 2015
  2. Ms2ger commented on Jan 9, 2015

    @Ms2ger
    ContributorAuthor

    Blocks #2968, #2185.

  3. bzbarsky commented on Jan 9, 2015

    @bzbarsky
    Contributor

    That's correct. You can see the implementation in the various proxy handler methods on nsOuterWindowProxy in Gecko.

    This is, in fact, the only sane way to implement it without major spidermonkey changes, since you want the thing that has these indexed props to be a proxy and SpiderMonkey doesn't support proxies as globals.

  4. evilpie commented on Jan 9, 2015

    @evilpie
    Contributor

    I will try to implement parts of the WindowProxy based on the nsOuterWindowProxy in Gecko.

  5. added a commit that references this issue on Jan 12, 2015
    a227faa
  6. reopened this on Jan 12, 2015
  7. Ms2ger commented on Jan 12, 2015

    @Ms2ger
    ContributorAuthor

    What remains to be done is implementing IndexedGetter on Window; it always returns None now.

  8. added 2 commits that reference this issue on Jun 23, 2015
  9. benschulz commented on Jun 23, 2015

    @benschulz
    Contributor

    I've implemented IndexedGetter and it works as expected. However, the finer points of the specification aren't met. Specifically servo is missing gecko's outer+inner window concept. What is there is essentially the inner window. This has two implications w.r.t. to the specified order.

    • The initial order depends on the order in which frames' documents are loaded. Also, the window is not accessible until it was asynchronously loaded (Iframe.contentWindow always returns null #5500).
    • Whenever a frame's document changes, its browsing context is moved to the end of the list. (Its Page is removed from page.children and a new one pushed onto it).

    TL;DR: The initial order may be wrong and it may incorrectly change on top of that. To fix this, something like geckos outer+inner window pairing is needed. I would like to work on that, unless there are plans for some other solution.

  10. bzbarsky commented on Jun 23, 2015

    @bzbarsky
    Contributor

    You need the inner/outer thing for basic web compat anyway, so I doubt there should be any other plans...

  11. jdm commented on Jun 23, 2015

    @jdm
    Member

    We do actually have an inner/outer concept already, it's just incorrect. That's tracked in #5238.

  12. 6 remaining items

  13. asajeffrey commented on Apr 9, 2018

    @asajeffrey
    Contributor

    The IRC chat: https://mozilla.logbot.info/servo/20180409#c14583689

    @KiChjang I think we're going to need some RPC to get the state of the browsing context tree from the constellation to the script thread.

  14. added 3 commits that reference this issue on Apr 13, 2018
    aa3c81a
    747a9ec
    3de4926
  15. added 8 commits that reference this issue on Apr 24, 2018
    5a44af9
    d055b78
    340f504
    3d1c7f3
    1af8051
    2b2885f
    6436b79
    9831884
  16. added 2 commits that reference this issue on May 17, 2018
    bc1613d
    3d109b4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-content/domI-enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions