code: function (evt) {
          // olMochWin is to override window, used for testing
          var win = window.olMockWin || window,
              winPageX = win.pageXOffset,
              winPageY = win.pageYOffset,
              x = evt.clientX,
              y = evt.clientY;
          
          if (evt.pageY === 0 && Math.floor(y) > Math.floor(evt.pageY) ||
              evt.pageX === 0 && Math.floor(x) > Math.floor(evt.pageX)) {
              // iOS4 include scroll offset in clientX/Y
              x = x - winPageX;
              y = y - winPageY;
          } else if (y < (evt.pageY - winPageY) || x < (evt.pageX - winPageX) ) {
              // Some Android browsers have totally bogus values for clientX/Y
              // when scrolling/zooming a page
              x = evt.pageX - winPageX;
              y = evt.pageY - winPageY;
          }
          
          evt.olClientX = x;
          evt.olClientY = y;
          
          return {
              clientX: x,
              clientY: y
          };
      }
docs: Method: getTouchClientXY
  WebKit has a few bugs for clientX/clientY. This method detects them
  and calculate the correct values.
  
  Parameters:
  evt - {Touch} a Touch object from a TouchEvent
  
  Returns:
  {Object} An object with only clientX and clientY properties with the
  calculated values.