зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1606724 [wpt PR 21011] - [css-pseudo] Move all ::marker style adjustments into StyleAdjuster, a=testonly
Automatic update from web-platform-tests [css-pseudo] Move all ::marker style adjustments into StyleAdjuster LayoutNGListItem was applying some style adjustments to markers, like 'white-space: pre' to preserve trailing spaces in outside markers. But this was only affecting markers with 'content: normal', and the changes weren't exposed in getComputedStyle(). This patch moves these adjustments into StyleAdjuster, so that all markers are affected equally. BUG=457718 TEST=external/wpt/css/css-pseudo/marker-content-018.html The test fails in legacy because the 'content' property is not supported yet in ::marker. There is a new failure in marker-supported-properties.html because now 'white-space' will compute to 'pre' in outside markers, even if you specify a different value. But normal markers were already enforcing 'pre' at used value time anyways. Change-Id: I6d8b8ec7fb26cb04402032924f87b2c3b8fdb9cd Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1985966 Reviewed-by: Rune Lillesveen <futhark@chromium.org> Commit-Queue: Oriol Brufau <obrufau@igalia.com> Cr-Commit-Position: refs/heads/master@{#728176} -- wpt-commits: a3111814fa0e9de6e2decd443d170a6e88304164 wpt-pr: 21011
This commit is contained in:
Родитель
16a3e619b8
Коммит
7808b4533f
|
@ -0,0 +1,61 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Reference: ::marker pseudo elements styled with 'content' property</title>
|
||||
<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com">
|
||||
<style>
|
||||
ol {
|
||||
float: left;
|
||||
width: 100px;
|
||||
}
|
||||
.inside {
|
||||
list-style-position: inside;
|
||||
}
|
||||
li:nth-child(1) { list-style-type: "1" }
|
||||
li:nth-child(2) { list-style-type: "1 " }
|
||||
li:nth-child(3) { list-style-type: "1 " }
|
||||
li:nth-child(4) { list-style-type: " 1" }
|
||||
li:nth-child(5) { list-style-type: " 1" }
|
||||
li:nth-child(6) { list-style-type: " 1 " }
|
||||
li:nth-child(7) { list-style-type: "1\9 2" }
|
||||
li:nth-child(8) { list-style-type: "1\a 2" }
|
||||
</style>
|
||||
<ol class="inside">
|
||||
<li>item</li>
|
||||
<li>item</li>
|
||||
<li>item</li>
|
||||
<li>item</li>
|
||||
<li>item</li>
|
||||
<li>item</li>
|
||||
<li>item</li>
|
||||
<li>item</li>
|
||||
</ol>
|
||||
<ol class="inside">
|
||||
<li> item</li>
|
||||
<li> item</li>
|
||||
<li> item</li>
|
||||
<li> item</li>
|
||||
<li> item</li>
|
||||
<li> item</li>
|
||||
<li> item</li>
|
||||
<li> item</li>
|
||||
</ol>
|
||||
<ol class="outside">
|
||||
<li>item</li>
|
||||
<li>item</li>
|
||||
<li>item</li>
|
||||
<li>item</li>
|
||||
<li>item</li>
|
||||
<li>item</li>
|
||||
<li>item</li>
|
||||
<li>item</li>
|
||||
</ol>
|
||||
<ol class="outside">
|
||||
<li> item</li>
|
||||
<li> item</li>
|
||||
<li> item</li>
|
||||
<li> item</li>
|
||||
<li> item</li>
|
||||
<li> item</li>
|
||||
<li> item</li>
|
||||
<li> item</li>
|
||||
</ol>
|
|
@ -0,0 +1,65 @@
|
|||
<!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-018-ref.html">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-pseudo-4/#marker-pseudo">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-rules">
|
||||
<meta name="assert" content="Checks that the 'content' property of a ::marker doesn't affect white space.">
|
||||
<style>
|
||||
ol {
|
||||
float: left;
|
||||
width: 100px;
|
||||
}
|
||||
.inside {
|
||||
list-style-position: inside;
|
||||
}
|
||||
li:nth-child(1)::marker { content: "1" }
|
||||
li:nth-child(2)::marker { content: "1 " }
|
||||
li:nth-child(3)::marker { content: "1 " }
|
||||
li:nth-child(4)::marker { content: " 1" }
|
||||
li:nth-child(5)::marker { content: " 1" }
|
||||
li:nth-child(6)::marker { content: " 1 " }
|
||||
li:nth-child(7)::marker { content: "1\9 2" }
|
||||
li:nth-child(8)::marker { content: "1\a 2" }
|
||||
</style>
|
||||
<ol class="inside">
|
||||
<li>item</li>
|
||||
<li>item</li>
|
||||
<li>item</li>
|
||||
<li>item</li>
|
||||
<li>item</li>
|
||||
<li>item</li>
|
||||
<li>item</li>
|
||||
<li>item</li>
|
||||
</ol>
|
||||
<ol class="inside">
|
||||
<li> item</li>
|
||||
<li> item</li>
|
||||
<li> item</li>
|
||||
<li> item</li>
|
||||
<li> item</li>
|
||||
<li> item</li>
|
||||
<li> item</li>
|
||||
<li> item</li>
|
||||
</ol>
|
||||
<ol class="outside">
|
||||
<li>item</li>
|
||||
<li>item</li>
|
||||
<li>item</li>
|
||||
<li>item</li>
|
||||
<li>item</li>
|
||||
<li>item</li>
|
||||
<li>item</li>
|
||||
<li>item</li>
|
||||
</ol>
|
||||
<ol class="outside">
|
||||
<li> item</li>
|
||||
<li> item</li>
|
||||
<li> item</li>
|
||||
<li> item</li>
|
||||
<li> item</li>
|
||||
<li> item</li>
|
||||
<li> item</li>
|
||||
<li> item</li>
|
||||
</ol>
|
Загрузка…
Ссылка в новой задаче