[LayoutNG] Fix NGInlineNode::ComputeMinMaxSize when hyphenated
This patch changes NGInlineNode::ComputeMinMaxSize to use NGLineInfo::Width() instead of accumulating the list of NGInlineItemResult. This fixes min-/max-content size to include the width of hyphens. During the fix, an uninitialized variable was found when NGLineInfo was re-used across different NextLine(). Re-using NGLineInfo isn't much gain, this was prohibited to avoid rare code path. Also a few DCHECK were added to ensure accumulated with is in sync. A test for min-content of hyphened line was added. There are two tests, but both use table to compute it, and that they may fail to test if table sizing is broken. The new test uses 'min-content' directly. Bug: 636993 Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng Change-Id: Ibc7a3a2dcbf6a70a06bc974eb69dd47b23ad72fe Reviewed-on: https://chromium-review.googlesource.com/1111895 Commit-Queue: Koji Ishii <kojii@chromium.org> Reviewed-by:Christian Biesinger <cbiesinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#569954}
Showing
Please register or sign in to comment