Replace the oscillating spring physics used for B2G with simpler physics
where we just snap back without oscillating, using an MSD model.
This is not currently used, but will be once we enable overscroll for
macOS.
MozReview-Commit-ID: 8g2Sjdj002Z
--HG--
extra : rebase_source : 6cea43d993ce7ebfeab8a6cf3ebb3c5a7c8f29df
In cases where a mouse click that starts a scrollbar drag is also what
layerizes the scroll frame, the StartAsyncScrollbarDrag message needs to
arrive after the layer transaction. This patch ensures it does.
MozReview-Commit-ID: A02qRb6yWxg
--HG--
extra : rebase_source : 3517e8c8a578a0bd257a80bb8cb81303d171bb6c
Some consumers want to use the async scroll offset in CSS pixels, and
it's pointless to convert to ParentLayer pixels only to have the consumer
convert it back.
MozReview-Commit-ID: B8nq3LUPM6Q
--HG--
extra : rebase_source : 9d2fc1d7637945bf582877118fd7d53e04c00f4c
After click events with button 2 or 3 are fired, fire auxclick, a new
event intended to represent a non-primary mouse click. Because this
event, based on the design examples and blink's implementation, is
intended to be used with content listeners, always dispatch on content
listeners--not just those that force all events to be dispatched (i.e.
document/window). This diverges from the behavior of our click events
from non-primary buttons.
Eventually, we hope this will replace click events for non-primary
buttons. For now, leave those events for compatibility reasons.
Additionally, add handling of this new event, where necessary.
MozReview-Commit-ID: 8osozM4h6Ya
--HG--
extra : rebase_source : 558261dd0d0b9241efa84ca168c50455850af03a
Fix thumb position determination in these places:
- nsSliderFrame::StartAPZDrag() -- Constrain sliderTrack using
GetXULClientRect() to match dimensions used in
SetCurrentThumbPosition() and DoXULLayout(). This is what caused
the scaling/offset mismatch.
- nsSliderFrame::StartAPZDrag() -- Adjust nonsensical calculation of
cssSliderTrack. Should be sliderFrame + scrollbarFramePosition -
compositionBoundsPosition, to get coordinates relative to the same
region as that of APZ event coordinates.
- AsyncDragMetrics -- Make mScrollTrack and mScrollbarDragOffset float
instead of int coordinates.
- AsyncPanZoomController::HandleDragEvent() -- Use
GetAxisLength(scrollTrack) instead of GetAxisEnd(scrollTrack) in
calculation of scrollMax.
- AsyncPanZoomController::HandleDragEvent() -- Only change position on
MOUSE_MOVE.
Additional refactors:
- Rename HitTestingTreeNode::GetScrollSize() to GetScrollThumbLength(),
along with related functions/variables.
- Rename AsyncPanZoomController::GetAxisSize() to GetAxisLength().
- Rename cf to scrollFrame in nsSliderFrame::StartAPZDrag().
MozReview-Commit-ID: CIsU8Pj6qfa
--HG--
extra : rebase_source : 29548fb95ec3e958d903d964753857ee949753ba