scrollRect implementation for html5