B2G/gecko/toolkit/content/tests/fennec-tile-testapp/chrome/content/WidgetStack.js
/**
   * Similar to (and most code stolen from) union().  An extension is a
   * union (in our sense of the term, not the common set-theoretic sense),
   * but this modifies the receiving object instead of returning a new rect.
   * Effectively, this rectangle is expanded minimally to contain all of the
   * other rect.  "Expanded minimally" means that the rect may shrink if
   * given a strict subset rect as the argument.
   */
Similar to (and most code stolen from) union().  An extension is a
union (in our sense of the term, not the common set-theoretic sense),
but this modifies the receiving object instead of returning a new rect.
Effectively, this rectangle is expanded minimally to contain all of the
other rect.  "Expanded minimally" means that the rect may shrink if
given a strict subset rect as the argument.
Similar to ( and most code stolen from ) union () . An extension is a union ( in our sense of the term not the common set - theoretic sense ) but this modifies the receiving object instead of returning a new rect . Effectively this rectangle is expanded minimally to contain all of the other rect . " Expanded minimally " means that the rect may shrink if given a strict subset rect as the argument .
function extendTo(rect) {
    let l = Math.min(this.left, rect.left);
    let r = Math.max(this.right, rect.right);
    let t = Math.min(this.top, rect.top);
    let b = Math.max(this.bottom, rect.bottom);
    return this.setRect(l, t, r-l, b-t);
  }
function extendTo ( rect ) { let l = Math . min ( this . left , rect . left ) ; let r = Math . max ( this . right , rect . right ) ; let t = Math . min ( this . top , rect . top ) ; let b = Math . max ( this . bottom , rect . bottom ) ; return this . setRect ( l , t , r - l , b - t ) ; }
Similar to (and most code stolen from) union().
Similar to ( and most code stolen from ) union () .