The bar caret width is picked in the editable's local CSS px and then
painted through the element's transform chain. A
transform: scale(0.1) therefore shrinks the caret to a tenth of
a device pixel -- it washes out to nothing -- and scale(10)
paints it ten device pixels wide, fat enough to cover the next glyph.
Reported in 2024, reproducible since M116.
The CL rescales the caret rect by the inverse of the accumulated
transform scale between the painter block and the LayoutView, so the caret
keeps its size in viewport space. Only the bar caret is touched, and only
when the scale is finite, positive and not 1. Behind the default-on
CaretWidthIgnoresTransform kill switch.
SVG text is left alone: it scales its contents with a factor of its own
on top of the transform chain and the caret is laid out in those scaled
units already, so compensating there produced a barely visible, partially
covered caret -- caught by svg/text/text-layout-crash.html on
the bots.
The remark on the issue was that this is hard because the transform is
not known when the caret is painted. It is known one step earlier: the caret
rect is computed in
CaretDisplayItemClient::ComputeCaretRectAndPainterBlock(),
where LocalToAncestorTransform() is available, and that runs
again whenever style or layout changes.
*Caret* blink unit tests pass.svg, editing/caret and
fast/forms: 4489 tests as expected; CQ dry run green across
43 builders.