- Layer.zOrderPosition reads the sibling list through the cached layer
lists, so reading it for every layer of a loop lists the layers once.
Each read is still charged for the search through the list.
- TextFrames.removeAll releases the mask of a group or layer whose
clipping path is one of the type objects it deletes, as
PageItems.removeAll and remove() do, so the object above the type is
not made the clipping path.
- GroupItems.createFromFile checks that its collection is still there
first, so a collection whose group was deleted throws "Stale page item"
instead of the not-available message. docs/mcp.md says so.
The one-column Tools rail stacked Search above Edit Toolbar in its
footer. The extra row made the default rail taller than a 1000 pt
window holds, so the rail scrolled and Edit Toolbar was out of view.
A one-column rail now shows Edit Toolbar alone. Search Commands stays
in the title bar, Help > Search Commands... and its shortcut. The
two-column rail keeps Search beside Edit Toolbar.
Tests: one_column_rail_shows_edit_toolbar_in_a_1000_point_window; the
#8758 layout test checks the one-column footer, and the search query
test runs on the two-column rail.
dxf_widest and dxf_leftmost folded from f64::MIN and f64::MAX, so a DXF
that kept its header but lost every vertex gave an infinite product and
the unitScaleRatio and pica assertions still passed. Both now reduce the
coordinates and fail when there are none.
docs/mcp.md: a relative save or open path is resolved against the
working folder of the process that wrote or read the file.
Retracing and releasing a tracing discard the objects its trace made, so
both now throw "Cannot edit page item <id>" when one of them is locked,
with nothing changed. Added artwork is still reported first. The scan
stops at the first added object and charges the objects it looked at to
the run on both the success and refusal paths.
- AsyncFunction.prototype has Symbol.toStringTag "AsyncFunction",
configurable only.
- await checks the room for the awaited promise's reaction or job and
the suspended frame's bytes before it attaches the reaction, so a
suspension stays within the heap limit.
- An async function's return pops its frame before resolving its
promise, so a then getter on the returned value runs without it.
Returning the function's own promise rejects it at the return.
- Block functions whose variable was not declared are kept in a hash
set, so each block function's lookup takes constant time.
- A shorthand await in an object pattern of an async arrow function's
head is a syntax error, and the head accepts patterns with defaults
such as async ({a = 1}) => a. async({a = 1}) without an arrow is
still a syntax error.
- docs: .jsx files and source strings run with module: true have
Promise and the async syntax; await is an identifier only in script
code.
pathItems.removeAll() throws "cannot delete hidden or locked paths" when
any path is hidden or locked or is inside a hidden or locked object, and
only otherwise "cannot delete objects on a locked artboard". Both
messages end with a colon and up to 20 path ids. docs/mcp.md now says
so in both places that describe removeAll().
File > Print listed the system's printers on the UI thread when the
dialog opened and on each Refresh, so a slow or unreachable print
server froze the app. The desktop print service now offers its
discovery to a background job; the dialog opens on Default Printer and
PDF File, shows and announces the lookup, and takes the list when it
arrives.
- Discovery on Windows lists the queues without asking each driver for
its capabilities (`craft::print::printer_queues`).
- PDF File, its preview and Done stay available during the lookup.
Print to a printer is disabled until the list is applied, and a held
Print to a printer is not submitted.
- Setup... appears once the lookup has ended, since it reads the
printers again on Windows.
- Discovery starts on the first pass even when another drawing is
active, and a lookup that ends without a list leaves Default Printer
and PDF File.
The Print dialog's discovery came with #8800.
all-unguarded, only-weak, exit-status-only, no-assertion, early-return,
env-gate-unset, census, mirror, constant-echo, fixture-only and
exact-pixel only listed their hits before. Their hits on changed lines
and tests now fail the check like the other rules. A
`// test-lint: allow <rule> <reason>` comment still exempts a hit, and
hits on unchanged lines still do not fail.
A never-run test that builds on macOS or Windows is still listed
without failing, since it runs locally on that platform.
Docs: docs/development.md.
The startup scripts run at launch no longer list the print service's
printers, so the first window does not wait on it; a script.startup.run
with any other reason still lists them. A script's print jobs that the
desktop's worker fails to send are shown in the status bar even when a
later line, a later batch that was sent or a startup script's failure
took it, and the startup script's notes stay in the hover.
script.startup.run's params text describes the print wait and the
launch rule.
The bounds getters (position, left, top, width, height and the bounds
arrays) read an item in a document in the back without measuring its type,
while the setters measure it after the switch to that document since
#10538. A script that read t.width and assigned it back could resize the
item, and every geometry assignment switched to the document and back even
when nothing changed.
The getters now measure type not measured yet in a document in the back
for an item that holds type, a symbol instance or a placed document, the
way the switch measures it, and the check is skipped while the document is
unchanged. An assignment equal to the current value of an object without
such content in a document in the back returns without switching
documents, and no undo step is made.
A for-in loop asks only the proxies whose ownKeys trap listed a name for
its descriptor. When a getPrototypeOf trap returned a new proxy of the
same target on each call, the proxy met before each name was not the one
that listed it, so the name was skipped. The loop now records, for each
proxy, the proxy its prototype lookup returned, and a new proxy of that
same target in its place answers for it. Proxies that list nothing are
recorded too, so another proxy of their target does not answer for them,
and the listing proxies stay rooted until the iterator holds them.
Follows #10185.
With Run Startup Scripts on, File › Scripts runs the chosen script
through script.startup.run, and only script.run listed the print
service's printers, so app.printerList and Document.print to a printer
threw "not available here" in the chosen script. script.startup.run now
lists the printers, each queued run takes them as it starts, and a
startup script's print jobs are asked about before the next run starts.
Follows up on #9087.
- A `with` scope reads `Symbol.unscopables` after it finds a name, through
a proxy's `get` trap, and skips the binding when that object's property
for the name is truthy.
- `concat` reads `Symbol.isConcatSpreadable`, through proxy traps; a
defined value decides whether the object is spread.
- `Object.keys` and `Object.getOwnPropertyNames` keep the target's order
through empty-handler proxies.
- `%TypedArray%.from` and `of` construct through a proxy constructor and
check that the result is a typed array long enough.