getPageRect -> getPageClientRect , to be more precise what kind of rect that is