Support elastic scollboxes (touch screens)

NEW
Unassigned

Status

()

Toolkit
XUL Widgets
8 years ago
5 years ago

People

(Reporter: mfinkle, Unassigned)

Tracking

({mobile})

Trunk
mobile
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

In mobile and other touch screen software, scrolling is usually done using touch panning. It is typical for such panning to appear to "over-scroll" when reaching the beginning or end of the scrollable region.

We should add a mode to the scrollbox widget to support this elastic, over-scroll behavior.
OS: Mac OS X → All
Hardware: x86 → All
Assignee: nobody → mbrubeck
Created attachment 444895 [details] [diff] [review]
WIP

Not production-ready code - just a quick proof of concept I'm using for prototyping.
Created attachment 444994 [details] [diff] [review]
WIP 2

Split out the new code into a self-contained XBL binding.  Known issues:

* Only works for horizontal scrolling; need to change this to work for vertical scrolling too, maybe depending on the "orient" attribute.  (For Fennec at least, we have separate vertical and horizontal scrollboxes so we don't need a single control to do both at once.)

* Having to specify an explicit margin size is ugly.  The margins should be auto-sized based on the content size.

* Snap-back should be animated (but allow animation to be disabled if necessary for performance).

Mark, any thoughts on the API you would like to see for the elastic scrollbox control?  This is the first significant amount of XBL I have written, so I appreciate any pointers.
Attachment #444994 - Flags: feedback?(mark.finkle)
Attachment #444895 - Attachment is obsolete: true
Depends on: 585680
Attachment #444994 - Flags: feedback?(mark.finkle)
Assignee: mbrubeck → nobody
Version: unspecified → Trunk
You need to log in before you can comment on or make changes to this bug.