Commit 38dddeea authored by cathiechen's avatar cathiechen Committed by Commit Bot

[LayoutNG] Strip the front spaces after LayoutNGMarker

While ComputeInlinePreferredLogicalWidths ignore spaces after
LayoutNGMarker.

Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: I9ced3a959c6f89412c82686ffe2fcee4f141737e
Reviewed-on: https://chromium-review.googlesource.com/1102284
Commit-Queue: cathie chen <cathiechen@tencent.com>
Reviewed-by: default avatarKoji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#568771}
parent c17d6c3a
...@@ -535,7 +535,6 @@ crbug.com/591099 fast/lists/003-vertical.html [ Failure ] ...@@ -535,7 +535,6 @@ crbug.com/591099 fast/lists/003-vertical.html [ Failure ]
crbug.com/591099 fast/lists/003.html [ Failure ] crbug.com/591099 fast/lists/003.html [ Failure ]
crbug.com/591099 fast/lists/004.html [ Failure ] crbug.com/591099 fast/lists/004.html [ Failure ]
crbug.com/591099 fast/lists/009-vertical.html [ Failure ] crbug.com/591099 fast/lists/009-vertical.html [ Failure ]
crbug.com/591099 fast/lists/calc-width-with-space.html [ Failure ]
crbug.com/591099 fast/lists/inline-before-content-after-list-marker.html [ Failure ] crbug.com/591099 fast/lists/inline-before-content-after-list-marker.html [ Failure ]
crbug.com/591099 fast/lists/list-item-line-height.html [ Failure ] crbug.com/591099 fast/lists/list-item-line-height.html [ Failure ]
crbug.com/591099 fast/lists/marker-before-empty-inline.html [ Failure ] crbug.com/591099 fast/lists/marker-before-empty-inline.html [ Failure ]
......
...@@ -1884,7 +1884,7 @@ void LayoutBlockFlow::ComputeInlinePreferredLogicalWidths( ...@@ -1884,7 +1884,7 @@ void LayoutBlockFlow::ComputeInlinePreferredLogicalWidths(
} }
// Ignore spaces after a list marker. // Ignore spaces after a list marker.
if (child->IsListMarker()) if (child->IsListMarkerIncludingNG())
strip_front_spaces = true; strip_front_spaces = true;
} else { } else {
min_logical_width = std::max(min_logical_width, inline_min); min_logical_width = std::max(min_logical_width, inline_min);
......
...@@ -1601,6 +1601,10 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver, ...@@ -1601,6 +1601,10 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver,
return IsListItem() || IsLayoutNGListItem(); return IsListItem() || IsLayoutNGListItem();
} }
bool IsListMarkerIncludingNG() const {
return IsListMarker() || IsLayoutNGListMarker();
}
virtual bool IsCombineText() const { return false; } virtual bool IsCombineText() const { return false; }
virtual int CaretMinOffset() const; virtual int CaretMinOffset() const;
......
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