commit | 2e4de5326a3cef994734ee2636a7fc2932ea99f8 | [log] [tgz] |
---|---|---|
author | Kent Tamura <tkent@chromium.org> | Fri Jul 13 10:20:54 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Fri Jul 13 10:20:54 2018 |
tree | 28c88bd505085279839cb82b4777d94bab1ad297 | |
parent | b0418cab22c8cc2b47033d3f45b16dd31d105216 [diff] |
DOM: Add some UseCounters to investigate possibility to change legacy DOM mutation event timing We'd like to make DOMNodeRemoved and DOMNodeRemovedFromDocument events asynchronous. This CL adds some UseCounters to investigate its impact. * kDOMNodeRemoved*EventDelayed: We already dispatch the events asynchronously in some cases. This counts them. * kDOMNodeRemoved*EventHandlerAccessDetachingNode: Count cases where - Accessing parentNode of to-be-removed Node - getElementById() for to-be-removed Node or its descendants - NodeList/HTMLCollection/querySelector*() for to-be-removed Node or its descendants in DONNodeRemoved* event handler. If we change the timing, we'll have incompatibility in such cases. This doesn't have a perfect coverage. For example, sibling access from a sibling of to-be-removed node is not counted. * kDOMNodeRemoved*EventListenedAtNonTarget: Count if the events are listened at non-target nodes. If we change the timing, bubbling/capturing won't work well. This CL has no behavior changes except UseCounters. If benchmarks regress a little, we won't revert this CL soon, and will revert after a branch point. If benchmarks regress very much, we'll revert this CL. Test infrastructure: * Add internals.clearUseCounter() so that we can test a UseCounter multiple times in a single test. Bug: 859391 Change-Id: Iefaa324217a3e914c7f095165aba513b847b328f Reviewed-on: https://chromium-review.googlesource.com/1134640 Commit-Queue: Kent Tamura <tkent@chromium.org> Reviewed-by: Hayato Ito <hayato@chromium.org> Cr-Commit-Position: refs/heads/master@{#574877}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .