Commit f1ec7c36 authored by Emil A Eklund's avatar Emil A Eklund Committed by Commit Bot

[LayoutNG] Fix list-item marker logic

Update the list-item marker logic to reflect that list-style-image takes
precedence over list-style-type: none. Also adds a WPT correctness test.

Bug: 976937
Test: wpt/css/css-lists/list-type-none-style-image.html
Change-Id: I2255254f72e58d53671337ccb3f6a285cc515522
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1671896Reviewed-by: default avatarKoji Ishii <kojii@chromium.org>
Commit-Queue: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#671772}
parent d4f41be2
......@@ -132,7 +132,7 @@ void LayoutNGListItem::UpdateMarkerText() {
void LayoutNGListItem::UpdateMarker() {
const ComputedStyle& style = StyleRef();
if (style.ListStyleType() == EListStyleType::kNone) {
if (style.ListStyleType() == EListStyleType::kNone && !IsMarkerImage()) {
DestroyMarker();
marker_type_ = kStatic;
is_marker_text_updated_ = true;
......
<!DOCTYPE html>
<html>
<head>
<title>Reference: CSS Lists: 'list-style-image' takes precedence over 'list-style-type: none'</title>
<link rel="author" title="Emil A Eklund" href="mailto:eae@chromium.org">
<style>
li {
list-style-image: url('../../images/green-16x16.png');
}
</style>
</head>
<body>
<ul>
<li>Should have a green square list marker.</li>
</ul>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>CSS Lists: 'list-style-image' takes precedence over 'list-style-type: none'</title>
<link rel="author" title="Emil A Eklund" href="mailto:eae@chromium.org">
<link rel="help" href="https://www.w3.org/TR/CSS2/generate.html#propdef-list-style-image">
<link rel="match" href="list-type-none-style-image-ref.html">
<style>
ul {
list-style-type: none;
}
li {
list-style-image: url('../../images/green-16x16.png');
}
</style>
</head>
<body>
<ul>
<li>Should have a green square list marker.</li>
</ul>
</body>
</html>
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