Implement TargetHandler and TargetHandlersManager

RESOLVED FIXED in 2.1 S1 (1aug)

Status

RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: timdream, Assigned: timdream)

Tracking

unspecified
2.1 S1 (1aug)
x86
macOS
Dependency tree / graph

Firefox Tracking Flags

(b2g-v2.1 fixed)

Details

(Whiteboard: [p=8])

Attachments

(1 attachment)

After bug 1029356, it's obvious that each of the key/target goes through it's own life cycle and handling. Instead of keeping a giant switch .. case, we should implement the following

-- A |DefaultTargetHandler| as the default handler of targets
-- Special handlers for special keys like backspace which inherits from DefaultTargetHandler
-- A |TargetHandlersManager| which listens to call from |ActiveTargetsManager|, and create/dispatch call to the handlers. It would need to keep a Map or WeakMap to host a mapping between targets (which is DOMElement) and the handler instances.
Assignee: nobody → timdream
Status: NEW → ASSIGNED
Whiteboard: [p=5]
Target Milestone: --- → 2.0 S6 (18july)
I can no longer get this in for this sprint because of bug 1038131 and bug 1036577.
Target Milestone: 2.0 S6 (18july) → 2.1 S1 (1aug)
Comment on attachment 8458391 [details] [review]
mozilla-b2g:master PR#21898

This misses some unit tests but I think we can start the review process.
Attachment #8458391 - Flags: review?(rlu)
Comment on attachment 8458391 [details] [review]
mozilla-b2g:master PR#21898

Looks good to me.
Thanks.
Attachment #8458391 - Flags: review?(rlu) → review+
Comment on attachment 8458391 [details] [review]
mozilla-b2g:master PR#21898

Please review the test too?
Attachment #8458391 - Flags: review+ → review?(rlu)
Comment on attachment 8458391 [details] [review]
mozilla-b2g:master PR#21898

r+ for the tests as well, please help take a look at the comments on the GH.
Thanks.
Attachment #8458391 - Flags: review?(rlu) → review+
master: https://github.com/mozilla-b2g/gaia/commit/456a2e59c12f18c22a694b4042e33c607b3ce740
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
status-b2g-v2.1: --- → fixed
Resolution: --- → FIXED
Whiteboard: [p=5] → [p=8]
You need to log in before you can comment on or make changes to this bug.