On Mon, Apr 28, 2014 at 4:04 AM, Alive <al...@mozilla.com> wrote:
> Hi,
>
> I am not sure how does this matter if setVisible is too late or too early
> while an app is launching.
> The fact is while we launch an app, the previous app is still foreground
> after it's going out of viewport && the foreground app is loaded.

Whenever we're about to launch a *visible* app to the user, we should
set that app as visible right away. In fact it should ideally get an
even higher priority than the currently visible app.

If a user launches another app, then our first priority should be to
launch that app. Even if that means killing the currently running app.

Generally using the App API to launch an app should count as launching
a visible app.

With system messages things are a bit more complex. Messages for
WebActivities or telephony should obviously count as launching a
visible app to the user. However messages for the Alarm API should
count as launching a hidden app.

> For the question here couldn't we just set docShell.isActive = true by
> default?

Setting docShell.isActive probably won't affect the process priority
at all. So I don't think that will make a difference.

/ Jonas

> What will happen if the setVisible call is too late and what state if no one
> calls setVisible on the iframe? Neither foreground nor background?
>
> -Alive
>
> Gabriele Svelto <gsve...@mozilla.com> 於 2014/4/26 下午3:15 寫道:
>
> On 26/04/2014 01:48, Jonas Sicking wrote:
>
> That only works once an app is far enough along in the launch process
> that it's able to run javascript. We need to give apps a high priority
> before then.
>
> Is gaia currently setting the "visibility flag" on <iframes> of
> launching apps right away? If not, we should make that happen.
>
>
> We should but I still wanted to measure how long it takes for the whole
> process to happen. I just haven't got enough time to do it yet (still
> too busy fixing v1.3t bugs).
>
> Gabriele
>
> _______________________________________________
> dev-b2g mailing list
> dev-b2g@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-b2g
>
>
> --
> Alive C. Kuo, Senior Front-end/Software Engineer, FirefoxOS, MoCo. Taiwan,
> Taipei office.
> al...@mozilla.com
>
>
>
>
>
_______________________________________________
dev-b2g mailing list
dev-b2g@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-b2g

Reply via email to