Chris Bracken cc9990f124 Store selection base/extent as integers (flutter/engine#21663)
Previously, the selection base and extent were stored internally as
iterators over text_. Since iterators must be treated as invalidated
whenever the underlying container changes, this requires that
selection_base_ and selection_extent_ be re-assigned after every change
to text_.

This is not currently particularly problematic, but once we add fields
to track the base and extent of the composing region for multi-step
input method support, as well as support for the sub-range within the
composing region to which edits/completions apply, we end up having to
regenerate a lot of iterators with each change, many of which are
logically unchanged in position.

A side benefit is that this simplifies inspection of these fields when
debugging.
2020-10-07 18:31:17 -07:00
..