зеркало из https://github.com/mozilla/gecko-dev.git
Bug 761884 - LayoutView is causing an infinite loop by making changes within a MozAfterPaint handler. r=dcamp
This commit is contained in:
Родитель
537ea24dd5
Коммит
5353686878
|
@ -294,7 +294,12 @@ LayoutView.prototype = {
|
|||
let clientRect = node.getBoundingClientRect();
|
||||
let width = Math.round(clientRect.width);
|
||||
let height = Math.round(clientRect.height);
|
||||
this.doc.querySelector("#element-size").textContent = width + "x" + height;
|
||||
|
||||
let elt = this.doc.querySelector("#element-size");
|
||||
let newLabel = width + "x" + height;
|
||||
if (elt.textContent != newLabel) {
|
||||
elt.textContent = newLabel;
|
||||
}
|
||||
|
||||
// If the view is closed, no need to do anything more.
|
||||
if (!this.isOpen) return;
|
||||
|
|
Загрузка…
Ссылка в новой задаче