Closed
Bug 563329
Opened 15 years ago
Closed 15 years ago
Add a preference to enable/disable click hold context menus
Categories
(Firefox for Android Graveyard :: General, defect)
Firefox for Android Graveyard
General
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: vingtetun, Assigned: vingtetun)
References
(Depends on 1 open bug)
Details
Attachments
(1 file, 5 obsolete files)
|
25.43 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
Actually the maemo version of Fennec use click hold context menus to be able to show a context menus during a long touch (equivalent of a long left click).
It would be nice to be able to simulate that on desktop.
Also the current duration before showing the context menus is hard coded, but 500ms is fine on desktop but it is too short on device.
| Assignee | ||
Comment 1•15 years ago
|
||
This patch use a pref instead of a configure option
Attachment #443077 -
Attachment is obsolete: true
Attachment #443090 -
Flags: review?(Olli.Pettay)
Comment 2•15 years ago
|
||
Comment on attachment 443090 [details] [diff] [review]
Patch v0.2 - use a pref instead of a configure option
If the nits mentioned on IRC are fixed.
Attachment #443090 -
Flags: review?(Olli.Pettay) → review+
Comment 3•15 years ago
|
||
...so, use AddObserver. And please add some tests if there aren't any
tests for this code.
| Assignee | ||
Comment 5•15 years ago
|
||
(In reply to comment #3)
> ...so, use AddObserver. And please add some tests if there aren't any
> tests for this code.
I'm looking for tests. Thanks for your quick reply.
| Assignee | ||
Comment 6•15 years ago
|
||
I've left an error in the previous patch.
Tests will come.
Attachment #443095 -
Attachment is obsolete: true
| Assignee | ||
Comment 7•15 years ago
|
||
Updated patch + tests.
I've send it to tryserver.
Attachment #443090 -
Attachment is obsolete: true
Attachment #443110 -
Attachment is obsolete: true
| Assignee | ||
Comment 8•15 years ago
|
||
Comment on attachment 443320 [details] [diff] [review]
Patch + tests
I've updated the patch on trunk and also i've changed the prefs in all.js compare to the previous patch just to be sure it is disabled by default on all platforms.
Everything went fine on try server.
Attachment #443320 -
Flags: review?(Olli.Pettay)
Comment 9•15 years ago
|
||
Comment on attachment 443320 [details] [diff] [review]
Patch + tests
> void
> nsEventStateManager::BeginTrackingDragGesture(nsPresContext* aPresContext,
> nsMouseEvent* inDownEvent,
> nsIFrame* inDownFrame)
> {
>+ NS_ASSERTION(inDownEvent->widget, "aEvent-widget is null");
>+
This assertion is useless. We crash if ->widget is null.
Do you really need to use so many timeouts in the test. That looks
pretty error-prone. Couldn't you just add event listeners and if
contextmenu etc is dispatched, then the test passes?
| Assignee | ||
Comment 10•15 years ago
|
||
(In reply to comment #9)
> (From update of attachment 443320 [details] [diff] [review])
>
> > void
> > nsEventStateManager::BeginTrackingDragGesture(nsPresContext* aPresContext,
> > nsMouseEvent* inDownEvent,
> > nsIFrame* inDownFrame)
> > {
> >+ NS_ASSERTION(inDownEvent->widget, "aEvent-widget is null");
> >+
> This assertion is useless. We crash if ->widget is null.
>
I've changed it with a check on widget, otherwise we crash if the event is generated using nsIDOMWindowUtils.dispatchDOMEventViaPresShell because inDownEvent->widget is null and we are using it to get the coordinate right after.
>
> Do you really need to use so many timeouts in the test. That looks
> pretty error-prone. Couldn't you just add event listeners and if
> contextmenu etc is dispatched, then the test passes?
I've rewrite the tests but I'm still keeping some setTimeout/executeSoon otherwise i'm running into some weird race conditions issue.
Attachment #443320 -
Attachment is obsolete: true
Attachment #443641 -
Flags: review?(Olli.Pettay)
Attachment #443320 -
Flags: review?(Olli.Pettay)
Updated•15 years ago
|
Attachment #443641 -
Flags: review?(Olli.Pettay) → review+
| Assignee | ||
Updated•15 years ago
|
Keywords: checkin-needed
| Assignee | ||
Comment 11•15 years ago
|
||
Do I need to ask a sr for the patch?
Comment 12•15 years ago
|
||
removing checkin-needed until c#11 is answered in some way.
Keywords: checkin-needed
Comment 13•15 years ago
|
||
(In reply to comment #11)
> Do I need to ask a sr for the patch?
no
Keywords: checkin-needed
| Assignee | ||
Comment 14•15 years ago
|
||
(In reply to comment #13)
> (In reply to comment #11)
> > Do I need to ask a sr for the patch?
>
> no
Thanks. I'll land it tomorrow if possible.
| Assignee | ||
Comment 15•15 years ago
|
||
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Summary: Add a configure option to enable click hold context menus on desktop → Add a preference to enable/disable click hold context menus
Comment 16•15 years ago
|
||
disabled the test and filed Bug 572327 due to timeouts.
Keywords: checkin-needed
Comment 17•15 years ago
|
||
verified FIXED on build:
Mozilla/5.0 (X11; U; Linux armv71; Nokia N900; en-US; rv:1.9.3a6pre) Gecko/2010621 Namoroka/3.7a6pre Fennec/2.0a1pre
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•