[LayoutNG] Re-implement 'text-overflow: ellipsis'
This patch re-implements 'text-overflow: ellipsis' in LayoutNG. Before this patch, it was implemented in NGLineBreaker. It helped sharing the code with other line breaking logic, and working in logical coordinate made things simpler. However, some tests fail due to taller fonts/objects in the hidden part, or when out-of-flow/float objects in the line. While these look edge cases, given the high usage of the 'text-overflow' property, this patch fixes them by moving the logic to NGInlineLayoutAlgorithm. The logic is largely independent and that it is moved to a new class, NGLineTruncator. This patch also uses a new ShapeResult::OffsetToFit() function added in CL:1020760 for more accurate truncation. Relative position is not supported yet. And tests for inline-block container still fail, they will be investigated in following patches. Bug: 636993 Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_layout_ng Change-Id: Idb0d80b239d9f53cd6a4878a9378f5bfbc0d24ea Reviewed-on: https://chromium-review.googlesource.com/1013019 Commit-Queue: Koji Ishii <kojii@chromium.org> Reviewed-by:Emil A Eklund <eae@chromium.org> Reviewed-by:
Aleks Totic <atotic@chromium.org> Cr-Commit-Position: refs/heads/master@{#555152}
Showing
13.4 KB
15 KB
14 KB
14.3 KB
11.5 KB
13 KB
11.6 KB
12.5 KB
10.9 KB
39.8 KB
39.8 KB
40.4 KB
40.5 KB
18.5 KB
18.5 KB
12.6 KB
11.3 KB
13.5 KB
13.8 KB
13.5 KB
14.4 KB
18.1 KB
18.2 KB