W3C home > Mailing lists > Public > public-web-perf@w3.org > May 2011

[PageVisibility] specific visibility states

From: Cameron McCormack <cam@mcc.id.au>
Date: Mon, 2 May 2011 16:46:11 +1200
To: public-web-perf@w3.org
Message-ID: <20110502044610.GE13400@wok.mcc.id.au>
It seems to me that the descriptions of the visibility states reported
in visibilityState are very specific and not necessarily applicable to a
wide variety of platforms and modalities.  For example:

  visible attribute
    This attribute returns true when the User Agent is not minimized and
    the page is on a foreground tab.

Certainly there are UAs that don’t have the concept of window
minimisation, such as Safari on iOS devices.  I think the wording just
needs to be made a bit more generic, with minimisation and background
tabs cited as examples of the `visible == false` case.

Would pressing ⌘H to hide an application’s windows on Mac OS make
`visible == false`?  The window isn’t minimised, one of the pages would
still be in the foreground tab, it’s just that the window isn’t being
shown.  Cases like this would benefit from more general language.

  The attribute returns false when:
    ...
    * The Operating System lock screen is shown,

Again, not every platform will have this.  I think it’s OK to have this
as one of the examples of the cases where `visible == false`, but it
needs to emphasise the fact that the document is not visible, and that’s
the reason why `visible == false`.

The PAGE_TASKBAR_PREVIEW case sounds very specific to Windows Vista/7.
It feels wrong to have the web platform reference OS-specific
functionality like this (at least minimisation is a concept common
across many windowing systems).  Why do we actually want to expose this
case?  Is it so that the thumbnail view of the window can show something
other than what is shown in the window in its normal view?  Maybe a CSS
Media Query would be a better fit for this.

What does the PAGE_PAGE_PREVIEW state correspond to?

-- 
Cameron McCormack ≝ http://mcc.id.au/
Received on Monday, 2 May 2011 04:46:49 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 2 May 2011 04:46:50 GMT