/**
  * Update the current topmost backstack item, based on the currently displayed page. (Things like
  * the last y-offset position should be updated here) Should be done right before loading a new
  * page.
  */
 @Override
 public void updateCurrentBackStackItem() {
   if (backStack.isEmpty()) {
     return;
   }
   PageBackStackItem item = backStack.get(backStack.size() - 1);
   item.setScrollY(webView.getScrollY());
 }