diff --git a/css-viewport/Overview.bs b/css-viewport/Overview.bs index dc5eded250f..9253d45cb36 100644 --- a/css-viewport/Overview.bs +++ b/css-viewport/Overview.bs @@ -19,6 +19,12 @@ Issue Tracking: CSSWG GitHub https://github.com/w3c/csswg-drafts/labels/css-view Ignored Vars: +
+spec: virtual-keyboard; urlPrefix: https://w3c.github.io/virtual-keyboard
+	type: interface; text: VirtualKeyboard; url: dom-virtualkeyboard
+	type: attribute; text: overlaysContent; for: VirtualKeyboard; url: dom-virtualkeyboard-overlayscontent
+
+

Introduction

@@ -125,6 +131,7 @@ The recognized properties in the viewport
  • minimum-scale
  • maximum-scale
  • user-scalable
  • +
  • interactive-widget
  • @@ -260,6 +267,83 @@ as follows: Issue: Specify extend-to-zoom behavior by the viewport meta tag +

    ''interactive-widget''

    + +Issue: Move the definition of ''visual viewport'' from CSSOM-View to this spec. + +The interactive-widget property specifies the effect that interactive UI +widgets have on the page's viewports. It defines whether widgets overlay a given viewport or whether +the viewport is shrunken so that it remains fully visible while the widget is showing. Interactive +UI widgets are transient user agent or operating system UI through which a user can provide input. + +
    The most common such UI widget is a virtual keyboard.
    + +The following is a list of valid values for [=interactive-widget=] and the associated +viewport-resizing behavior: + +
    +
    overlays-content
    +
    + Interactive UI widgets MUST NOT [=resize=] the [=initial viewport=] nor + the visual viewport. The user agent must perform the same steps + as when {{VirtualKeyboard/overlaysContent|VirtualKeyboard.overlaysContent}} is set to + true. +
    +
    resizes-content
    +
    + Interactive UI widgets MUST [=resize=] the [=initial viewport=] by the interactive widget. +
    +
    + Since the visual viewport's size is derived from the + [=initial viewport=], [=resizes-content=] will cause a resize of both the initial and visual + viewports. +
    +
    resizes-visual
    +
    + Interactive UI widgets MUST [=resize=] the visual viewport but MUST + NOT [=resize=] the initial viewport. +
    +
    + +If no value, or an invalid value, is set for [=interactive-widget=], the behavior implied by +[=resizes-visual=] is used as the default. + +To resize a viewport by an interactive widget, subtract from it the +intersection of the viewport rect with the widget's OS reported bounding rect. In cases where this +would result in a non-rectangular viewport, the behavior is user agent defined. + +
    + Some examples where the result would non rectangular: a + floating or split keyboard, or a keyboard that + + occupies only part of the viewport. +
    + +

    + Interaction with virtualKeyboard.overlaysContent +

    + +[[!VIRTUAL-KEYBOARD]] provides an imperitive API to apply the [=overlays-content=] behavior via +the {{VirtualKeyboard/overlaysContent|VirtualKeyboard.overlaysContent}} attribute. This attribute +shadows the value set to [=interactive-widget=], namely: + +When {{VirtualKeyboard/overlaysContent|VirtualKeyboard.overlaysContent}} is set to +true, the UA MUST ignore any value set to [=interactive-widget=] when determining the +resizing behavior of interactive widgets. + +When {{VirtualKeyboard/overlaysContent|VirtualKeyboard.overlaysContent}} is set to +false, the UA MUST use the value set to [=interactive-widget=], or the default behavior +if a value is not set, when determining the resizing behavior of interactive widgets. + +Getting the value of {{VirtualKeyboard/overlaysContent|VirtualKeyboard.overlaysContent}} MUST return +only the value previously set to it. + +
    + That is, unless previously set, VirtualKeyboard.overlaysContent returns false + even if interactive-widget=overlays-content is set via the <meta> + tag. +
    +
     {
     	"Algorithms": {