For FxOS win-mgmt, You could reference this slide
https://speakerdeck.com/alivedise/fxos-window-management-architecture

And here is a picture I did in bug 916709, a proposal about the
two-dimensional window mgmt architecture to support Haida(in-app
transition).
https://docs.google.com/drawings/d/110XVKUOY4IiGons7FDcQ8rarIOmScoIgtxhZcU88VLk/edit?usp=sharing

Note: maybe some of notes was outdated.
I will comment inline for each question.

2015-09-25 6:55 GMT+08:00 Marcus Cavanaugh <[email protected]>:

> I'd like to better understand what causes bottom-to-top window
> relationships, previous-to-next window relationships, and the restrictions
> thereof.
>
> Are the following statements true?
>
>    1. Every running app comprises one or more AppWindow instances.
>
> Each app is having one appWindow instance, and possibly multiple
ActivityWindow or AttentionWindow or PopupWindow instances.

One AppWindow per app is the restriction of the UX + app itself, we could
free the limit if the app is prepared to be launched in more than one
instances.

>
>    1. A running app can open [currently only one?] child window via
>    "window.open()".
>       - (does this differ from privileged-to-certified-to-browser
>       windows?)
>
> You could have more than one if you do window.open again in a opened
window.open window :DDD

You could stack any ActivityWindow or PopupWindow on a AppWindow instance.

BTW, window.open is web-facing API so it's not restricted. But
window.open(..,..,"attention") does.

>
>    -
>    1. A running app's AppWindows are part of a doubly-linked list,
>    apparently in LRU order:
>    - AppWindow.getBottomMostWindow() points to the least-recently-used
>       appwindow of this app.
>       - AppWindow.getTopMostWindow() points to the most-recently-used
>       appwindow of this app.
>
> AppWindow.getBottomMostWindow refers to the bottom most AppWindow which in
z-ordering.
There is a strict parent-child relationship between the bottom and the top
window.
AppWindow.getTopMostWindow refers to the top most "opened" *Window instance
in z-ordering.

>
>    1. They are also doubly-linked in order of parent-child relationships,
>    if applicable:
>    - AppWindow.getPrev() returns the window that *created* this window,
>       if it was created with window.open().
>       - AppWindow.getNext() returns the *only-one-allowable* child window.
>       - The "root window" is the first in this doubly-linked list.
>
> getPrev & getNext is a deprecated function from Haida for "in-app
transition". They are using to swipe between ParentWindow & ChildWindow
(which is opened by parent with certain API other than just window.open()).

getTop/getBottom -> z-ordering. (vertical dimension)
getNext/getPrev -> y-ordering. (horizontal dimension)

A Root means it does not have parentWindow or bottomWindow.

It's 2 dimensional.


If you'd like to pick up this in NGA, yes, they could be used to do your
in-app transition.

Note: the horizontal windows was ever nearly completed, but expected to be
broken because we decided to drop the in-app transition feature long time
ago and I did lots of refactor after that.
The point:
ChildWindowFactory is the entry point to generate a childWindow.
StackManager is the manager to swipe-switch in-app windows but needs the
Window instance to tell it who is the next/prev window to go. Usually it
only knows about the root AppWindow.


>    -
>    1. AppWindowManager and StackManager only track references to the root
>    AppWindow.
>
> Yes.

>
>    1. Independent browser windows each appear as separate "root"
>    AppWindows.
>
> Yes.

>
>    1.
>
> Could someone point me to, or explain, a summary of the current
> hierarchical model (and proposed/incoming changes to this model, if
> applicable)?
>
> I haven't been involved with system work until recently, but I know this
> has been discussed before in relation to NGA; the only references I could
> find to current/desired window management are in the dev-gaia "Multiple
> Windows" discussion [1] and MDN's "Window Management"[2] doc which only
> glosses over the hierarchy. The NGA proposal[3] doesn't really cover this
> in depth. I've browsed through the System code but I'm not sure what's
> intended vs. legacy.
>
>
> Marcus
>
>
> [1]
> https://groups.google.com/d/topic/mozilla.dev.gaia/uvK0x3nL_Tw/discussion
> [2]
> https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Platform/Gaia/Gaia_apps/Window_Management#Child_window_management
> [3] https://wiki.mozilla.org/Gaia/Architecture_Proposal
>
>
> _______________________________________________
> dev-fxos mailing list
> [email protected]
> https://lists.mozilla.org/listinfo/dev-fxos
>
>
_______________________________________________
dev-fxos mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-fxos

Reply via email to