[LayoutNG] Avoid CreateShapeResult when `text-overflow: ellipsis`
This patch changes `text-overflow: ellipsis` to create the truncated ShapeResultView from ShapeResultView without creating intermediate ShapeResult, using the mechanism added in r633612 (CL:1477141). This saves memory by not creating actual sub RunInfo. This change also fixes an issue in offset computation in ShapeResultView::ForEachGraphemeClusters. This is discovered by this change because before this change, RunInfoPart always points to the full range of RunInfo. Some utility functions to compute character index are added. I hope they can be better structured to abstract differences between ShapeResult and ShapeResultView, but doing so is deferred to future patches as I understand it better. Bug: 636993 Change-Id: Ib2e501829051ca44f7aaccac4856ffce5618ba23 Reviewed-on: https://chromium-review.googlesource.com/c/1478319 Commit-Queue: Emil A Eklund <eae@chromium.org> Reviewed-by:Emil A Eklund <eae@chromium.org> Cr-Commit-Position: refs/heads/master@{#635758}
Showing
Please register or sign in to comment