Cause of the CI failures on 212090fd7a:
- main's dialogs::new_document test a_presets_rows_reach_the_document_create_makes
sets artboardLayout.rows to 3.6 and expects 4, but this branch refused a
rows value that was not a whole number. rows now rounds like columns and is
still refused outside 1 to 1000.
- script_host_vs_scriptcheck listed Document.prototype.pathItems=, the
setter of main's placeholder. This branch makes pathItems a read-only
collection, like pageItems, so the row goes.
- PathPoint.remove() renumbers the direct-selected anchors and segments
after the removed point, and drops the removed anchor and the selected
segments it ended, through selection commands after the points are
written. A removed anchor no longer stays selected, and the same index
no longer selects a different point.
- pathItems.add() reads new art's paint after the target document is
active, so a path added to a document in the back keeps the stroke
that document's selection gives new art.
- Paths a script draws put new art's paint back afterwards, so a
defaultStrokeWidth the script set applies to every path it draws, not
only the first.
- appearance.setNewArt refuses a fill or stroke paint with a setting a
paint does not take, such as opacity, instead of applying the rest.
Cause of the script_dom and script_dom_paths failures: main's 9872e6b679
("page items report their own members, and lists start with the topmost
object") made pageItems, pathItems and the selection list art topmost first.
The branch's tests still indexed the objects bottom first, so pageItems[1]
and pathItems[0] named the other object. The tests now make the objects in
the order the lists read them, and index them topmost first.
The own-members test asked about rotate, which this branch makes available,
so it now asks about transform, which is not available yet.
The fallback test for addDocument relied on five 1,000,000 pt artboards not
fitting, but a new DocumentPreset puts them in one column. It now unsets the
layout so the built-in preset puts them in one row, and the test fails when
addDocument falls back to the saved preset of the same name.
PathItem handles carry the document's revert count, as page item
handles on main do, so path members find their path again.
setEntirePath and the path point setters throw a RangeError for a point
off the canvas. Opening a path whose closing segment is selected keeps
the edit. pathItems.add() leaves new art's paint as it was with New Art
Has Basic Appearance off. addDocument reports settings the built-in
preset refuses. appearance.setNewArt refuses a swatch that is not a
name. Writing one path's points looks only at that path afterwards.
The Libraries panel accepted a swatch row dragged before File › Revert and added the restored swatch of that name. Membership::grabbed now refuses stale rows, for the hover marker and on release.
The Set Corners dialog did not bind its values to the host fields that
the preview reads, so after typing a radius of 7 and a lower angle of
120 the host fields still held 10 and 0. The dialog now binds its
values with Bind::bound(fields), as the Arrange dialogs do.
A script without includes whose declarations give names values the analysis
does not read came back from its first scan with `Known::unsure` set and no
names. `settle` counted that as something known and scanned the script again,
which found the same and doubled the scan's steps. The proptest
`any_bytes_are_checked_in_linear_work` shrank one such input to 104 bytes that
took 550 steps, over its bound of 536.
`settle` now keeps the first scan when it found no bound names and no File
objects: the flag comes from the script's own declarations, which the first
scan already read.
A script whose only finding about its variables was that a name in
brackets is not one literal (o[k]) was scanned a second time. That
finding comes from the names the script declares, which the first scan
has already read, so the second scan gave the same report and added up
to three steps a byte. A 104-byte input of single-character tokens took
550 steps against the 536 the property test allows.
The check now repeats a scan only when a variable holds a member chain
or a File or Folder object. The property tests take their bound from
the number of scans: five steps a byte for a script scanned once, and
seventeen for one scanned up to five times.
The All and Range radios under the artboard check box of the .ai,
VectorCraft and EPS save options, and EPS's Transparent and Opaque
radios, were radio rows with an empty name, which the form draws as an
empty caption: a blank band about one row tall above the radios. Both
rows now use stacked options, so the radios follow the row above them.
The Transparent/Opaque row carries the option's label as the group's
accessible name.
A sliver at 0% opacity, or inside a group or layer at 0% opacity, paints
nothing, so Clean Up and Select > Object > Hairline Slivers now skip it.
The params text and docs/mcp.md say so, and docs/mcp.md also names what a
group or compound path used as a clipping path holds among the objects
both commands leave.
The menus' state key took the pass number of a frame with a click or a
key press, and no number on other frames. The key therefore changed on
the frame after a press and again on the frame after that, and each
change built every row's state again: two rebuilds for one key press.
The key now keeps the pass of the last frame with a pointer button
pressed or released or a key pressed, so each of them changes it once.
A pointer release counts because a click ends there.
Test: menus::tests::a_key_press_rebuilds_the_menus_once counts the
rebuilds over a key press and the four frames after it: 1, and 2
without the change.