Commit f75a5ea8 authored by cathiechen's avatar cathiechen Committed by Commit Bot

[LayoutNG] Make <LI>'s line-height effective when list-style-type: none

Like legacy layout, in order to match other browsers when list-style-type
is none, pretend there's an invisible marker in <LI>.

Bug: 725277
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: I35d3122f9a99a4262ee41236650ff41aa09ff53d
Reviewed-on: https://chromium-review.googlesource.com/1138044Reviewed-by: default avatarKoji Ishii <kojii@chromium.org>
Commit-Queue: cathie chen <cathiechen@tencent.com>
Cr-Commit-Position: refs/heads/master@{#575526}
parent 2a02c684
......@@ -578,7 +578,6 @@ crbug.com/714962 fast/inline/outline-offset.html [ Failure ]
crbug.com/591099 fast/lists/001-vertical.html [ Failure ]
crbug.com/591099 fast/lists/003-vertical.html [ Failure ]
crbug.com/591099 fast/lists/004.html [ Failure ]
crbug.com/591099 fast/lists/list-item-line-height.html [ Failure ]
crbug.com/860415 fast/multicol/out-of-flow/abspos-auto-position-on-line-rtl.html [ Failure ]
crbug.com/591099 fast/overflow/overflow-update-transform.html [ Failure ]
crbug.com/591099 fast/overflow/recompute-overflow-of-layout-root-container.html [ Failure ]
......
......@@ -188,6 +188,12 @@ void NGInlineLayoutAlgorithm::CreateLine(NGLineInfo* line_info,
NGInlineBoxState* box =
box_states_->OnBeginPlaceItems(&line_style, baseline_type_, quirks_mode_);
// In order to match other browsers when list-style-type: none, pretend
// there's an invisible marker here.
if (line_style.Display() == EDisplay::kListItem &&
line_style.ListStyleType() == EListStyleType::kNone)
box->ComputeTextMetrics(line_style, baseline_type_);
for (NGInlineItemResult& item_result : *line_items) {
DCHECK(item_result.item);
const NGInlineItem& item = *item_result.item;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment