Recompute affinity if parent equivalent position is ambiguous.
If a line break is introduced implicitly, i.e. because there is one block layout node next to the other, there would be two leaf positions: One is at the end of the first layout node at the end of the line and the other at the beginning of the second block node at the start of the next line. Both positions will have a downstream affinity, because there is no ambiguity as to which position is at the end vs. the start of the line. However, when computing the parent equivalent position, and since there is no line break in the text of the parent, affinity will need to be computed on the browser side. Also, I made some fixes which maintain predictability as to which affinity will be assigned to computed positions, regardless of the input position. R=dmazzoni@chromium.org Bug: 831179 Change-Id: I425223bee1f53654ddaaa045a375c6da0367b7a8 Tested: Unit tests Reviewed-on: https://chromium-review.googlesource.com/1028181Reviewed-by:Dominic Mazzoni <dmazzoni@chromium.org> Commit-Queue: Nektarios Paisios <nektar@chromium.org> Cr-Commit-Position: refs/heads/master@{#553794}
Showing
Please register or sign in to comment