Closed Bug 1550058 Opened 6 years ago Closed 5 years ago

Move global keyboard shortcut handling outside of XBL.

Categories

(Core :: XBL, task)

task
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla71
Tracking Status
firefox71 --- fixed

People

(Reporter: mossop, Assigned: mossop)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file)

Currently code inside the XBL directory is responsible for handling keyboard shortcut handlers defined by XBL, keyboard shortcut handlers defined by XUL <key> elements. And some global keyboard shortcut handlers defined in dom/xbl/builtin.

The majority of this code isn't XBL specific at all. I'm experimenting with ripping out the shared pieces into dom/events and just having XBL handlers extend that instead.

This should make it easier to remove support for XBL.

Assignee: nobody → dtownsend

Here is an overview of the plan I want to follow. This bug covers part 1.

https://docs.google.com/document/d/1_Z2P5LeISwXt7JKuS9rKJkJg-ubWbMWUIMXPnbBrywg/

Blocks: 1510785

Most of our keyboard shortcut handling is handled by nsXBLWindowKeyHandler along
with nsXBLPrototypeHandler. With the impending removal of XBL this needs to
change.

This patch moves nsXBLWindowKeyHandler to dom/events/GlobalKeyListener and copies
nsXBLPrototypeHandler to dom/events/KeyEventHandler. Windows, text elements and
XUL <keyset> are changed to use the new copies and anything unnecessary for
those is stripped out.

XBL handler elements still remain using the existing nsXBLPrototypeHandler path.
Some of the code is ripped out there to make it compile. There is probably a
lot more that can be removed but since the whole of XBL is likely gone soon I'm
not sure it is worth cleaning that up much.

smaug: Could you check the strategy of the new directory and class names which I asked from Phabricator.

Flags: needinfo?(bugs)

answered in ph

Flags: needinfo?(bugs)
Pushed by dtownsend@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e18ae5f66cac Move most keyboard shortcut handling out of XBL. r=masayuki
Pushed by dtownsend@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/454b9be1b613 Move most keyboard shortcut handling out of XBL. r=masayuki
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla71
Flags: needinfo?(dtownsend)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: