[TextEditor] Use the layout cache in other frequently done operations.