function doesTransformLeakFixed() {

    if (!transform) {
      return true;
    }

    var elems = [0, 1].map(function (elem, isInner) {
      elem = doc.createElement('div');
      setStyles(elem, {
        position: isInner ? 'fixed' : 'absolute',
        display: 'block',
        visibility: 'hidden',
        left: isInner ? '0px' : '1px',
        transform: 'none'
      });
      return elem;
    });
    var outer = body.appendChild(elems[0]);
    var inner = outer.appendChild(elems[1]);
    var left = inner.getBoundingClientRect().left;
    setStyles(outer, {transform: 'scale(1)'});
    var isLeaking = left === inner.getBoundingClientRect().left;
    body.removeChild(outer);

    return isLeaking;

  }
/**
   * Detects if transformed elements leak fixed elements. According W3C
   * transform rendering spec a transformed element should contain even fixed
   * elements. Meaning that fixed elements are positioned relative to the
   * closest transformed ancestor element instead of window. However, not every
   * browser follows the spec (IE and older Firefox). So we need to test it.
   * https://www.w3.org/TR/css3-2d-transforms/#transform-rendering
   *
   * Borrowed from Mezr (v0.6.1):
   * https://github.com/niklasramo/mezr/blob/0.6.1/mezr.js#L607
   *
   * @private
   * @returns {Boolean}
   *   - Returns true if transformed elements leak fixed elements, false
   *     otherwise.
   */
Detects if transformed elements leak fixed elements. According W3C
transform rendering spec a transformed element should contain even fixed
elements. Meaning that fixed elements are positioned relative to the
closest transformed ancestor element instead of window. However, not every
browser follows the spec . So we need to test it.



@private
@returns {Boolean}
- Returns true if transformed elements leak fixed elements, false
otherwise.
Detects if transformed elements leak fixed elements . According W3C transform rendering spec a transformed element should contain even fixed elements . Meaning that fixed elements are positioned relative to the closest transformed ancestor element instead of window . However not every browser follows the spec . So we need to test it . @private @returns { Boolean } - Returns true if transformed elements leak fixed elements false otherwise .
function doesTransformLeakFixed() {
    if (!transform) {
      return true;
    }
    var elems = [0, 1].map(function (elem, isInner) {
      elem = doc.createElement('div');
      setStyles(elem, {
        position: isInner ? 'fixed' : 'absolute',
        display: 'block',
        visibility: 'hidden',
        left: isInner ? '0px' : '1px',
        transform: 'none'
      });
      return elem;
    });
    var outer = body.appendChild(elems[0]);
    var inner = outer.appendChild(elems[1]);
    var left = inner.getBoundingClientRect().left;
    setStyles(outer, {transform: 'scale(1)'});
    var isLeaking = left === inner.getBoundingClientRect().left;
    body.removeChild(outer);
    return isLeaking;
  }
function doesTransformLeakFixed ( ) { if ( ! transform ) { return true ; } var elems = [ 0 , 1 ] . map ( function ( elem , isInner ) { elem = doc . createElement ( 'div' ) ; setStyles ( elem , { position : isInner ? 'fixed' : 'absolute' , display : 'block' , visibility : 'hidden' , left : isInner ? '0px' : '1px' , transform : 'none' } ) ; return elem ; } ) ; var outer = body . appendChild ( elems [ 0 ] ) ; var inner = outer . appendChild ( elems [ 1 ] ) ; var left = inner . getBoundingClientRect ( ) . left ; setStyles ( outer , { transform : 'scale(1)' } ) ; var isLeaking = left === inner . getBoundingClientRect ( ) . left ; body . removeChild ( outer ) ; return isLeaking ; }
Detects if transformed elements leak fixed elements.
Detects if transformed elements leak fixed elements .