[LayoutNG] Implement line height from font metrics when elements wraps

Desktop / Chromium - Koji Ishii [chromium.org] - 17 July 2017 12:37 EDT

When elements wraps, 'line-height: normal' should take used fonts of each line into account, but it was talking used fonts of the element instead. This patch implements this case using the ShapeResult from ShapingLineBreaker.

This patch also fixes a case where ShapeResult was not set.

BUG=636993 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_layout_ng

Change-Id: Idf11e7b4676ec0639aa3ffa94890619502064070 Reviewed-on: https://chromium-review.googlesource.com/572603

eb0fe17 [LayoutNG] Implement line height from font metrics when elements wraps
.../Source/core/layout/ng/inline/ng_inline_box_state.cc | 6 ++----
.../Source/core/layout/ng/inline/ng_inline_box_state.h | 6 ++----
.../WebKit/Source/core/layout/ng/inline/ng_inline_item.cc | 12 ------------
.../WebKit/Source/core/layout/ng/inline/ng_inline_item.h | 4 ----
.../core/layout/ng/inline/ng_inline_layout_algorithm.cc | 14 +++++++++-----
.../WebKit/Source/core/layout/ng/inline/ng_line_breaker.cc | 2 +-
6 files changed, 14 insertions(+), 30 deletions(-)

Upstream: git.chromium.org


  • Share