Move performHapicFeedback to nsIWidget
Categories
(GeckoView :: General, enhancement)
Tracking
(firefox150 fixed)
| Tracking | Status | |
|---|---|---|
| firefox150 | --- | fixed |
People
(Reporter: m_kato, Assigned: imnotlxy)
References
Details
Attachments
(1 file)
By bug 1817606, we use View.performHapticFeedback instead of vibrator API. But when I investigate other platform (UIKit), UIKit's API (UISelectionFeedbackGenerator) also needs UIView. So I think that we should move performHapicFeedback from own service to nsIWidget method, then get a rid of nsIHapicFeedback.
| Assignee | ||
Comment 1•19 days ago
|
||
I can take this if you agree :-)
| Reporter | ||
Comment 2•18 days ago
|
||
| Assignee | ||
Comment 3•16 days ago
|
||
I've thought a bit and don't think it's a good idea.
On Android, almost all Views can perform haptic feedback, so adding a performHapticFeedback method to the base class View is resonable. Unfortunately it's not the case for nsIWidget - only nsWindow on Android (or UIKit in the future) can perform haptic feedback. I don't think we should add such a method to nsIWidget only for two subclasses.
Also, IPC is necessary. No haptic feedback can be performed without going through HAL. Thus hal::PerformHapticFeedback should be kept.
Anyway, I agree that nsIHapicFeedback is no longer necessary. I suggest we remove it and AccessibleCaretManager call hal::PerformHapticFeedback directly.
| Reporter | ||
Comment 4•16 days ago
•
|
||
Since hapic feedback depends on nsIWidget / nsWindow, it isn't good if this service is in hal now. If this feature depends on window (Android and UIkit), it is better to add a IPC method in PBrowser, instead of hal. Accessible Caret has nsPresShell, so it can access nsIWidget (PuppetWidget in child process) directly.
Currently, GeckoView doesn't support multiple screens and multiple windows in multiple screens. At the future, Android might have multiple windows like desktop. Also, the window that shows accessible caret doesn't assures focused window, such as a race condition, or browser side implementation. So I think that is better to add nsIWidget::PerformHapticFeedback.
| Assignee | ||
Comment 5•14 days ago
|
||
Updated•14 days ago
|
Comment 7•5 days ago
|
||
| bugherder | ||
Description
•