New issue
Advanced search Search tips

Issue 649415 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner:
Closed: Mar 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome
Pri: 2
Type: Feature

Blocking:
issue 599883



Sign in to add a comment

Make EventHandler order explicit

Project Member Reported by derat@chromium.org, Sep 22 2016

Issue description

(Splitting out from issue 599883.)

The order in which ui::EventHandlers are called is currently determined by calls to ui::EventTarget::AddPreTargetHandler, PrependPreTargetHandler, and AddPostTargetHandler that are scattered across the code (some are in ash::Shell::Init, while other are in the handlers' c'tors). To complicate matters further, some handlers like MenuPreTargetHandler are created dynamically. This can lead to bugs like issue 599883, where handlers are run in the wrong order.

afakhry@ made a suggestion that we could pass an integer priority when registering each handler, and keep the entire list of priorities in a single place. There may be layering issues with doing this (some handlers live in ui/, others in ash/, and still others in chrome/, for instance), but maybe we can get away with just listing priorities for important ui/ handlers and then dumping everything else into a single priority bucket.

I'm going to do an audit of the order in which we currently register handlers.
 
Just FYI, mustash will not support global EventHandlers in ash, so this will only apply to classic ash.

If you need an audit of EventHandlers from April, see go/ash-eventhandlers

Comment 2 by derat@chromium.org, Mar 16 2017

Status: WontFix (was: Started)
I'm unlikely to do anything here before all of this code is replaced.

Is there a bug or doc tracking how event rewriting works (or will work) in mash?

Comment 3 by sky@chromium.org, Mar 16 2017

Peng is adding support for rewriting now. See https://codereview.chromium.org/2712963003/ .

Sign in to add a comment