зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1694728 - pause the fluent observer while updating the about:processes or about:performance page, r=Gijs.
Differential Revision: https://phabricator.services.mozilla.com/D106299
This commit is contained in:
Родитель
8fbec92c35
Коммит
2376f91e05
|
@ -504,10 +504,15 @@ var View = {
|
||||||
// to avoid flicker when resizing.
|
// to avoid flicker when resizing.
|
||||||
await document.l10n.translateFragment(this._fragment);
|
await document.l10n.translateFragment(this._fragment);
|
||||||
|
|
||||||
|
// Pause the DOMLocalization mutation observer, or the already translated
|
||||||
|
// content will be translated a second time at the next tick.
|
||||||
|
document.l10n.pauseObserving();
|
||||||
while (tbody.firstChild) {
|
while (tbody.firstChild) {
|
||||||
tbody.firstChild.remove();
|
tbody.firstChild.remove();
|
||||||
}
|
}
|
||||||
tbody.appendChild(this._fragment);
|
tbody.appendChild(this._fragment);
|
||||||
|
document.l10n.resumeObserving();
|
||||||
|
|
||||||
this._fragment = document.createDocumentFragment();
|
this._fragment = document.createDocumentFragment();
|
||||||
},
|
},
|
||||||
insertAfterRow(row) {
|
insertAfterRow(row) {
|
||||||
|
|
|
@ -410,10 +410,15 @@ var View = {
|
||||||
// to avoid flicker when resizing.
|
// to avoid flicker when resizing.
|
||||||
await document.l10n.translateFragment(this._fragment);
|
await document.l10n.translateFragment(this._fragment);
|
||||||
|
|
||||||
|
// Pause the DOMLocalization mutation observer, or the already translated
|
||||||
|
// content will be translated a second time at the next tick.
|
||||||
|
document.l10n.pauseObserving();
|
||||||
while (tbody.firstChild) {
|
while (tbody.firstChild) {
|
||||||
tbody.firstChild.remove();
|
tbody.firstChild.remove();
|
||||||
}
|
}
|
||||||
tbody.appendChild(this._fragment);
|
tbody.appendChild(this._fragment);
|
||||||
|
document.l10n.resumeObserving();
|
||||||
|
|
||||||
this._fragment = document.createDocumentFragment();
|
this._fragment = document.createDocumentFragment();
|
||||||
},
|
},
|
||||||
insertAfterRow(row) {
|
insertAfterRow(row) {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче