forked from mirrors/gecko-dev
Automatic update from web-platform-tests
Beware of list item markers inside ::first-letter.
It pretty obvious to me that it's not okay to end up in this situation,
but since it's about legacy code, attempting to fix it properly is
probably asking for more trouble.
See the test included. What happens here is that we get legacy fallback
on everything because of the 'columns' declaration. MathML will fall
back to legacy layout too (as of CL:3461697), which means that we will
pretend that the elements aren't MathML elements (as best as we can,
that is).
The parser seems to do something special for MathML (legacy fallback or
not), in that the FORM child becomes a MathMLRowElement (just like the
MATH parent). ComputedStyle::BlockifiesChildren() returns true for the
FORM element (because math?), so that the ::first-letter container
object becomes a block (instead of LayoutInline).
So far so good-ish, actually, but then it's the legacy list item marker
code that pushes the list item marker down the tree, and it ends up
inside the ::first-letter container.
LayoutListItem math id="id160" style="display:list-item;"
LayoutBlockFlow (anonymous)
LayoutBlockFlow form
LayoutBlockFlow ::first-letter
* LayoutListMarker ::marker
LayoutTextFragment (anonymous) "? f"
LayoutBlockFlow (anonymous)
LayoutTextFragment "? " #text "\n f\n "
LayoutBlockFlow (anonymous)
LayoutInline SPAN style="columns:10;"
LayoutText #text "\n"
Bug: 1299142
Change-Id: I3469a3e611570803e2f9d76ec8d14d9edfcedcfc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3477076
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Commit-Queue: Morten Stenshorne <mstensho@chromium.org>
Cr-Commit-Position: refs/heads/main@{#973659}
--
wpt-commits: e5602a7467bfbbe19d4c19e3e4100e1a3628a1c9
wpt-pr: 32928
21 lines
532 B
HTML
21 lines
532 B
HTML
<!DOCTYPE html>
|
|
<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
|
|
<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1299142">
|
|
<style>
|
|
#id160::first-letter{
|
|
color:blue;
|
|
}
|
|
</style>
|
|
<div style="columns:10;">
|
|
<div style="display:flex;"></div>
|
|
<div style="display:grid;"></div>
|
|
<div style="display:table;"></div>
|
|
<math id="id160" style="display:list-item;">
|
|
<form>
|
|
f
|
|
</form>
|
|
</math>
|
|
</div>
|
|
<script>
|
|
document.execCommand("SelectAll");
|
|
</script>
|