bug 537660 - fennec takes too long to respond to zoom command r=mfinkle,stechz,froystig

This commit is contained in:
Brad Lassey 2010-01-11 15:43:47 -05:00
parent ed92cc59c1
commit 232304800e

View File

@ -186,6 +186,7 @@ let Elements = {};
["contentShowing", "bcast_contentShowing"],
["stack", "stack"],
["panelUI", "panel-container"],
["viewBuffer", "view-buffer"],
].forEach(function (elementGlobal) {
let [name, id] = elementGlobal;
Elements.__defineGetter__(name, function () {
@ -456,9 +457,9 @@ Rect.prototype = {
/** Ensure this rectangle is inside the other, if possible. Preserves w, h. */
translateInside: function translateInside(other) {
let offsetX = (this.left < other.left ? other.left - this.left :
(this.right > other.right ? this.right - other.right : 0));
(this.right > other.right ? other.right - this.right : 0));
let offsetY = (this.top < other.top ? other.top - this.top :
(this.bottom > other.bottom ? this.bottom - other.bottom : 0));
(this.bottom > other.bottom ? other.bottom - this.bottom : 0));
return this.translate(offsetX, offsetY);
},