Bug 761884 - Prevent LayoutView from causing infinite painting loops

This commit is contained in:
Matt Woodrow 2012-06-11 16:45:39 +12:00
Родитель d5e281c4cc
Коммит 9376556289
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -294,7 +294,9 @@ 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;
if (this.doc.querySelector("#element-size").textContent != width + "x" + height) {
this.doc.querySelector("#element-size").textContent = width + "x" + height;
}
// If the view is closed, no need to do anything more.
if (!this.isOpen) return;