Make EventHandler order explicit |
||
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.
,
Mar 16 2017
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?
,
Mar 16 2017
Peng is adding support for rewriting now. See https://codereview.chromium.org/2712963003/ . |
||
►
Sign in to add a comment |
||
Comment 1 by jamescook@chromium.org
, Sep 22 2016