telemetry/telemetry/internal/actions/gesture_common.js
function getBoundingRect(el) {
    const clientRect = el.getBoundingClientRect();
    const bound = {
      left: clientRect.left,
      top: clientRect.top,
      width: clientRect.width,
      height: clientRect.height
    };

    let frame = el.ownerDocument.defaultView.frameElement;
    while (frame) {
      const frameBound = frame.getBoundingClientRect();
      // This computation doesn't account for more complex CSS transforms on the
      // frame (e.g. scaling or rotations).
      bound.left += frameBound.left;
      bound.top += frameBound.top;

      frame = frame.ownerDocument.frameElement;
    }
    return bound;
  }
function getBoundingRect(el) {
    const clientRect = el.getBoundingClientRect();
    const bound = {
      left: clientRect.left,
      top: clientRect.top,
      width: clientRect.width,
      height: clientRect.height
    };

    let frame = el.ownerDocument.defaultView.frameElement;
    while (frame) {
      const frameBound = frame.getBoundingClientRect();
      // This computation doesn't account for more complex CSS transforms on the
      // frame (e.g. scaling or rotations).
      bound.left += frameBound.left;
      bound.top += frameBound.top;

      frame = frame.ownerDocument.frameElement;
    }
    return bound;
  }
function getBoundingRect ( el ) { const clientRect = el . getBoundingClientRect ( ) ; const bound = { left : clientRect . left , top : clientRect . top , width : clientRect . width , height : clientRect . height } ; let frame = el . ownerDocument . defaultView . frameElement ; while ( frame ) { const frameBound = frame . getBoundingClientRect ( ) ; // This computation doesn't account for more complex CSS transforms on the // frame (e.g. scaling or rotations). bound . left += frameBound . left ; bound . top += frameBound . top ; frame = frame . ownerDocument . frameElement ; } return bound ; }
Returns the bounding rectangle wrt to the layout viewport.
Returns the bounding rectangle wrt to the layout viewport .