Consider using different axis locking strategies based on content
Categories
(Core :: Panning and Zooming, enhancement, P3)
Tracking
()
People
(Reporter: ajakobi, Unassigned)
References
Details
Currently, the chosen axis locking mode is used regardless of the content that is being scrolled, so we use the same mode when scrolling text as we do when scrolling a picture.
It might be beneficial to support a more fine granular behavior.
When scrolling a picture, the content being scrolled should closely and freely follow the movement of the finger.
When scrolling text or tables, honoring the traditional axis locking settings supports the reader in not losing the line they're reading.
Comment 1•1 year ago
•
|
||
A simple case to support initially is image documents (where the resource loaded in the tab is an image file directly).
High-level outline of an implementation:
- Add an "is image document" flag to
ScrollMetadata
- In nsLayoutUtils::ComputeScrollMetadata(), populate the flag using document->IsImageDocument() as the value.
- In
AsyncPanZoomController
, make GetAxisLockMode() a non-static method, and have it take into accountmScrollMetadata.mIsImageDocument
.
In the future, we could consider expanding this to set the flag even for some HTML documents if, based on some heuristic criteria, we determine that the HTML document is primarily showing an image.
Description
•