зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1638535. APZCTreeManager::SetTargetAPZC needs to make sure it uses a zoomable apzc if it's processing pinch gesture input. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D75670
This commit is contained in:
Родитель
cbbcb09d62
Коммит
e818c52e6b
|
@ -2398,6 +2398,11 @@ void APZCTreeManager::SetTargetAPZC(
|
||||||
RefPtr<AsyncPanZoomController> apzc = GetTargetAPZC(aTargets[i]);
|
RefPtr<AsyncPanZoomController> apzc = GetTargetAPZC(aTargets[i]);
|
||||||
target = GetZoomableTarget(target, apzc);
|
target = GetZoomableTarget(target, apzc);
|
||||||
}
|
}
|
||||||
|
if (InputBlockState* block = mInputQueue->GetBlockForId(aInputBlockId)) {
|
||||||
|
if (block->AsPinchGestureBlock() && aTargets.Length() == 1) {
|
||||||
|
target = FindZoomableApzc(target);
|
||||||
|
}
|
||||||
|
}
|
||||||
mInputQueue->SetConfirmedTargetApzc(aInputBlockId, target);
|
mInputQueue->SetConfirmedTargetApzc(aInputBlockId, target);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -634,6 +634,10 @@ void InputQueue::ScheduleMainThreadTimeout(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
InputBlockState* InputQueue::GetBlockForId(uint64_t aInputBlockId) {
|
||||||
|
return FindBlockForId(aInputBlockId, nullptr);
|
||||||
|
}
|
||||||
|
|
||||||
InputBlockState* InputQueue::FindBlockForId(uint64_t aInputBlockId,
|
InputBlockState* InputQueue::FindBlockForId(uint64_t aInputBlockId,
|
||||||
InputData** aOutFirstInput) {
|
InputData** aOutFirstInput) {
|
||||||
for (const auto& queuedInput : mQueuedInputs) {
|
for (const auto& queuedInput : mQueuedInputs) {
|
||||||
|
|
|
@ -142,6 +142,8 @@ class InputQueue {
|
||||||
*/
|
*/
|
||||||
bool IsDragOnScrollbar(bool aOnScrollbar);
|
bool IsDragOnScrollbar(bool aOnScrollbar);
|
||||||
|
|
||||||
|
InputBlockState* GetBlockForId(uint64_t aInputBlockId);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
~InputQueue();
|
~InputQueue();
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче