diff --git a/src/display/canvas.js b/src/display/canvas.js index 442b12e9cb0c2..9ad7b7e43a18d 100644 --- a/src/display/canvas.js +++ b/src/display/canvas.js @@ -3342,13 +3342,15 @@ class CanvasGraphics { // #compositeKnockoutSurface so it doesn't become part of the group // source itself. const backdropCtx = group.knockout && !group.isolated ? currentCtx : null; - // Non-isolated non-KO subgroup inside a KO parent: at endGroup we'll - // blend its elements against the outer KO running canvas (also frozen), - // so just record the flag here and read ctx.canvas at composite time. + // Non-isolated non-KO subgroup inside a KO parent, with inner compositing + // of its own: at endGroup we'll blend its elements against the outer KO + // running canvas (also frozen), so just record the flag here and read + // ctx.canvas at composite time. const hasInnerBackdrop = !group.isolated && !group.knockout && !group.smask && + group.needsIsolation && this.#knockoutGroupLevel > 0; // Pool the per-element shape mask for the lifetime of this KO group. diff --git a/test/pdfs/.gitignore b/test/pdfs/.gitignore index f114eb7b9424e..a0c521f326746 100644 --- a/test/pdfs/.gitignore +++ b/test/pdfs/.gitignore @@ -920,3 +920,4 @@ !smask_luminosity_oob_transfer.pdf !operator_list_cycle.pdf !knockout_groups_test.pdf +!issue18032.pdf diff --git a/test/pdfs/issue18032.pdf b/test/pdfs/issue18032.pdf new file mode 100644 index 0000000000000..9457d54ebe0b8 Binary files /dev/null and b/test/pdfs/issue18032.pdf differ diff --git a/test/test_manifest.json b/test/test_manifest.json index ae2828583e001..adc5211c63109 100644 --- a/test/test_manifest.json +++ b/test/test_manifest.json @@ -14252,5 +14252,13 @@ "rounds": 1, "type": "eq", "about": "Knockout groups composite-modes survey." + }, + { + "id": "issue18032", + "file": "pdfs/issue18032.pdf", + "md5": "656234fde97953c4e3fc7698831590a9", + "rounds": 1, + "type": "eq", + "about": "Non-isolated knockout group with a nested non-isolated subgroup over existing text." } ]