docs: function (element) {
              if (!element) {
                  return null;
              }
              var document = element.ownerDocument;
  
              if (element === document.body) {
                  var size = this.getFullPageSize();
  
                  return {
                      x : 0,
                      y : 0,
                      width : size.width,
                      height : size.height
                  };
  
              } else {
                  var width, height;
                  var browser = ariaCoreBrowser;
                  if (browser.isChrome || browser.isOpera || browser.isSafari) {
                      var rectTextObject = element.getBoundingClientRect();
                      width = Math.round(rectTextObject.width);
                      height = Math.round(rectTextObject.height);
                  } else {
                      width = element.offsetWidth;
                      height = element.offsetHeight;
                  }
  
                  var position = this.calculatePosition(element);
                  var res = {
                      x : position.left,
                      y : position.top,
                      width : width,
                      height : height
                  };
  
                  // PTR 04606169:
                  // adapt res if one of the parent overflow property prevents parts of the item from being visible
                  var parent = element;
                  // we do not need to go up to html or body element (and it can lead to wrong results
                  // especially in IE7)
                  var documentElement = document.documentElement;
                  var body = document.body;
                  do {
                      var parentPosition = this.getStyle(parent, "position");
                      if (parentPosition == "absolute" || parentPosition == "fixed") {
                          parent = parent.offsetParent;
                      } else {
                          parent = parent.parentNode;
                      }
                      if (!parent || parent == documentElement || parent == body) {
                          return res;
                      }
  
                      // taking client geometry of the parent so that it does not include scrollbars
                      var parentGeometry = this.getClientGeometry(parent);
                      var parentOverflowX = this.getStyle(parent, "overflowX");
                      var parentOverflowY = this.getStyle(parent, "overflowY");
  
                      var delta;
                      if (parentOverflowX != "visible") {
                          delta = parentGeometry.x - res.x;
                          if (delta > 0) {
                              res.x += delta;
                              res.width -= delta;
                              if (res.width < 0) {
                                  return null; // item is not visible
                              }
                          }
                          delta = res.x + res.width - parentGeometry.x - parentGeometry.width;
                          if (delta > 0) {
                              res.width -= delta;
                              if (res.width < 0) {
                                  return null; // item is not visible
                              }
                          }
                      }
                      if (parentOverflowY != "visible") {
                          delta = parentGeometry.y - res.y;
                          if (delta > 0) {
                              res.y += delta;
                              res.height -= delta;
                              if (res.height < 0) {
                                  return null; // item is not visible
                              }
                          }
                          delta = res.y + res.height - parentGeometry.y - parentGeometry.height;
                          if (delta > 0) {
                              res.height -= delta;
                              if (res.height < 0) {
                                  return null; // item is not visible
                              }
                          }
                      }
                  } while (true);
              }
          }