Once treeScopes are used in all SVG instances, we no longer need to build a full vector of EventContexts (http://codesearch.google.com/codesearch/p#OAMlx_jo-ck/src/third_party/WebKit/Source/WebCore/dom/EventDispatcher.cpp&l=237&exact_package=chromium). Instead, we could rely on tree scopes at the time of dispatch to determine whether to retarget.
This is wrong. Since we need to know the _previous_ treeScope, we are still stuck with walking up the tree. Perhaps the data structure could be optimized for non-shadow DOM cases, but this is no critical at all.