canmove, Confirmed users
2,675
edits
(→Implementations: Safari Webkit nightlies have support) |
(capture webkit's additional pseudo-classes and discussion on mailing list, group features by document, element, CSS; add headings) |
||
Line 37: | Line 37: | ||
Each document has an optional "current full-screen element". | Each document has an optional "current full-screen element". | ||
=== Document additions === | |||
==== cancelFullScreen method ==== | |||
New method of Document: | New method of Document: | ||
Line 45: | Line 47: | ||
The current full-screen element for the document is cleared. | The current full-screen element for the document is cleared. | ||
==== fullScreen attribute ==== | |||
New DOM attribute of Document: | |||
* readonly attribute boolean fullScreen | |||
Returns true while the document is in the full-screen state. | |||
==== fullScreenKeyboardInputAllowed attribute ==== | |||
New DOM attribute of Document: | |||
* readonly attribute boolean fullScreenKeyboardInputAllowed | |||
Returns true while the window's toplevel browsing context is full-screen and not in a "keys disabled" state. | |||
=== Element additions === | |||
New methods of Element: | New methods of Element: | ||
==== requestFullScreenWithKeys method ==== | |||
* void requestFullScreenWithKeys() | * void requestFullScreenWithKeys() | ||
Line 53: | Line 71: | ||
Typically the user agent would react by transitioning the Document to the full-screen state, or by presenting asynchronous confirmation UI and transitioning to the full-screen state if/when the user responds affirmatively. However, the user agent is not required to do anything at all in response to requestFullScreen. The user agent's behavior is allowed to vary depending on whether requestFullScreen is called during a user event (e.g. a mouse click handler). | Typically the user agent would react by transitioning the Document to the full-screen state, or by presenting asynchronous confirmation UI and transitioning to the full-screen state if/when the user responds affirmatively. However, the user agent is not required to do anything at all in response to requestFullScreen. The user agent's behavior is allowed to vary depending on whether requestFullScreen is called during a user event (e.g. a mouse click handler). | ||
==== requestFullScreen method ==== | |||
* void requestFullScreen() | * void requestFullScreen() | ||
As requestFullScreenWithKeys, but hints to the UA that while in full-screen state, the toplevel browsing context for this Document should have keys disabled. While keys are disabled, there may be a reduced risk of spoofing attacks inducing the user to input inappropriate data, and the UA may choose to relax restrictions on entering full-screen state with keys disabled. | As requestFullScreenWithKeys, but hints to the UA that while in full-screen state, the toplevel browsing context for this Document should have keys disabled. While keys are disabled, there may be a reduced risk of spoofing attacks inducing the user to input inappropriate data, and the UA may choose to relax restrictions on entering full-screen state with keys disabled. | ||
New | ==== fullscreenchange event ==== | ||
New events: | |||
* | * fullscreenchange | ||
When a Document enters or leaves the full-screen state, the user agent must queue a task to dispatch this event. When the event is dispatched, if the document's current full-screen element is an element in the document, then the event target is that element, otherwise the event target is the document. The event bubbles and is not cancellable. | |||
==== onfullscreenchange attribute ==== | |||
The 'onfullscreenchange' event handling attribute is supported on HTML elements. | |||
==== iframe allowfullscreen attribute ==== | |||
New content attribute of the <iframe> element: | New content attribute of the <iframe> element: | ||
Line 73: | Line 93: | ||
This is a boolean attribute. When this attribute is not set, UAs must ignore full-screen requests in the iframe or its descendant frames. | This is a boolean attribute. When this attribute is not set, UAs must ignore full-screen requests in the iframe or its descendant frames. | ||
=== CSS additions === | |||
==== full-screen pseudo-class ==== | |||
New CSS pseudo-class: | |||
New CSS | |||
* :full-screen | * :full-screen | ||
Line 87: | Line 101: | ||
While a Document is in the full-screen state, and the document's current full-screen element is an element in the document, the 'full-screen' pseudoclass applies to that element. Also, an <iframe>, <object> or <embed> element whose child browsing context's Document is in the full-screen state has the 'full-screen' pseudoclass applied. | While a Document is in the full-screen state, and the document's current full-screen element is an element in the document, the 'full-screen' pseudoclass applies to that element. Also, an <iframe>, <object> or <embed> element whose child browsing context's Document is in the full-screen state has the 'full-screen' pseudoclass applied. | ||
==== full-screen media query ==== | |||
New CSS media query selector: | New CSS media query selector: | ||
Line 100: | Line 115: | ||
While a Document is in the full-screen state, the full-screen media type is active for the document. | While a Document is in the full-screen state, the full-screen media type is active for the document. | ||
==== UA stylesheet rules ==== | |||
Suggested UA stylesheet rules: | Suggested UA stylesheet rules: | ||
Line 122: | Line 138: | ||
Note that it is possible for a document to position content over an element with the :full-screen pseudo-class, for example if the :full-screen element is in a container with z-index not 'auto'. | Note that it is possible for a document to position content over an element with the :full-screen pseudo-class, for example if the :full-screen element is in a container with z-index not 'auto'. | ||
==== Webkit additions ==== | |||
New CSS pseudo-classes: | |||
* :full-screen-document - While a Document is in the fullscreen state, the 'full-screen-document' pseudo-class applies to the root element of that Document. | |||
** note: webkit has implemented previous name for this :full-screen-doc | |||
* :full-screen-root-with-target - While a Document is in the fullscreen state and the document's current fullscreen element is an element in the document, the 'full-screen-root-with-target' pseudoclass applies to the root element of that Document. | |||
We should consider incorporating these into the spec. | |||
See [http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2010-August/027670.html feedback on new pseudo-classes] and [http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2010-August/027672.html follow-up from RoC] (and subsequent thread) | |||
== Suggested UA Policy == | == Suggested UA Policy == |