return children.indexOf(positionToElement(offset));
if (children.size() == 0) return 0;  Element element = positionToElement(offset);  if (element == null) return 0;  return children.indexOf(element);
    public int getElementIndex(int offset)    {      return children.indexOf(positionToElement(offset));    }