зеркало из https://github.com/mozilla/gecko-dev.git
633f202e6d
This is consistent with other HyperTextAccessible methods such as TextAtOffset. It allows us to test the new implementation with LocalAccessible. This is especially useful because we have better test coverage in our HyperText tests than we do in our TextLeafPoint tests. In fact, running the tests with this change uncovered some bugs which I had to fix here. First, TextLeafPoint::ComputeBoundsFromFrame was preferring to stick to the end of the first frame when on a boundary, rather than using the next frame. For example, if we had the text "a\nb" where "b" is split into a continuation, offset 2 "b" was previously using the primary frame instead of the continuation. This isn't a problem in HyperTextAccessible::GetBoundsInFrame because it walks to the next continuation if needed, since it is dealing with a range of offsets. This is fixed by preferring the beginning of the next frame instead. Second, passing the text length as the offset (i.e. one past the last character) should return a 0 rect. TextLeafPoint::CharBounds needed to be tweaked accordingly. Third, if TextLeafPoint returns a 0 rect (e.g. because a RemoteAccessible doesn't have a cache yet), HyperTextAccessibleBase needs to respect that and return it untouched. Differential Revision: https://phabricator.services.mozilla.com/D172533 |
||
---|---|---|
.. | ||
android | ||
aom | ||
atk | ||
base | ||
basetypes | ||
docs | ||
generic | ||
html | ||
interfaces | ||
ipc | ||
mac | ||
other | ||
tests | ||
windows | ||
xpcom | ||
xul | ||
moz.build |