зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1779812 - We are entering the pinch lock too easily. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D151972
This commit is contained in:
Родитель
3f452797f2
Коммит
fd92081aec
|
@ -142,6 +142,7 @@ class APZCPinchLockingTester : public APZCPinchTester {
|
||||||
|
|
||||||
ScreenIntPoint mFocus;
|
ScreenIntPoint mFocus;
|
||||||
float mSpan;
|
float mSpan;
|
||||||
|
int mPinchLockBufferMaxAge;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
APZCPinchLockingTester()
|
APZCPinchLockingTester()
|
||||||
|
@ -150,6 +151,9 @@ class APZCPinchLockingTester : public APZCPinchTester {
|
||||||
mSpan(10.0) {}
|
mSpan(10.0) {}
|
||||||
|
|
||||||
virtual void SetUp() {
|
virtual void SetUp() {
|
||||||
|
mPinchLockBufferMaxAge =
|
||||||
|
StaticPrefs::apz_pinch_lock_buffer_max_age_AtStartup();
|
||||||
|
|
||||||
APZCPinchTester::SetUp();
|
APZCPinchTester::SetUp();
|
||||||
tm->SetDPI(mDPI);
|
tm->SetDPI(mDPI);
|
||||||
apzc->SetFrameMetrics(GetPinchableFrameMetrics());
|
apzc->SetFrameMetrics(GetPinchableFrameMetrics());
|
||||||
|
@ -158,7 +162,7 @@ class APZCPinchLockingTester : public APZCPinchTester {
|
||||||
auto event = CreatePinchGestureInput(PinchGestureInput::PINCHGESTURE_START,
|
auto event = CreatePinchGestureInput(PinchGestureInput::PINCHGESTURE_START,
|
||||||
mFocus, mSpan, mSpan, mcc->Time());
|
mFocus, mSpan, mSpan, mcc->Time());
|
||||||
apzc->ReceiveInputEvent(event);
|
apzc->ReceiveInputEvent(event);
|
||||||
mcc->AdvanceBy(TimeDuration::FromMilliseconds(51));
|
mcc->AdvanceBy(TimeDuration::FromMilliseconds(mPinchLockBufferMaxAge + 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
void twoFingerPan() {
|
void twoFingerPan() {
|
||||||
|
@ -171,7 +175,7 @@ class APZCPinchLockingTester : public APZCPinchTester {
|
||||||
auto event = CreatePinchGestureInput(PinchGestureInput::PINCHGESTURE_SCALE,
|
auto event = CreatePinchGestureInput(PinchGestureInput::PINCHGESTURE_SCALE,
|
||||||
mFocus, mSpan, mSpan, mcc->Time());
|
mFocus, mSpan, mSpan, mcc->Time());
|
||||||
apzc->ReceiveInputEvent(event);
|
apzc->ReceiveInputEvent(event);
|
||||||
mcc->AdvanceBy(TimeDuration::FromMilliseconds(51));
|
mcc->AdvanceBy(TimeDuration::FromMilliseconds(mPinchLockBufferMaxAge + 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
void twoFingerZoom() {
|
void twoFingerZoom() {
|
||||||
|
@ -184,7 +188,7 @@ class APZCPinchLockingTester : public APZCPinchTester {
|
||||||
auto event = CreatePinchGestureInput(PinchGestureInput::PINCHGESTURE_SCALE,
|
auto event = CreatePinchGestureInput(PinchGestureInput::PINCHGESTURE_SCALE,
|
||||||
mFocus, newSpan, mSpan, mcc->Time());
|
mFocus, newSpan, mSpan, mcc->Time());
|
||||||
apzc->ReceiveInputEvent(event);
|
apzc->ReceiveInputEvent(event);
|
||||||
mcc->AdvanceBy(TimeDuration::FromMilliseconds(51));
|
mcc->AdvanceBy(TimeDuration::FromMilliseconds(mPinchLockBufferMaxAge + 1));
|
||||||
mSpan = newSpan;
|
mSpan = newSpan;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -665,12 +665,12 @@
|
||||||
# Fetch displayport updates early from the message queue.
|
# Fetch displayport updates early from the message queue.
|
||||||
- name: apz.pinch_lock.mode
|
- name: apz.pinch_lock.mode
|
||||||
type: RelaxedAtomicInt32
|
type: RelaxedAtomicInt32
|
||||||
value: 1
|
value: 2
|
||||||
mirror: always
|
mirror: always
|
||||||
|
|
||||||
- name: apz.pinch_lock.scroll_lock_threshold
|
- name: apz.pinch_lock.scroll_lock_threshold
|
||||||
type: AtomicFloat
|
type: AtomicFloat
|
||||||
value: 1.0f / 32.0f # 1/32 inches
|
value: 1.0f / 16.0f # 1/16 inches
|
||||||
mirror: always
|
mirror: always
|
||||||
|
|
||||||
- name: apz.pinch_lock.span_breakout_threshold
|
- name: apz.pinch_lock.span_breakout_threshold
|
||||||
|
@ -685,7 +685,7 @@
|
||||||
|
|
||||||
- name: apz.pinch_lock.buffer_max_age
|
- name: apz.pinch_lock.buffer_max_age
|
||||||
type: int32_t
|
type: int32_t
|
||||||
value: 50 # milliseconds
|
value: 80 # milliseconds
|
||||||
mirror: once
|
mirror: once
|
||||||
|
|
||||||
- name: apz.popups.enabled
|
- name: apz.popups.enabled
|
||||||
|
|
Загрузка…
Ссылка в новой задаче