fix(anatomy): V1-2.2 refuse a root visibility that hides the markers
Both composers append the marker layer as the root's last child, so a root visibility="hidden" whose children set visible back drew the drawing without a marker (0 marker pixels in Chromium and Firefox, PDF and canvas). The reader refuses any root visibility but visible (root_visibility); cleaning, verdict, preview, PDF gate and both composers answer it.
This commit is contained in:
1 parent
81f7639c75
commit
d8562f60f5
14 files changed
+509
-169
No files matched your search
@@ -171,6 +171,12 @@ describe('clean_svg through the shipped module', () => {
|
||||
const reserved = new TextEncoder().encode(`<svg xmlns="http://www.w3.org/2000/svg"><filter id="${id}"/></svg>`)
|
||||
expect(value(glue.clean_svg(reserved)).reason, id).toBe('reserved_id')
|
||||
}
|
||||
for (const visibility of ['hidden', 'COLLAPSE', 'inherit']) {
|
||||
const hiding = new TextEncoder().encode(
|
||||
`<svg xmlns="http://www.w3.org/2000/svg" visibility="${visibility}"><g visibility="visible"><path d="M0 0h1"/></g></svg>`,
|
||||
)
|
||||
expect(value(glue.clean_svg(hiding)).reason, visibility).toBe('root_visibility')
|
||||
}
|
||||
const cairo = value(
|
||||
glue.clean_svg(new Uint8Array(readFileSync(path(`${EXPORTS}cairo-1.18.4-pycairo-1.27.0-shapes.svg`)))),
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user