Bug 170982 - Implement the VisualViewport API (visual viewport)
Summary: Implement the VisualViewport API (visual viewport)
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: Safari 10
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ali Juma
URL:
Keywords: InRadar
: 176205 (view as bug list)
Depends on: 179385 179386 179818 181548 181689 193376 193475 193798
Blocks:
  Show dependency treegraph
 
Reported: 2017-04-19 01:03 PDT by Rick Byers
Modified: 2019-03-09 19:34 PST (History)
13 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rick Byers 2017-04-19 01:03:11 PDT
After the fix for bug 170981 it becomes impossible for a page to tell when the visual viewport changes (eg. user has pinch-zoomed, OSK is displayed).  There are a few rare use cases where this is really desirable.  For example when composing a tweet on twitter.com in Chrome the toolbar (add picture, location, characters left, etc.) sticks just above the keyboard.  On Safari Twitter uses a worse UI where the add picture button is just at the bottom of the text, and the characters left is at the top right.

To address these use cases we propose the VisualViewport API: https://github.com/wicg/viewportapi

What do WebKit folks think about the use case here, potentially worth solving?

Regardless of whether the use case seems worth solving at the moment, does the VisualViewport API seem like a reasonable design?
Comment 1 Radar WebKit Bug Importer 2017-04-19 01:08:42 PDT
<rdar://problem/31702305>
Comment 2 Simon Fraser (smfr) 2017-04-19 01:14:26 PDT
The API seems reasonable to me.
Comment 3 Frédéric Wang (:fredw) 2017-11-15 07:59:00 PST
Maybe these developments should be announced on WebKit dev? I only see two messages about visual viewports: 

https://lists.webkit.org/pipermail/webkit-dev/2016-December/028542.html
https://lists.webkit.org/pipermail/webkit-dev/2017-January/028617.html
Comment 4 Ali Juma 2017-11-16 07:42:15 PST
(In reply to Frédéric Wang (:fredw) from comment #3)
> Maybe these developments should be announced on WebKit dev? I only see two
> messages about visual viewports: 
> 
> https://lists.webkit.org/pipermail/webkit-dev/2016-December/028542.html
> https://lists.webkit.org/pipermail/webkit-dev/2017-January/028617.html

Good idea, I sent a message to webkit-dev:
https://lists.webkit.org/pipermail/webkit-dev/2017-November/029751.html
Comment 5 Maciej Stachowiak 2017-11-16 16:37:03 PST
Please make sure to have an experimental feature flag, ideally runtime rather than compile time. (Maybe you already did this, I only briefly skimmed the patches in the subtask bugs.)
Comment 6 Ali Juma 2017-11-16 16:43:04 PST
(In reply to Maciej Stachowiak from comment #5)
> Please make sure to have an experimental feature flag, ideally runtime
> rather than compile time. (Maybe you already did this, I only briefly
> skimmed the patches in the subtask bugs.)

Yes, the patch in bug 179385 adds a runtime experimental feature flag for this.
Comment 7 Ryosuke Niwa 2019-01-29 20:51:43 PST
The feature has been implemented. The remaining test failures are tracked by https://bugs.webkit.org/show_bug.cgi?id=179794, and the change to make zooming invisible is tracked by https://bugs.webkit.org/show_bug.cgi?id=170981
Comment 8 Ryosuke Niwa 2019-03-09 19:34:25 PST
*** Bug 176205 has been marked as a duplicate of this bug. ***