From 98628c7ce29d096793f34413c74dcb317bc6a05c Mon Sep 17 00:00:00 2001 From: Matt Giuca Date: Wed, 1 May 2024 06:02:12 +0000 Subject: [PATCH] editorial: Move the definition of display-mode back to APPMANIFEST. (#1039) SHA: a791201a5df7b9ff58606d4922cb3c697aff66a8 Reason: push, by marcoscaceres Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- index.html | 355 +++++++++++++++++++++++++++++++---------------------- 1 file changed, 208 insertions(+), 147 deletions(-) diff --git a/index.html b/index.html index 85df1ee4..1aa3f26b 100644 --- a/index.html +++ b/index.html @@ -1,6 +1,6 @@ - + + - +

Web Application Manifest

-

W3C Editor's Draft

+

W3C Editor's Draft

More details about this document
@@ -543,8 +531,8 @@

Web Application Manifest

Security considerations
  • 6.2 Deep links -
  • 7. - Choosing a display mode +
  • 7. + Display modes
  • 8. Privacy and security considerations
  • A. @@ -1310,8 +1298,8 @@

    Web Application Manifest

    The manifest's display member represents the developer's - preferred display mode for the web application. Its value is a - display mode. + preferred display mode for the web application. Its value is a + display mode.

    To process the display member, given ordered map @@ -1408,7 +1396,7 @@

    Web Application Manifest

    Which orientations and display modes cannot be used together is left to the discretion of implementers. For example, for some user agents, it might not make sense to change the default screen - orientation of an application while in browser display + orientation of an application while in browser display mode.

    Note

    @@ -3183,7 +3171,7 @@

    Web Application Manifest

    applied by the user agent to the top-level browsing context prior to the start URL being loaded. This gives the user agent an opportunity to apply the relevant values of the manifest, - possibly changing the display mode and screen orientation of the + possibly changing the display mode and screen orientation of the web application. Alternatively, and again as an example, the user agent could install the web application into a list of bookmarks within the user agent itself. @@ -3461,53 +3449,107 @@

    Web Application Manifest

    -

    7. - Choosing a display mode -

    +

    7. + Display modes +

    - A display mode, as defined in [MEDIAQUERIES-5], represents how - the web application is being presented within the context of an OS - (e.g., in fullscreen, etc.). Display modes correspond to user interface - (UI) metaphors and functionality in use on a given platform. + A display mode represents how the web + application is being presented within the context of an OS (e.g., in + fullscreen, etc.). Display modes correspond to user interface (UI) + metaphors and functionality in use on a given platform. The UI + conventions of the display modes are purely advisory and implementers + are free to interpret them how they best see fit.

    - Once a user agent applies a particular display mode to an + This specification defines the following display modes: +

    +
    +
    + fullscreen +
    +
    + Opens the web application with browser UI elements hidden and takes + up the entirety of the available display area. +
    +
    + standalone +
    +
    + Opens the web application to look and feel like a standalone native + application. This can include the application having a different + window, its own icon in the application launcher, etc. In this mode, + the user agent will exclude standard browser UI elements such as an + URL bar, but can include other system UI elements such as a status + bar and/or system back button. +
    +
    + minimal-ui +
    +
    + This mode is similar to standalone, but provides the + end-user with some means to access a minimal set of UI elements for + controlling navigation (i.e., back, forward, reload, and perhaps some + way of viewing the document's address). A user agent can include + other platform specific UI elements, such as "share" and "print" + buttons or whatever is customary on the platform and user agent. +
    +
    + browser + (default) +
    +
    + Opens the web application using the platform-specific convention for + opening hyperlinks in the user agent (e.g., in a browser tab or a new + window). +
    +
    +
    Note

    + The fullscreen display mode is orthogonal to, + and works independently of, the Fullscreen API Standard. The fullscreen display mode affects the fullscreen state of + the browser window, while the [FULLSCREEN] API operates on an element + contained within the viewport. As such, a web application can have its + display mode set to fullscreen, while + document.fullScreenElement returns null, and fullscreenEnabled + returns false. +

    +

    + Once a user agent applies a particular display mode to an application context, it becomes the default display mode for the top-level browsing context (i.e., it is used as the display mode when the window is navigated). The user agent MAY override the default display mode for security reasons (e.g., the top-level browsing context is navigated to another origin) and/or the user agent MAY provide the user with a means - of switching to another display mode. + of switching to another display mode.

    When the display member is missing, or if there is no - valid display member, the user agent uses the browser display mode as the default display mode. - As such, the user agent MUST support the browser - display mode. + valid display member, the user agent uses the browser display mode as the default display mode. + As such, the user agent MUST support the browser + display mode.

    - Every display mode has a fallback chain, which is a list - of display modes. The fallback chain for: + Every display mode has a fallback chain, which is a list + of display modes. The fallback chain for:

      -
    1. browser is «». +
    2. browser is «».
    3. -
    4. minimal-ui is « "browser" ». +
    5. minimal-ui is « "browser" ».
    6. -
    7. standalone is « "minimal-ui", - "browser" ». +
    8. standalone is « "minimal-ui", + "browser" ».
    9. -
    10. fullscreen is « "standalone", - "minimal-ui", "browser" ». +
    11. fullscreen is « "standalone", + "minimal-ui", "browser" ».

    The steps for determining the web app's chosen display mode is given by the following algorithm. The algorithm takes a processed manifest manifest and - returns a display mode. + returns a display mode.

    1. processing extension-point: process any @@ -3526,11 +3568,11 @@

      Web Application Manifest

  • -
    Note

    +

    Note

    The above loop is guaranteed to return a value before the assertion, - due to the fact that browser is in every mode's + due to the fact that browser is in every mode's fallback chain, and the requirement that all user agents support - the browser display mode. + the browser display mode.

    - The display modes list is the list « "fullscreen", "standalone", "minimal-ui", "browser" ». + The display modes list is the list « "fullscreen", "standalone", "minimal-ui", "browser" ».

    - A user agent MUST reflect the applied display mode of the web - application in the 'display-mode' media feature [MEDIAQUERIES-5]. + A user agent MUST reflect the applied display mode of the web + application in the display-mode media feature [MEDIAQUERIES-5].

    -
    Note

    - A user agent will expose the 'display-mode' media feature - irrespective of whether a manifest is being applied to a browsing - context. For example, if the end-user puts the application into - fullscreen, then the user agent would reflect this change to CSS and - scripts via the 'display-mode' media feature. +

    Note

    + A user agent will expose the actual display mode being applied — not + necessarily the one declared in the manifest — via the + display-mode media feature, accessible through CSS or + JavaScript. Note that this media feature will also reflect other + display modes for a web page when a manifest is not being applied. For + example, if the end-user puts the page into fullscreen, then the user + agent would reflect this change to CSS and scripts via the + display-mode media feature.

    8. @@ -3651,8 +3696,8 @@

    Web Application Manifest

    exposed to end-users is left up to implementers.

    - Additionally, when applying a manifest that sets the display - mode to anything except "browser", it is + Additionally, when applying a manifest that sets the display + mode to anything except "browser", it is RECOMMENDED that the user agent clearly indicate to the end-user that their are leaving the normal browsing context of a web browser. Ideally, launching or switching to a web application is performed in a @@ -3836,7 +3881,7 @@

    Web Application Manifest

    There is only one class of product that can claim conformance to this specification: a user agent.

    -
    Note

    +

    Note

    Although this specification is primarily targeted at web browsers, it is feasible that other software could also implement this specification in a conforming manner. For instance, search engines, or crawlers, @@ -3925,7 +3970,7 @@

    Web Application Manifest

    ... }
    -
    Note

    +

    Note

    In this example, we have deliberately chosen (made-up) names of things that could be external sites or services, not names of browsers or browser vendors. These are not vendor prefixes @@ -4082,7 +4127,7 @@

    Web Application Manifest

    the SchemaStore repository on GitHub.

    -
    Note: Web Manifest JSON Schema