fune/testing/web-platform/tests/css/css-pseudo/marker-text-combine-upright-ref.html
Oriol Brufau 4bc4004e52 Bug 1648280 [wpt PR 24329] - [css-pseudo] Fix DCHECK failure with ::marker and text-combine-upright, a=testonly
Automatic update from web-platform-tests
[css-pseudo] Fix DCHECK failure with ::marker and text-combine-upright

The 'text-combine-upright' property is not supported in LayoutNG, so it
forces the element to use legacy layout. However, when used on ::marker,
this could leave the list item using LayoutNG and only force the marker
to legacy. But markers depend on their originating list item, so this
would make some DCHECKs fail.

This patch makes DefinitelyNewFormattingContext always return false for
::marker, even if it's an outside marker with 'display: inline-block'.
This way ForceLegacyLayoutInFormattingContext will also force the list
item to use legacy layout when the marker requires it.

Bug: 457718

TEST=external/wpt/css/css-pseudo/marker-text-combine-upright.html

The test fails because 'text-combine-upright' doesn't seem to work well
on pseudo-elements, but now it doesn't crash.

Change-Id: I7f9f26914af39a9d30dbcff7fcd1ae1308981989
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2264129
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Commit-Queue: Oriol Brufau <obrufau@igalia.com>
Cr-Commit-Position: refs/heads/master@{#782375}

--

wpt-commits: 1156b0155c3ed1b5979437dc89f4669de5c782d2
wpt-pr: 24329
2020-07-03 09:38:23 +00:00

36 lines
820 B
HTML

<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Reference: ::marker supports 'text-combine-upright'</title>
<style>
body {
writing-mode: vertical-lr;
}
ol, ul {
display: flow-root;
list-style-type: none;
}
.symbol {
list-style-type: disc;
}
ul {
list-style-position: inside;
}
ol span {
display: inline-block;
margin-top: -50px;
height: 50px;
text-align: end;
}
span {
text-combine-upright: all;
}
</style>
<ol><li><span>1. </span>outside decimal</li></ol>
<ol><li><span>2. </span>outside string</li></ol>
<ol><li><span>3. </span>outside content</li></ol>
<ol class="symbol"><li>outside symbol</li></ol>
<ul><li><span>1. </span>inside decimal</li></ul>
<ul><li><span>2. </span>inside string</li></ul>
<ul><li><span>3. </span>inside content</li></ul>
<ul class="symbol"><li>inside symbol</li></ul>