Issue metadata
Sign in to add a comment
|
Investigate if we can move DOM mutation events to CEReactions |
||||||||||||||||||||
Issue descriptionThere is an idea to dispatch legacy DOM mutation events on CEReaction timing. As for DOMNodeInsertedIntoDocument, DOMNodeInserted, and DOMSubtreeModified, it would make almost no behavior differences. As for DOMNdoeRemovedFromDocument and DOMNodeRemoved, it would make a behavior differenece because they are dispatched *before* nodes are actually removed. We should try to count: * Node::parentNode() usage inside DOMNodeRemoved* event handlers
,
Jul 2
,
Jul 12
,
Jul 13
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/2e4de5326a3cef994734ee2636a7fc2932ea99f8 commit 2e4de5326a3cef994734ee2636a7fc2932ea99f8 Author: Kent Tamura <tkent@chromium.org> Date: Fri Jul 13 10:20:54 2018 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} [modify] https://crrev.com/2e4de5326a3cef994734ee2636a7fc2932ea99f8/third_party/WebKit/LayoutTests/dom/README.md [add] https://crrev.com/2e4de5326a3cef994734ee2636a7fc2932ea99f8/third_party/WebKit/LayoutTests/dom/legacy_mutation_event/domnoderemoved-usecounter.html [modify] https://crrev.com/2e4de5326a3cef994734ee2636a7fc2932ea99f8/third_party/blink/public/platform/web_feature.mojom [modify] https://crrev.com/2e4de5326a3cef994734ee2636a7fc2932ea99f8/third_party/blink/renderer/core/dom/child_node_list.cc [modify] https://crrev.com/2e4de5326a3cef994734ee2636a7fc2932ea99f8/third_party/blink/renderer/core/dom/child_node_list.h [modify] https://crrev.com/2e4de5326a3cef994734ee2636a7fc2932ea99f8/third_party/blink/renderer/core/dom/container_node.cc [modify] https://crrev.com/2e4de5326a3cef994734ee2636a7fc2932ea99f8/third_party/blink/renderer/core/dom/document.cc [modify] https://crrev.com/2e4de5326a3cef994734ee2636a7fc2932ea99f8/third_party/blink/renderer/core/dom/document.h [modify] https://crrev.com/2e4de5326a3cef994734ee2636a7fc2932ea99f8/third_party/blink/renderer/core/dom/events/event_target.cc [modify] https://crrev.com/2e4de5326a3cef994734ee2636a7fc2932ea99f8/third_party/blink/renderer/core/dom/live_node_list.cc [modify] https://crrev.com/2e4de5326a3cef994734ee2636a7fc2932ea99f8/third_party/blink/renderer/core/dom/node.cc [modify] https://crrev.com/2e4de5326a3cef994734ee2636a7fc2932ea99f8/third_party/blink/renderer/core/dom/node.h [modify] https://crrev.com/2e4de5326a3cef994734ee2636a7fc2932ea99f8/third_party/blink/renderer/core/dom/node.idl [modify] https://crrev.com/2e4de5326a3cef994734ee2636a7fc2932ea99f8/third_party/blink/renderer/core/dom/node_child_removal_tracker.h [modify] https://crrev.com/2e4de5326a3cef994734ee2636a7fc2932ea99f8/third_party/blink/renderer/core/dom/static_node_list.h [modify] https://crrev.com/2e4de5326a3cef994734ee2636a7fc2932ea99f8/third_party/blink/renderer/core/dom/tree_scope.cc [modify] https://crrev.com/2e4de5326a3cef994734ee2636a7fc2932ea99f8/third_party/blink/renderer/core/frame/use_counter.cc [modify] https://crrev.com/2e4de5326a3cef994734ee2636a7fc2932ea99f8/third_party/blink/renderer/core/frame/use_counter.h [modify] https://crrev.com/2e4de5326a3cef994734ee2636a7fc2932ea99f8/third_party/blink/renderer/core/html/html_collection.cc [modify] https://crrev.com/2e4de5326a3cef994734ee2636a7fc2932ea99f8/third_party/blink/renderer/core/testing/internals.cc [modify] https://crrev.com/2e4de5326a3cef994734ee2636a7fc2932ea99f8/third_party/blink/renderer/core/testing/internals.h [modify] https://crrev.com/2e4de5326a3cef994734ee2636a7fc2932ea99f8/third_party/blink/renderer/core/testing/internals.idl [modify] https://crrev.com/2e4de5326a3cef994734ee2636a7fc2932ea99f8/tools/metrics/histograms/enums.xml
,
Jul 17
Let's evaluate UseCounter values after M69 stable release.
,
Sep 18
The NextAction date has arrived: 2018-09-18 |
|||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||
Comment 1 by bugdroid1@chromium.org
, Jul 2