Handle no default in gonk key dispatching

RESOLVED FIXED in mozilla11

Status

()

Core
Widget
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: mwu, Assigned: mwu)

Tracking

(Blocks: 1 bug)

unspecified
mozilla11
All
Gonk (Firefox OS)
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
Created attachment 578035 [details] [diff] [review]
Handle no default in gonk key dispatching

This makes nsEventStatus_eConsumeNoDefault get handled correctly.
Attachment #578035 - Flags: review?(justin.lebar+bug)
Comment on attachment 578035 [details] [diff] [review]
Handle no default in gonk key dispatching

> +    event.flags |= flags;

It would be clearer to do |event.flags = flags|.  Unless event.flags may be non-zero at this point?

For my edification, exactly what problem does this fix?  Is it that if you cancel the keydown, we shouldn't send the keypress?

btw, can you please set git to use more context for diffs?  (Bonus points for using --patience.)
Attachment #578035 - Flags: review?(justin.lebar+bug) → review+
(Assignee)

Comment 2

6 years ago
(In reply to Justin Lebar [:jlebar] from comment #1)
> Comment on attachment 578035 [details] [diff] [review] [diff] [details] [review]
> Handle no default in gonk key dispatching
> 
> > +    event.flags |= flags;
> 
> It would be clearer to do |event.flags = flags|.  Unless event.flags may be
> non-zero at this point?
> 

It is set to NS_EVENT_FLAG_TRUSTED.

> For my edification, exactly what problem does this fix?  Is it that if you
> cancel the keydown, we shouldn't send the keypress?
> 

Something like that. I don't remember the details, but it's the right thing to do and all the widget backends should be doing it.
Blocks: 709468
This patch has review and still applies to m-c. Unless there are any objections, I will land this.
(Assignee)

Comment 4

6 years ago
https://hg.mozilla.org/mozilla-central/rev/16d41bf6df46
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla11
You need to log in before you can comment on or make changes to this bug.