forked from mirrors/gecko-dev
Automatic update from web-platform-tests [css-pseudo] Let 'content' ::markers be forced to be inside Even if a list item has 'list-style-position: outside', Chromium may force its marker to be inside when it's a <li> outside a list element. This information was stored in layout, but this created an undesirable dependency since the computed 'display' value of the marker depends on whether it's inside or outside. And it wasn't possible to force a marker with non-normal 'content' to be inside. This patch fixes it by adding an internal 'IsInsideListElement' flag in ComputedStyle. This design also avoids traversing all the ancestors of every <li> element. BUG=457718 TEST=external/wpt/css/css-pseudo/marker-content-015.html The test fails in legacy since 'content' is not supported yet. Change-Id: I2df70841e8e9d729fd4aa47ec9b9973c09a82dcb Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1973914 Reviewed-by: Rune Lillesveen <futhark@chromium.org> Commit-Queue: Oriol Brufau <obrufau@igalia.com> Cr-Commit-Position: refs/heads/master@{#726310} -- wpt-commits: f61f56f084c397f6d46ffd18723300a124d12ea5 wpt-pr: 20837
29 lines
931 B
HTML
29 lines
931 B
HTML
<!DOCTYPE html>
|
|
<meta charset="utf-8">
|
|
<title>CSS Test: ::marker pseudo elements styled with 'content' property</title>
|
|
<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com">
|
|
<link rel="match" href="marker-content-015-ref.html">
|
|
<link rel="help" href="https://drafts.csswg.org/css-pseudo-4/#marker-pseudo">
|
|
<meta name="assert" content="Checks that the position of a ::marker originated by a <li> which is not in a list is not affected by the 'content' property.">
|
|
<style>
|
|
li {
|
|
margin-left: 100px;
|
|
}
|
|
.outside {
|
|
list-style-position: outside;
|
|
}
|
|
.inside {
|
|
list-style-position: inside;
|
|
}
|
|
.decimal {
|
|
list-style-type: decimal;
|
|
}
|
|
.marker::marker {
|
|
content: "[marker]";
|
|
}
|
|
</style>
|
|
<!-- Note: Chromium and WebKit force all these markers to be inside -->
|
|
<li class="outside decimal">outside</li>
|
|
<li class="outside marker">outside</li>
|
|
<li class="inside decimal">inside</li>
|
|
<li class="inside marker">inside</li>
|