Closed Bug 1100680 Opened 7 years ago Closed 7 years ago
Overscroll spring compression can bring content outside of scrollable rect into view
While talking with Gordon about bug 1096513, I realized that there is an edge case to the overscroll bounce effect that we don't currently handle. In the compression phase of the spring oscillation, slightly more content is brought into the composition bounds than at the resting state. If the scrollable rect of the scrollable element is only slightly larger than the composition bounds, we might end up bringing more content into view than is available. This is illustrated by this test page: http://people.mozilla.org/~bballo/compress.html. If you overscroll the blue div, you can see a bit of green showing through during the compressions. Gordon suggested a simple solution to this: detect when we're in this situation (should be doable with some math, or by running through a simulation of the bounce), and if we are, adjust the spring damping factor so that the spring system is critically dampened (should also be doable with some math). A refinement of this idea is to adjust the dampening factor such that it's not critical, but the maximum compression that it yields is equal to the available space in the scrollable rect (also doable with some math). Gordon: since this is an edge case, I plan to prioritize this lower than bug 1042103, which affects all cases. Let me know if you think that's reasonable.
7 years ago
7 years ago
Depends on: 1096513
Sounds like what I fixed in bug 1096513.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1096513
You need to log in before you can comment on or make changes to this bug.