Bug 624451 Toolkit update to Geometry.jsm r=Mossop a=blocking-fennec

This commit is contained in:
Benjamin Stover 2011-01-25 12:07:45 -08:00
Родитель c52dd973be
Коммит 1910e1023c
1 изменённых файлов: 4 добавлений и 4 удалений

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

@ -299,10 +299,10 @@ 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 ? other.right - this.right : 0));
let offsetY = (this.top < other.top ? other.top - this.top :
(this.bottom > other.bottom ? other.bottom - this.bottom : 0));
let offsetX = (this.left <= other.left ? other.left - this.left :
(this.right > other.right ? other.right - this.right : 0));
let offsetY = (this.top <= other.top ? other.top - this.top :
(this.bottom > other.bottom ? other.bottom - this.bottom : 0));
return this.translate(offsetX, offsetY);
},