M3, #2567: a text run's blend fill in a shadowed pass-through frame blends with the backdrop

This commit is contained in:
hoangquocvietuet committed 2026-11-29 15:56:50 +00:00
1 parent 261d9d3847
commit 1dbea4b552
1 file changed
+3 -2
+3 -2
View File
@@ -1101,13 +1101,14 @@ fn blends_through(doc: &Document, n: &Node, backdrop: bool) -> bool {
})
}
/// Whether one of `n`'s own paints (fills, strokes, a vector region's fills) is in a blend mode
/// of its own.
/// Whether one of `n`'s own paints (fills, strokes, region fills, text and run fills) has a blend mode of its own.
fn paints_blend(n: &Node) -> bool {
let own = |p: &Paint| p.visible && !matches!(p.blend, BlendMode::Normal | BlendMode::PassThrough);
let fills = |f: &Option<Vec<Paint>>| f.as_deref().is_some_and(|f| f.iter().any(own));
n.fills.iter().any(own)
|| n.strokes.iter().any(own)
|| region_painted(n).is_some_and(|net| net.regions.iter().any(|r| r.fills.as_deref().is_some_and(|f| f.iter().any(own))))
|| matches!(&n.kind, NodeKind::Text(t) if fills(&t.style.fills) || t.runs.iter().any(|r| fills(&r.style.fills)))
}
/// Node `n`'s backdrop effects through its backdrop outline `sh`, for its `size` layer at `at` on