DescriptionHandle exclusive end offsets when translating from flow thread coordinates.
If we're in flipped blocks writing mode (i.e. vertical-rl), the flow thread
block offset we're dealing with may be a logical end point, and end points are
exclusive. This means that we need to pick the previous column, not the next,
if the offset is exactly at a column boundary.
Let flowThreadTranslationAtOffset() and columnIndexAtOffset() take a
PageBoundaryRule argument to handle this.
This makes offsetLeft and offsetTop work properly in vertical-rl writing mode
for elements that end at column boundaries. Added a test for that, and threw in
a vertical-lr test too, for good measure.
Remove ColumnIndexCalculationMode from columnIndexAtOffset(). It was partially
and inaccurately used to make sure we didn't escape the valid column range in
case an exclusive end offset was passed. Have the call sites that really need
to clamp the column index do it themselves. It's up to the callers to decide
how to treat offsets outside the range of columns anyway.
Committed: https://crrev.com/8403c15086b287d0db07c7fe9bcf104d02c99052
Cr-Commit-Position: refs/heads/master@{#418800}
Patch Set 1 #Patch Set 2 : Renamed tests, and fixed typos there. #
Total comments: 2
Patch Set 3 : Documentation #Messages
Total messages: 14 (8 generated)
|