Re: [PageVisibility] What should the visibility api return in display:none iframes?

On Thu, Oct 6, 2011 at 5:11 PM, Arvind Jain <arvind@google.com> wrote:

> Since the display: attribute is in control of the page, it doesn't feel
> like we need to have another API to tell whether the iframe is visible or
> not.
> Tying visibility to top level context makes sense here.
>

Not necessarily - the code in question might be in a cross-origin <iframe>
that is being set to display:none by its ancestor.  It seems like this
proposal will force authors to both check the visibility state using the
visibility API and then further check whether the iframe they are in is
hidden (by querying layout properties, for example).  Is that what we want?

- James


>
> On Thu, Oct 6, 2011 at 4:24 PM, Jatinder Mann <jmann@microsoft.com> wrote:
>
>> I think so. This behavior makes it clear that the iframe's visibility is
>> tied with the top level document. This is the current behavior in both IE10
>> and Chrome.
>>
>> Jatinder
>>
>> -----Original Message-----
>> From: Boris Zbarsky [mailto:bzbarsky@MIT.EDU]
>> Sent: Wednesday, October 05, 2011 8:28 PM
>> To: Jatinder Mann
>> Cc: public-web-perf@w3.org
>> Subject: Re: [PageVisibility] What should the visibility api return in
>> display:none iframes?
>>
>> On 10/5/11 7:01 PM, Jatinder Mann wrote:
>> > We define the visibility as that of the top level browsing context; all
>> connected documents, like iframes, must return the same value.
>>
>> Yes, I'm aware this is what the spec says right now.  What I'm asking is
>> whether this is _desirable_.
>>
>> -Boris
>>
>>
>>
>

Received on Friday, 7 October 2011 00:15:35 UTC