From 170411310755092324ea26fb5c0fe4f35c1e7166 Mon Sep 17 00:00:00 2001 From: David Bokan Date: Tue, 4 Oct 2022 14:44:12 -0400 Subject: [PATCH 1/5] [css-viewport] Add viewport meta 'interactive-widgets' --- css-viewport/Overview.bs | 80 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) diff --git a/css-viewport/Overview.bs b/css-viewport/Overview.bs index dc5eded250f..a9905ceea33 100644 --- a/css-viewport/Overview.bs +++ b/css-viewport/Overview.bs @@ -125,6 +125,7 @@ The recognized properties in the viewport
  • minimum-scale
  • maximum-scale
  • user-scalable
  • +
  • interactive-widgets
  • @@ -260,6 +261,85 @@ as follows: Issue: Specify extend-to-zoom behavior by the viewport meta tag +

    ''interactive-widgets''

    + +Issue: Move the definition of ''visual viewport'' from CSSOM-View to this spec. + +The interactive-widgets 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-widgets=] and the associated +viewport-resizing behavior: + +
    +
    overlays-content
    +
    + Interactive UI widgets MUST NOT [=resize=] the [=initial viewport=] nor + the the visual viewport. The user agent must perform the same steps + + as when + VirtualKeyboard.overlaysContent is set to true. +
    +
    resize-layout
    +
    + Interactive UI widgets MUST [=resize=] the [=initial viewport=]. +
    +
    + Since the visual viewport's size is derived from the + [=initial viewport=], [=resize-layout=] will cause a resize of both the initial and visual + viewports. +
    +
    resize-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-widgets=], the behavior implied by +[=resize-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, a keyboard that + + occupies only part of the viewport. +
    + +

    + Interaction with virtualKeyboard.overlaysContent +

    + +The virtual-keyboard API provides an imperitive API to apply the [=overlays-content=] behavior via +the +virtualKeyboard.overlaysContent attribute. This attribute shadows the value set to +[=interactive-widgets=], namely: + +When virtualKeyboard.overlaysContent is set to true, the UA MUST ignore +any value set to [=interactive-widgets=] when determining the resizing behavior of interactive +widgets. + +When virtualKeyboard.overlaysContent is set to false, the UA MUST use the +value set to [=interactive-widgets=], or the default behavior if a value is not set, when +determining the resizing behavior of interactive widgets. + +Getting value of virtualKeyboard.overlaysContent MUST return only the value previously +set to it. + +
    + That is, unless previously set, virtualKeyboard.overlaysContent returns false + even if interactive-widgets=overlays-content is set via the <meta> + tag. +
    +
     {
     	"Algorithms": {
    
    From a9380384c61253e359101d06423eeedfc1eff449 Mon Sep 17 00:00:00 2001
    From: David Bokan 
    Date: Thu, 6 Oct 2022 16:57:07 -0400
    Subject: [PATCH 2/5] Apply suggestions from chrishtr review
    
    Co-authored-by: Chris Harrelson <3453258+chrishtr@users.noreply.github.com>
    ---
     css-viewport/Overview.bs | 8 ++++----
     1 file changed, 4 insertions(+), 4 deletions(-)
    
    diff --git a/css-viewport/Overview.bs b/css-viewport/Overview.bs
    index a9905ceea33..4cc882952b1 100644
    --- a/css-viewport/Overview.bs
    +++ b/css-viewport/Overview.bs
    @@ -279,14 +279,14 @@ viewport-resizing behavior:
     	
    overlays-content
    Interactive UI widgets MUST NOT [=resize=] the [=initial viewport=] nor - the the visual viewport. The user agent must perform the same steps + the visual viewport. The user agent must perform the same steps as when VirtualKeyboard.overlaysContent is set to true.
    resize-layout
    - Interactive UI widgets MUST [=resize=] the [=initial viewport=]. + Interactive UI widgets MUST [=resize=] the [=initial viewport=] by the interactive widget.
    Since the visual viewport's size is derived from the @@ -309,7 +309,7 @@ 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, a keyboard that + floating or split keyboard, or a keyboard that occupies only part of the viewport.
    @@ -331,7 +331,7 @@ When virtualKeyboard.overlaysContent is set to false, value set to [=interactive-widgets=], or the default behavior if a value is not set, when determining the resizing behavior of interactive widgets. -Getting value of virtualKeyboard.overlaysContent MUST return only the value previously +Getting the value of virtualKeyboard.overlaysContent MUST return only the value previously set to it.
    From 1ded60cec84f196f3a040b409c8f4a0b15a92506 Mon Sep 17 00:00:00 2001 From: David Bokan Date: Fri, 7 Oct 2022 14:46:43 -0400 Subject: [PATCH 3/5] Rename resize-layout to resizes-document --- css-viewport/Overview.bs | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/css-viewport/Overview.bs b/css-viewport/Overview.bs index 4cc882952b1..7fc95035f4d 100644 --- a/css-viewport/Overview.bs +++ b/css-viewport/Overview.bs @@ -125,7 +125,7 @@ The recognized properties in the viewport
  • minimum-scale
  • maximum-scale
  • user-scalable
  • -
  • interactive-widgets
  • +
  • interactive-widget
  • @@ -261,18 +261,18 @@ as follows: Issue: Specify extend-to-zoom behavior by the viewport meta tag -

    ''interactive-widgets''

    +

    ''interactive-widget''

    Issue: Move the definition of ''visual viewport'' from CSSOM-View to this spec. -The interactive-widgets property specifies the effect that interactive UI +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-widgets=] and the associated +The following is a list of valid values for [=interactive-widget=] and the associated viewport-resizing behavior:
    @@ -284,24 +284,24 @@ viewport-resizing behavior: as when VirtualKeyboard.overlaysContent is set to true. -
    resize-layout
    +
    resizes-document
    Interactive UI widgets MUST [=resize=] the [=initial viewport=] by the interactive widget.
    Since the visual viewport's size is derived from the - [=initial viewport=], [=resize-layout=] will cause a resize of both the initial and visual + [=initial viewport=], [=resizes-document=] will cause a resize of both the initial and visual viewports.
    -
    resize-visual
    +
    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-widgets=], the behavior implied by -[=resize-visual=] is used as the default. +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 @@ -321,14 +321,14 @@ would result in a non-rectangular viewport, the behavior is user agent defined. The virtual-keyboard API provides an imperitive API to apply the [=overlays-content=] behavior via the virtualKeyboard.overlaysContent attribute. This attribute shadows the value set to -[=interactive-widgets=], namely: +[=interactive-widget=], namely: When virtualKeyboard.overlaysContent is set to true, the UA MUST ignore -any value set to [=interactive-widgets=] when determining the resizing behavior of interactive +any value set to [=interactive-widget=] when determining the resizing behavior of interactive widgets. When virtualKeyboard.overlaysContent is set to false, the UA MUST use the -value set to [=interactive-widgets=], or the default behavior if a value is not set, when +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 MUST return only the value previously @@ -336,7 +336,7 @@ set to it.
    That is, unless previously set, virtualKeyboard.overlaysContent returns false - even if interactive-widgets=overlays-content is set via the <meta> + even if interactive-widget=overlays-content is set via the <meta> tag.
    From 69d97bf4ddcacc6623c563228845d536205eb449 Mon Sep 17 00:00:00 2001 From: David Bokan Date: Fri, 7 Oct 2022 15:10:19 -0400 Subject: [PATCH 4/5] Fix virtual-keyboard linking --- css-viewport/Overview.bs | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/css-viewport/Overview.bs b/css-viewport/Overview.bs index 7fc95035f4d..45826137706 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

    @@ -280,9 +286,8 @@ viewport-resizing behavior:
    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 is set to true. + as when {{VirtualKeyboard/overlaysContent|VirtualKeyboard.overlaysContent}} is set to + true.
    resizes-document
    @@ -318,24 +323,23 @@ would result in a non-rectangular viewport, the behavior is user agent defined. Interaction with virtualKeyboard.overlaysContent -The virtual-keyboard API provides an imperitive API to apply the [=overlays-content=] behavior via -the -virtualKeyboard.overlaysContent attribute. This attribute shadows the value set to -[=interactive-widget=], namely: +[[!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 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 +true, the UA MUST ignore any value set to [=interactive-widget=] when determining the +resizing behavior of interactive widgets. -When 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. +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 MUST return only the value previously -set to it. +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 + That is, unless previously set, VirtualKeyboard.overlaysContent returns false even if interactive-widget=overlays-content is set via the <meta> tag.
    From 70626a6208aecd93540728dabf8d2d61b097522f Mon Sep 17 00:00:00 2001 From: David Bokan Date: Mon, 10 Oct 2022 16:54:04 -0400 Subject: [PATCH 5/5] 'resizes-document' -> 'resizes-content' --- css-viewport/Overview.bs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/css-viewport/Overview.bs b/css-viewport/Overview.bs index 45826137706..9253d45cb36 100644 --- a/css-viewport/Overview.bs +++ b/css-viewport/Overview.bs @@ -289,13 +289,13 @@ viewport-resizing behavior: as when {{VirtualKeyboard/overlaysContent|VirtualKeyboard.overlaysContent}} is set to true.
    -
    resizes-document
    +
    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-document=] will cause a resize of both the initial and visual + [=initial viewport=], [=resizes-content=] will cause a resize of both the initial and visual viewports.
    resizes-visual