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.
#7569 changed the Extrude & Bevel and Inflate check so that a filled
shape's solid is built once, about the bounds the effect draws it
about, and stated that a filled shape whose solid builds about those
bounds but not about its profile's own bounds now passes. No test
covered that case.
The new test builds a group of a filled shape of 900 small curves and
a line with a 2000 pt stroke. About the shapes' own bounds, the filled
shape's solid is too complex with a repeated rounded bevel; about the
bounds that take in the stroke, its curves are sampled more coarsely
and it fits. The test asserts the first result, then that the check
passes and the solid draws. It fails when the check builds every
shape's profile about the profiles' bounds again.
With Noto Sans Arabic the fatha's ink reaches past the first letter's
left edge, so that letter's Tsume only narrows its advance and moves no
glyph. The test compared glyph positions alone and found no change.
It now compares each glyph's position and advance.
perspective.attach, perspective.release, perspective.move and
perspective.transform took their `ids` as given, so an id listed twice
was processed twice. Attach warped an object that was already projected
a second time, and a move or transform of an object not yet in
perspective attached it and then moved it twice. The Shift and Snap to
Grid reads of a move also used a document attached twice. The ids are
now taken once each, in the order first given.
A <use> in a clip path that shows a text kept only one clip path when
both carried one: the text's own applied, and the <use>'s was dropped
with the warning "clip path of ... in a clip path ignored: the text's
own applies", so art that the <use>'s clip path should hide showed.
The placeholder for such a text now clips by a clip path that holds
both: the text's clip path in the text's user space and the <use>'s in
the <use>'s, each on a rectangle over the text's bounds so a clip path
in bounding box units still measures the text.
Reverse Path Direction reversed each member path of a compound path and
turned the members' own stroke records, but left the compound path's
strokes as they were. A compound path's strokes run along its members'
subpaths in order, so its width profile and pen pressure, tilt, bearing
and rotation then ran the old way and the stroke drew differently.
reverse_stroke_records now also takes a compound path, reading its
members' subpaths in order, and path.reverse turns each compound path's
strokes with the combined reversal of its members before they reverse.
As for a path, the strokes turn only when every subpath turns alike.
Show Code in the SVG Options dialog that File > Export Selection opens
encoded the whole document at the first artboard, while OK writes the
selected objects alone, cropped to them. The code view now encodes the
same selection document OK writes, without the artboard options, and
encodes it again when the selection changes.
show_hidden_characters_lays_out_only_type_that_changed retries its two
frames when another test changes the fonts or the hyphenation exceptions
between them. Every retry set the same text, which after the first
attempt is no edit, so the object kept its marks and the test failed
with "the edited object is laid out again". Each attempt now sets
different text.
File > Save to the document's own file planned the save with acknowledgeLoss
set, so that only its own path was asked about, and then wrote that plan. With
the acknowledgment in the plan, the files written beside the path (an EPS
saved with Use Artboards writes one per artboard) were not checked against the
file the document was read from. A document opened from one of those artboard
files, with things left out when it was read, was written over by File > Save
without the question. Save As and Save a Copy already plan again without the
acknowledgment before writing; File > Save now does the same.
Follow-up to #6751.