Bug 1810819 - Add NativePanHandlerForHeadless. r=botond

Differential Revision: https://phabricator.services.mozilla.com/D167111
This commit is contained in:
Hiroyuki Ikezoe 2023-01-19 21:07:44 +00:00
Родитель 18a071166c
Коммит 73dd945ce0
1 изменённых файлов: 12 добавлений и 0 удалений

Просмотреть файл

@ -1815,7 +1815,19 @@ const NativePanHandlerForMac = {
delta: -50,
};
const NativePanHandlerForHeadless = {
beginPhase: SpecialPowers.DOMWindowUtils.PHASE_BEGIN,
updatePhase: SpecialPowers.DOMWindowUtils.PHASE_UPDATE,
endPhase: SpecialPowers.DOMWindowUtils.PHASE_END,
promiseNativePanEvent: promiseNativeTouchpadPanEventAndWaitForObserver,
delta: 50,
};
function getPanHandler() {
if (SpecialPowers.isHeadless) {
return NativePanHandlerForHeadless;
}
switch (getPlatform()) {
case "linux":
return NativePanHandlerForLinux;