зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1654408 [wpt PR 24692] - [css-lists] Fix marker not correctly updated in legacy layout, a=testonly
Automatic update from web-platform-tests [css-lists] Fix marker not correctly updated in legacy layout If a list item contains a block box, the layout tree is initially like: LayoutListItem {LI} LayoutBlockFlow (anonymous) LayoutListMarker {::marker} LayoutBlockFlow {P} LayoutText #text However, an outside ::marker should appear in the same line as the first non-marker text of the list item. Therefore, it's changed into: LayoutListItem {LI} LayoutBlockFlow (anonymous) LayoutBlockFlow {P} LayoutListMarker {::marker} LayoutText {#text} But this was not happening when dynamically toggling list-style-type between 'none' and some other value. The reason was that there was a 'NormalChildNeedsLayout()' condition, which would hold the 1st time, but in following layouts it would be false. This patch just removes that condition. Bug: 1107783 TEST=external/wpt/css/css-lists/change-list-style-type-002.html Change-Id: Ic82f1a474b0a0ddf2f2aab8a60afac299aa6e2d1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2310359 Reviewed-by: Koji Ishii <kojii@chromium.org> Commit-Queue: Oriol Brufau <obrufau@igalia.com> Cr-Commit-Position: refs/heads/master@{#791857} -- wpt-commits: 79331ece5c30ca14a3bcc1674d4efe19f0657754 wpt-pr: 24692
This commit is contained in:
Родитель
86f2908129
Коммит
9c70d6f466
|
@ -1,6 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Lists: test the change of list-style-type</title>
|
||||
<link rel="match" href="change-list-style-type-001-ref.html">
|
||||
<link rel=help href="https://www.w3.org/TR/CSS22/generate.html#lists">
|
||||
<link rel=help href="https://bugs.chromium.org/p/chromium/issues/detail?id=966750">
|
||||
<style type="text/css">
|
|
@ -0,0 +1,19 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Lists: test the change of list-style-type</title>
|
||||
<ol>
|
||||
<li>text</li>
|
||||
<li><p>text</p></li>
|
||||
<li>
|
||||
<p>text</p>
|
||||
</li>
|
||||
<li>
|
||||
<p></p>
|
||||
<p>text</p>
|
||||
</li>
|
||||
<li>
|
||||
<div>
|
||||
<p>text</p>
|
||||
</div>
|
||||
</li>
|
||||
</ol>
|
|
@ -0,0 +1,40 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Lists: test the change of list-style-type</title>
|
||||
<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com">
|
||||
<link rel="match" href="change-list-style-type-002-ref.html">
|
||||
<link rel="help" href="https://www.w3.org/TR/CSS22/generate.html#lists">
|
||||
<style>
|
||||
.no-marker li {
|
||||
list-style-type: none;
|
||||
}
|
||||
</style>
|
||||
<ol>
|
||||
<li>text</li>
|
||||
<li><p>text</p></li>
|
||||
<li>
|
||||
<p>text</p>
|
||||
</li>
|
||||
<li>
|
||||
<p></p>
|
||||
<p>text</p>
|
||||
</li>
|
||||
<li>
|
||||
<div>
|
||||
<p>text</p>
|
||||
</div>
|
||||
</li>
|
||||
</ol>
|
||||
<script>
|
||||
// Force layout
|
||||
document.body.offsetHeight;
|
||||
|
||||
// Remove list markers
|
||||
document.body.className = "no-marker";
|
||||
|
||||
// Force layout
|
||||
document.body.offsetHeight;
|
||||
|
||||
// Recover list markers
|
||||
document.body.className = "";
|
||||
</script>
|
Загрузка…
Ссылка в новой задаче