Jonas,

Thanks for clarifying, I'd filed 
https://bugzilla.mozilla.org/show_bug.cgi?id=1003024 to do setVisible as early 
as we could.
For a normal launched app (webapps-launch) we should do setVisible(true) right 
away after the iframe in the DOM tree,
for system message launched app (open-app with stayBackground=true) we should 
do setVisible(false) right away after the iframe in the DOM tree.

Let me know if this is insufficient.

-Alive

Jonas Sicking <[email protected]> 於 2014/4/29 上午6:01 寫道:

> On Mon, Apr 28, 2014 at 4:04 AM, Alive <[email protected]> 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 <[email protected]> 於 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
>> [email protected]
>> https://lists.mozilla.org/listinfo/dev-b2g
>> 
>> 
>> --
>> Alive C. Kuo, Senior Front-end/Software Engineer, FirefoxOS, MoCo. Taiwan,
>> Taipei office.
>> [email protected]
>> 
>> 
>> 
>> 
>> 

--
Alive C. Kuo, Senior Front-end/Software Engineer, FirefoxOS, MoCo. Taiwan, 
Taipei office.
[email protected]





_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g

Reply via email to