Closed Bug 1630912 Opened 4 years ago Closed 4 years ago

land initial preffed off implementation of direct manipulation

Categories

(Core :: Panning and Zooming, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla78
Tracking Status
firefox78 --- fixed

People

(Reporter: tnikkel, Assigned: tnikkel)

References

(Regressed 1 open bug)

Details

(Whiteboard: [apz:dtz:10:L])

Attachments

(6 files, 1 obsolete file)

No description provided.

Mostly kats' work from https://github.com/staktrace/gecko/commit/241a8b7d30533a6024a92b3adb31497586cce45d

So kats please direct review to someone as appropriate.

Assignee: nobody → tnikkel
Status: NEW → ASSIGNED

I have no idea why I need to do this. Let me know if there is a better way.

Depends on D71303

Depends on D71305

We can't just get pinch events, we need to handle both.

This state machine code is basically copied from Chrome's implementation.

Depends on D71306

Blocks: 1568676
Priority: -- → P3
Attachment #9141217 - Attachment description: Bug 1630912. Add a simple way to observe vsync on the mainthread. r?kats → Bug 1630912. Add a simple way to observe vsync on the mainthread. r?jrmuizel
Attachment #9141218 - Attachment description: Bug 1630912. Add a bunch of forward declarations for dmanip. r?aklotz → Bug 1630912. Add a bunch of forward declarations for direct manipulation. r?aklotz
Attachment #9141220 - Attachment description: Bug 1630912. Hook up direct manip object to vsync. r?kats → Bug 1630912. Hook up direct manipulation object to vsync. r=kats
Attachment #9141217 - Attachment description: Bug 1630912. Add a simple way to observe vsync on the mainthread. r?jrmuizel → Bug 1630912. Add a simple way to observe vsync on the mainthread. r=jrmuizel
Attachment #9141218 - Attachment description: Bug 1630912. Add a bunch of forward declarations for direct manipulation. r?aklotz → Bug 1630912. Add PT_TOUCHPAD to touchinjection_sdk80.h. r?aklotz
Attachment #9141221 - Attachment description: Bug 1630912. Add a small state machine and code to send pinch and pan events from direct manipulation. r?kats → Bug 1630912. Add a small state machine and code to send pinch and pan events from direct manipulation. r=kats

The old code didn't handle content prevent defaulting the input.

The pinch gesture code doesn't seem to fully work properly, it will allow a little pinch zooming before halting it if content is prevent defaulting it. Not sure what is up yet.

Depends on D71307

Pushed by tnikkel@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e6cd2ceab183
Add a simple way to observe vsync on the mainthread. r=jrmuizel
https://hg.mozilla.org/integration/autoland/rev/f7d9852a3d09
Add PT_TOUCHPAD to touchinjection_sdk80.h. r=aklotz
https://hg.mozilla.org/integration/autoland/rev/e202ddeb4e40
Create the necessary direct manipulation objects. r=aklotz
https://hg.mozilla.org/integration/autoland/rev/108b1a07929b
Hook up direct manipulation object to vsync. r=kats
https://hg.mozilla.org/integration/autoland/rev/08a6a1f1c4c7
Add a small state machine and code to send pinch and pan events from direct manipulation. r=kats
https://hg.mozilla.org/integration/autoland/rev/21dc02bc12b9
Handle sending Direct Manipulation input events properly. r=kats

This also caused bug 1635349, gtest failure on macOS

Depends on: 1635349
Depends on: 1635710

I guess I only tested in non-debug builds until now, here's stack I got.

Hit MOZ_CRASH(DManipEventHandler not thread-safe) at c:/mozilla/src/xpcom/base/nsISupportsImpl.cpp:40
#01: mozilla::widget::DManipEventHandler::QueryInterface (c:\mozilla\src\widget\windows\DirectManipulationOwner.cpp:0)
#02: DllGetActivationFactory[C:\WINDOWS\system32\directmanipulation.dll +0x4f708]
#03: DllGetActivationFactory[C:\WINDOWS\system32\directmanipulation.dll +0x4fae4]
#04: DllGetActivationFactory[C:\WINDOWS\system32\directmanipulation.dll +0x49d0d]
#05: DllGetActivationFactory[C:\WINDOWS\system32\directmanipulation.dll +0x481a8]
#06: DllGetActivationFactory[C:\WINDOWS\system32\directmanipulation.dll +0x4912b]
#07: DllGetActivationFactory[C:\WINDOWS\system32\directmanipulation.dll +0x5823f]
#08: DllGetActivationFactory[C:\WINDOWS\system32\directmanipulation.dll +0x57fb7]
#09: DllGetActivationFactory[C:\WINDOWS\system32\directmanipulation.dll +0x58872]
#10: DllGetActivationFactory[C:\WINDOWS\system32\directmanipulation.dll +0x57df0]
#11: DllGetActivationFactory[C:\WINDOWS\system32\directmanipulation.dll +0x57d53]
#12: DllGetActivationFactory[C:\WINDOWS\system32\directmanipulation.dll +0x5410e]
#13: InitializeDManipHook[C:\WINDOWS\system32\directmanipulation.dll +0x37645]
#14: ???[C:\WINDOWS\system32\directmanipulation.dll +0x1e754]
#15: BaseThreadInitThunk[C:\WINDOWS\System32\KERNEL32.DLL +0x17bd4]
#16: RtlUserThreadStart[C:\WINDOWS\SYSTEM32\ntdll.dll +0x6ce51]

Do I need to change anything else or is this enough?

Depends on D73220

Attachment #9146106 - Attachment is obsolete: true
Blocks: 1636061
Pushed by tnikkel@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f9f85e3ccde7
Add a simple way to observe vsync on the mainthread. r=jrmuizel
https://hg.mozilla.org/integration/autoland/rev/b1bd509220e9
Add PT_TOUCHPAD to touchinjection_sdk80.h. r=aklotz
https://hg.mozilla.org/integration/autoland/rev/321438a68aab
Create the necessary direct manipulation objects. r=aklotz
https://hg.mozilla.org/integration/autoland/rev/05015d1e8315
Hook up direct manipulation object to vsync. r=kats
https://hg.mozilla.org/integration/autoland/rev/c6a3a55f67a1
Add a small state machine and code to send pinch and pan events from direct manipulation. r=kats
https://hg.mozilla.org/integration/autoland/rev/93ab81106303
Handle sending Direct Manipulation input events properly. r=kats
Flags: needinfo?(tnikkel)
Regressions: 1636646
Whiteboard: [apz:dtz:10:L]
Depends on: 1641996
Depends on: 1643461
Depends on: 1648489
Regressions: 1649847
Blocks: 890878
Regressions: 1653700
Depends on: 1657073
Depends on: 1658001
Depends on: 1658647
Regressions: 1688086
Depends on: 1697756
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: