mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 867582 - Make the Axis overscroll correction use floats for more correctness. r=ajones
This commit is contained in:
parent
486a935da3
commit
e1795f440a
@ -221,7 +221,7 @@ float Axis::GetExcess() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Axis::Overscroll Axis::DisplacementWillOverscroll(int32_t aDisplacement) {
|
Axis::Overscroll Axis::DisplacementWillOverscroll(float aDisplacement) {
|
||||||
// If the current pan plus a displacement takes the window to the left of or
|
// If the current pan plus a displacement takes the window to the left of or
|
||||||
// above the current page rect.
|
// above the current page rect.
|
||||||
bool minus = GetOrigin() + aDisplacement < GetPageStart();
|
bool minus = GetOrigin() + aDisplacement < GetPageStart();
|
||||||
@ -240,7 +240,7 @@ Axis::Overscroll Axis::DisplacementWillOverscroll(int32_t aDisplacement) {
|
|||||||
return OVERSCROLL_NONE;
|
return OVERSCROLL_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
float Axis::DisplacementWillOverscrollAmount(int32_t aDisplacement) {
|
float Axis::DisplacementWillOverscrollAmount(float aDisplacement) {
|
||||||
switch (DisplacementWillOverscroll(aDisplacement)) {
|
switch (DisplacementWillOverscroll(aDisplacement)) {
|
||||||
case OVERSCROLL_MINUS: return (GetOrigin() + aDisplacement) - GetPageStart();
|
case OVERSCROLL_MINUS: return (GetOrigin() + aDisplacement) - GetPageStart();
|
||||||
case OVERSCROLL_PLUS: return (GetCompositionEnd() + aDisplacement) - GetPageEnd();
|
case OVERSCROLL_PLUS: return (GetCompositionEnd() + aDisplacement) - GetPageEnd();
|
||||||
|
@ -125,13 +125,13 @@ public:
|
|||||||
* That is to say, if the given displacement is applied, this will tell you
|
* That is to say, if the given displacement is applied, this will tell you
|
||||||
* whether or not it will overscroll, and in what direction.
|
* whether or not it will overscroll, and in what direction.
|
||||||
*/
|
*/
|
||||||
Overscroll DisplacementWillOverscroll(int32_t aDisplacement);
|
Overscroll DisplacementWillOverscroll(float aDisplacement);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If a displacement will overscroll the axis, this returns the amount and in
|
* If a displacement will overscroll the axis, this returns the amount and in
|
||||||
* what direction. Similar to getExcess() but takes a displacement to apply.
|
* what direction. Similar to getExcess() but takes a displacement to apply.
|
||||||
*/
|
*/
|
||||||
float DisplacementWillOverscrollAmount(int32_t aDisplacement);
|
float DisplacementWillOverscrollAmount(float aDisplacement);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the overscroll state of the axis given a scaling of the page. That is
|
* Gets the overscroll state of the axis given a scaling of the page. That is
|
||||||
|
Loading…
Reference in New Issue
Block a user