On Fri, May 23, 2014 at 4:14 AM, Ehsan Akhgari <
ehsan....@gmail.com> wrote:
> On 2014-05-22, 2:22 AM, Tim Chien wrote:
>>
>> My quick idea would be again re-invent these APIs to mozbrowser
>> event(s): let mozbrowser iframe dispatch a event named
>> "mozbrowserlockorientation" and "mozbrowserunlockorientation" and
>> expose a method within the event to deny() or allow() the request. The
>> event can follow my key event proposal and re-dispatch to grandparent
>> frame so it would always handled by System app.
>
>
> If I understand the issue correctly, it's not limited to web content loaded
> in the browser, it also affects apps loaded in a mozapp iframe outside of
> the browser app, so that won't be sufficient, right?
Everything in B2G is loaded in their nth level mozbrowser iframe
inside the system app mozbrowser iframe. mozapp iframe is special kind
of mozbrower iframe, and mozbrowser API is available there too. So
having system-facing API exposed through the mozbrowser iframe method
is sufficient.
Web content v.s. web app has no difference for mozbrowser APIs. Also,
web content can be loaded anywhere, inc. System app, not just the
Browser app which hides the web content in the 2rd level of the
supposedly "Web Phone".
>> That said, the above case does not give us the opportunity to display
>> two apps with different orientations at the same time, for haida
>> sheet/app opening/app closing transitions. This bug had hunt us from
>> 1.0 and we need a better API than what I had in mind above to properly
>> fix it (or we will need to keep the screenshots, yuck)
>>
>> Perhaps we can make each of the mozbrowser iframe comes with it's own
>> orientation, independent of the phone? I am not sure if the layout
>> code give us this kind of magic though.
>
>
> I'm not really familiar with the implementation of this API, so I'm not sure
> if I can give you a good answer here. Perhaps try asking on dev-b2g if
> nobody else here seems to have an answer? If you can't find out the answer,
> let me know and I'll try to dig through the code to find it for you. :-)
>
Yeah I will ask around. Thanks.
>
>> Bug 868914 (deny lock orientation when not visible) sounds like a
>> meaningful patch for the current API, however that means we
>> unfortunately overload setVisible() again. We badly need technical
>> ownership and WebAPI leadership to pick what's left behind by :jlebar
>> here and come up with a overall plan on mozbrowser APIs.
>
>
> Can you please clarify what you're asking for here? I'm not familiar with
> the problem you're describing.
>
Nothing specific here actually... I was just reiterate the fact we
overload setVisible() again in bug 868914 and the fact there isn't a
go-to person for mozbrowser API (and impl) anymore.
> Thanks!
>
> Ehsan
Thank you for your prompt reply!