mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-15 07:10:13 +00:00
The measurement that runs before the style cascade and usvg now covers the inputs that still got past it: - usvg matches a selector without keeping what it found, so one whose leftmost part matches nothing tests every set of ancestors in turn. The measurement counts those tests for each copy and stops at 50,000,000; past that the SVG is refused with "the SVG's style sheets take too long to match". An SVG image's matching stops at what the SVG showing it left. - A test counts one more for every 16 attributes a lookup scans and every 16 bytes of the value it compares, so many classes against a long class list count the work they do, in usvg's matching and in the import's own cascade. - The declarations the import's own cascade keeps, once per element, count toward the 64 MB, including those of `:not()` rules, which usvg drops. Each `:not()` alternative counts as a test. - A linked SVG file is measured before its cascade runs. The linked SVG files share one measurement: once they pass the limits together, the files after that are shown without their links. The tests a file past the limits made still count. - SVG images share the element limit and the selector tests with the SVG showing them, as they already shared the 64 MB. The svg_filters reader measures its SVG before the cascade too.