Closed
Bug 1202320
Opened 9 years ago
Closed 9 years ago
PresShell::AsyncPanZoomEnabled() returns false in B2G root process
Categories
(Core :: Panning and Zooming, defect)
Core
Panning and Zooming
Tracking
()
RESOLVED
FIXED
mozilla43
Tracking | Status | |
---|---|---|
firefox43 | --- | fixed |
People
(Reporter: TYLin, Assigned: TYLin)
Details
Attachments
(1 file)
916 bytes,
patch
|
kats
:
review+
|
Details | Diff | Splinter Review |
|APZCCallbackHelper::FireSingleTapEvent| will fire eMouseMove, eMouseDown, and eMouseUp after NS_TOUCH_END.
Currently, AccessibleCaretEventHub transits to NoAction immediately after processed the long tap event. If we select a very long word on rocket bar (as long as the rocket bar itself), those mouse events will deselect the selected word.
Assignee | ||
Comment 1•9 years ago
|
||
It seems to be an APZ issue. On b2g main process, mPresShell->AsyncPanZoomEnabled() always turns false in [1] so AccessibleCaretEventHub will inject a fake long tap event.
However, even if APZ seems disabled on b2g process, eMouseLongTap is still fired by the following steps.
1. Launch rocket bar by tapping "search or enter address" from home screen.
2. Type some text.
3. Long tap on a word.
4. A word is selected by the triggering of eMouseLongTap event.
However, eMouseLongTap does not fired if I launch rocket bar from an arbitrary app. For example:
1. Launch Phone app.
2. Tap the status bar to launch the rocket bar.
3. Type some text.
3. Long tap on a word.
4. eMouseLongTap does not fired in this case. Select a word by a fake long tap event, and suffer from the symptom described in comment 0.
Kats, I might need your help here. AFAIK, APZ should be enabled all processes on B2G. Not sure if this is related to bug 1162064.
[1] https://dxr.mozilla.org/mozilla-central/rev/56f5ffd44b7f13d5db5bd497018f428dcbb28fc4/layout/base/AccessibleCaretEventHub.cpp#415
Flags: needinfo?(bugmail.mozilla)
Assignee | ||
Updated•9 years ago
|
Assignee: tlin → nobody
Component: Selection → Panning and Zooming
Comment 2•9 years ago
|
||
Sorry, I'm not able to reproduce this issue (following the STR in comment 1) on an Aries device running latest master. From both the homescreen and the phone app I'm able to select words just fine in the rocketbar. Please let me know if I misunderstood something.
And yes, the APZ should be enabled in the b2g root process. It maybe that nsPresShell::AsyncPanZoomEnabled() is not finding a root view or widget and is falling down to the "false" case at the bottom. If so, we can replace that false with a call to gfxPlatform::AsyncPanZoomEnabled() instead.
Component: Panning and Zooming → Selection
Flags: needinfo?(bugmail.mozilla)
Assignee | ||
Comment 3•9 years ago
|
||
Kats, thank you for the quick response. After updating my repository to the latest master, I can always got the eMouseLongTap event in rocketbar.
I found that widget is nullptr in nsPresShell::AsyncPanZoomEnabled() in the b2g root process. I'll upload a patch to use gfxPlatform::AsyncPanZoomEnabled() as the fallback in nsPresShell::AsyncPanZoomEnabled().
Assignee | ||
Comment 4•9 years ago
|
||
If root view or widget cannot be found, use platform value of
AsyncPanZoomEnabled.
Attachment #8658127 -
Flags: review?(bugmail.mozilla)
Comment 5•9 years ago
|
||
Comment on attachment 8658127 [details] [diff] [review]
Fall back to platform APZ enabled in PresShell.
Review of attachment 8658127 [details] [diff] [review]:
-----------------------------------------------------------------
I don't think I actually understand what the problem is, but this patch should be harmless so I'm fine with landing it.
Attachment #8658127 -
Flags: review?(bugmail.mozilla) → review+
Assignee | ||
Comment 6•9 years ago
|
||
If APZ is enabled, the carets will listen eMouseLongTap event to select a word. However if APZ is disabled, caret will use a timer to simulate a long tap event to select a word itself. On B2G, the simulated long tap shouldn't be used.
Assignee | ||
Comment 7•9 years ago
|
||
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → tlin
Component: Selection → Panning and Zooming
Summary: Sometimes long tap on rocketbar will fail to select a word → PresShell::AsyncPanZoomEnabled() returns false in B2G root process
Comment 9•9 years ago
|
||
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox43:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
You need to log in
before you can comment on or make changes to this bug.
Description
•