Files
shinyobjectz 3892ac4367 background-clip: text clips a background to the element's text, as Chrome does (closes #37). Gradient text, a common headline style, came out as a gradient box with the text invisible. Two gaps: the vendored stylo knew the text value only for Gecko, so in Servo mode the declaration didn't parse (and #34's note didn't list it: stylo doesn't report a drop of a property the block already set, here through its background shorthand), and blitz-paint had no text clip. Now stylo takes text for Servo too, and blitz-paint draws a background with a text clip in a group that the text then masks (Compose::DestIn). The mask is the element's own inline layout plus the text of every element inside it, at its place (draw_text_mask: glyphs opaque, without their shadows). A scroller's offset isn't applied inside the mask.
Test: bench/background-clip-text/check.sh draws "Gradient" three ways: with background-clip, with -webkit-background-clip alone, and through a block inside the clipped one. The G's stem must be the gradient's pink, and the box beside and above each word must be the page's #111, as Chrome 148 gives them. Before: 6 of 10 pixels failed (the gradient box). After: PASS. TSX's backgroundClip and WebkitBackgroundClip, and an inline <span> inside, also match Chrome by eye.

fps, the same 300-frame page with three clipped lines, before (17:54 build) and after, back to back in three rounds: 493/542/533 vs 518/599/489 fps incl. encode, no cost beyond the noise.
2026-11-07 18:28:19 -08:00
..
2026-10-31 13:15:29 -07:00
2026-10-31 13:15:29 -07:00
2026-10-31 13:15:29 -07:00
2026-10-31 13:15:29 -07:00
2026-10-31 13:15:29 -07:00
2026-10-31 13:15:29 -07:00
2026-10-31 13:15:29 -07:00
2026-10-31 13:15:29 -07:00
2026-10-31 13:15:29 -07:00
2026-10-31 13:15:29 -07:00
2026-10-31 13:15:29 -07:00
2026-10-31 13:15:29 -07:00
2026-10-31 13:15:29 -07:00
2026-10-31 13:15:29 -07:00
2026-10-31 13:15:29 -07:00
2026-10-31 13:15:29 -07:00
2026-10-31 13:15:29 -07:00
2026-10-31 13:15:29 -07:00
2026-10-31 13:15:29 -07:00
2026-10-31 13:15:29 -07:00
2026-10-31 13:15:29 -07:00
2026-10-31 13:15:29 -07:00
2026-10-31 13:15:29 -07:00
2026-10-31 13:15:29 -07:00
2026-10-31 13:15:29 -07:00
2026-10-31 13:15:29 -07:00
2026-10-31 13:15:29 -07:00
2026-10-31 13:15:29 -07:00
2026-10-31 13:15:29 -07:00
2026-10-31 13:15:29 -07:00
2026-10-31 13:15:29 -07:00
2026-10-31 13:15:29 -07:00
2026-10-31 13:15:29 -07:00
2026-10-31 13:15:29 -07:00
2026-10-31 13:15:29 -07:00
2026-10-31 13:15:29 -07:00
2026-10-31 13:15:29 -07:00
2026-10-31 13:15:29 -07:00
2026-10-31 13:15:29 -07:00
2026-10-31 13:15:29 -07:00
2026-10-31 13:15:29 -07:00