B2G/gecko/browser/components/tabview/modules/utils.jsm
// Returns a new <Rect> with the union of this rectangle and the given <Rect>.
Returns a new  with the union of this rectangle and the given .
Returns a new with the union of this rectangle and the given .
function Rect_union(a) {
    var newLeft = Math.min(a.left, this.left);
    var newTop = Math.min(a.top, this.top);
    var newWidth = Math.max(a.right, this.right) - newLeft;
    var newHeight = Math.max(a.bottom, this.bottom) - newTop;
    var newRect = new Rect(newLeft, newTop, newWidth, newHeight);
    return newRect;
  }
function Rect_union ( a ) { var newLeft = Math . min ( a . left , this . left ) ; var newTop = Math . min ( a . top , this . top ) ; var newWidth = Math . max ( a . right , this . right ) - newLeft ; var newHeight = Math . max ( a . bottom , this . bottom ) - newTop ; var newRect = new Rect ( newLeft , newTop , newWidth , newHeight ) ; return newRect ; }
Returns a new <Rect> with the union of this rectangle and the given <Rect>.
Returns a new <Rect > with the union of this rectangle and the given <Rect > .