Make `EditorBase::MaybeHasMutationEventListeners()` always return `true` on debug builds
Categories
(Core :: DOM: Editor, enhancement, P2)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox79 | --- | fixed |
People
(Reporter: masayuki, Assigned: masayuki)
Details
Attachments
(1 external file)
For the performance reason, editor check DOM tree after changing DOM tree only when there are some mutation event listeners. That means that editor behavior shouldn't change only by whether there are mutation event listeners or not. So, we should test the complicated cases in debug build.
| Assignee | ||
Comment 1•6 years ago
|
||
According to the telemetry data, almost all web apps in the word do not use
mutation event listeners, but if they are used, editor needs to check
whether modifying node is modified by web apps. The checking cost may not
cheap in some cases. Therefore, we check whether the window has at least one
mutation event listeners or not before non-cheap checking.
However, like actual web apps, most our mochitests and WPT do not add
mutation event listeners. Therefore, such additional checking code is not
tested even though they should work as exactly same as the case when
there are mutation event listeners but they don't touch the DOM.
This patch makes it always return only in debug build for checking the
complicated path.
Comment 3•6 years ago
|
||
| bugherder | ||
Description
•