Commit Graph
8608 Commits
Author SHA1 Message Date
dotCooCoo 199b92bd5c Merge main into fix/doc-pathitems-removeall-clipping 2026-12-03 07:44:01 -08:00
.CooCoo 68fcab0512 Merge pull request #10436 from dotCooCoo/fix/slider-cancel-after-failed-preview
Path sliders: Cancel ends the edit a refused preview left open
2026-12-03 07:25:26 -08:00
.CooCoo 7836fbbe1c Merge pull request #10379 from dotCooCoo/fix/gradient-stop-swatch-identity
Gradient: the stop popover keeps the swatch picked among swatches of one color
2026-12-03 07:24:27 -08:00
.CooCoo 81af84dd2f Merge pull request #10357 from dotCooCoo/fix/ai-crop-to-crop-docs
Docs: say when an explicit crop box opens a PDF with editing data
2026-12-03 07:23:55 -08:00
.CooCoo a1cf53d324 Merge pull request #10345 from dotCooCoo/fix/classic-tool-icons
Preferences: Classic tool icons by default, with the current icons selectable
2026-12-03 07:23:43 -08:00
.CooCoo 7a14274d56 Merge pull request #10211 from dotCooCoo/feat/vector-3d-materials
3D: Roughness and Metallic on the Materials tab shade and export the surface
2026-12-03 07:21:12 -08:00
.CooCoo 4ae9e3641d Merge pull request #10189 from dotCooCoo/fix/compound-release-opacity
Compound Paths: Make and Release keep the transparency and opacity mask
2026-12-03 07:19:37 -08:00
.CooCoo d5aef1fb90 Merge pull request #10154 from dotCooCoo/fix/offset-objects-pixel-snap-gap
Arrange Tools: Offset Objects chains pixel-aligned objects from where they snap
2026-12-03 07:18:54 -08:00
.CooCoo 44c6916bde Merge pull request #10077 from dotCooCoo/feat/artboard-flood-fill
Document Tools: Flood Fill Artboards adds an artboard-sized rectangle on its own layer
2026-12-03 07:17:43 -08:00
.CooCoo c4c217a416 Merge pull request #9142 from dotCooCoo/fix/recolor-picked-swatch-link
Recolor Artwork: a swatch picked for a row keeps the art linked to it
2026-12-03 07:16:48 -08:00
.CooCoo 79fdfedfb5 Merge pull request #9075 from dotCooCoo/feat/scripts-api-d8c-rasterize-capture
Scripts: Document.rasterize and Document.imageCapture with their option classes
2026-12-03 07:14:28 -08:00
.CooCoo 7b67f8fc44 Merge pull request #10652 from dotCooCoo/fix/script-clipped-hidden-top
Scripts: clipped = true refuses a hidden or locked topmost object
2026-12-03 07:13:14 -08:00
dotCooCoo fc9d77032f Scripts: pathItems.removeAll counts a list marker as a clip outline
The document's pathItems.removeAll() skipped text whose characters are
all whitespace before laying it out, so a numbered paragraph holding a
single space did not count, although its number clips. The deletion was
then refused while the mask would still clip.

- Whitespace-only text is laid out like other text.
- Text is laid out only inside a mask that loses a path, so documents
  with text outside such masks do no layout for the check.
- A test covers a mask left with only a list number.
- docs/mcp.md says blank text without a list marker does not count.
2026-12-03 03:19:03 -08:00
dotCooCoo 4a1ac38ac3 Scripts: a Linux folder whose casefold flag can't be read is taken as casefolded
When the folder can't be opened or `FS_IOC_GETFLAGS` fails, `casefolded`
returned false, so `imageCapture` treated names that differ only in their
normalization form as two files and could write over a source document.
It now returns false only when the flags are read and the flag is clear.
2026-12-03 02:59:58 -08:00
dotCooCoo ade0e47f48 Scripts: refused writes create no file; Linux reads the casefold flag
A refused rename that falls back to copying into the target no longer
creates a missing target before the final authorization check. The
target is created only after that check, on every platform, so a
refusal at the final check leaves the path absent. An existing target
is still opened with O_CREAT, so Linux's fs.protected_regular applies.

imageCapture no longer treats an empty Linux folder as ignoring the
Unicode normalization form. It reads the folder's casefold inode flag
(FS_IOC_GETFLAGS) instead, so a missing linked cafe\u{301}.png no longer
matches cafe\u{e9}.png in an ordinary folder, and a casefolded folder
still matches both spellings.
2026-12-03 02:35:18 -08:00
.CooCoo a2c62a4a0a Merge pull request #10705 from dotCooCoo/fix/css-dotted-border-note
CSS Properties: evenly spaced round dots are a dotted border without a note
2026-12-03 02:18:36 -08:00
dotCooCoo 4bbfb2d4af Scripts: pathItems.removeAll counts only type that draws glyphs as a clip outline
The document's pathItems.removeAll() counted any visible text object as
geometry that keeps a clipping mask clipping. Blank type and area type too
short for its first line lay out no glyphs, so the clip renderer clips by
nothing for them; deleting the mask's last path then hid the clipped art.

- Text counts only when it is visible and its layout gives glyph outlines.
- A clipping group nested in the mask counts only its first member.
- Hidden objects and members of hidden groups do not count.
- Tests cover blank, overset, hidden and nested-clipped type, and type
  with glyphs that still allows the delete.
- docs/mcp.md states the rule.
2026-12-03 02:17:57 -08:00
.CooCoo 40060e0943 Merge pull request #10680 from dotCooCoo/fix/pdf-coverage-gaps-batch-11
Tests: cover PDF mesh shadings, restroked glyphs, repeated masks and spot midpoints
2026-12-03 02:03:39 -08:00
.CooCoo 99cbe84d99 Merge pull request #10691 from dotCooCoo/fix/svg-web-export-coverage
Tests: cover SVG font keywords, CSS border styles and Save for Web text cells
2026-12-03 02:03:36 -08:00
dotCooCoo 0d9dfe6bb8 Merge main into fix/script-clipped-hidden-top 2026-12-03 01:54:05 -08:00
.CooCoo bbef8bc4cb Merge pull request #10684 from dotCooCoo/test/docx-place-coverage
Tests: cover the limits and package errors of placing Word documents
2026-12-03 01:47:17 -08:00
.CooCoo 1790c1f1a4 Merge pull request #10678 from dotCooCoo/fix/engine-importer-batch-coverage
Tests: cover import limits, .af blend fallback and action.batch destinations
2026-12-03 01:26:06 -08:00
.CooCoo f765995df8 Merge pull request #10685 from dotCooCoo/fix/undo-group-coverage
Tests: cover three undo group paths no test reached
2026-12-03 01:26:01 -08:00
dotCooCoo 4ada69770b Scripts: pathItems.removeAll deletes a clipping path when visible text still clips
A group that clips by a mask holding a path and a text object keeps
clipping by the text's outlines after the path is deleted, so
Document.pathItems.removeAll() no longer refuses that case. Hidden
text and hidden subgroups do not clip, so a mask left with only those
still refuses. docs/mcp.md describes the rule.
2026-12-03 00:34:07 -08:00
dotCooCoo 7b51b005eb CSS Properties: evenly spaced round dots are a dotted border without a note
A stroke of evenly spaced round dots (round cap, a zero-length dash, one
gap length, not fitted to corners) is written as `border: ... dotted`, but
the rule also carried the "arrowheads, width profiles, brushes or dashes
fitted to corners" note, and with rasterize on it got a picture as well.
Such a stroke no longer raises that note. Projecting caps, dots fitted to
corners, dots mixed with dashes and unevenly spaced dots keep it.

A gradient border is written with `border-image`, which replaces the
border's style, so its dots or dashes are lost. A dotted or dashed
gradient border now carries the note "dashes or dots on a gradient border".
2026-12-03 00:15:40 -08:00
dotCooCoo 4e90d6c211 Scripts: same_folder builds without a needless bool on Windows
On Windows the Unix block in same_folder is compiled out, which left
`if a == b { return true; } false` and failed clippy's needless_bool
lint with -D warnings in the Windows CI run. The early return now sits
inside the Unix block and the other platforms compare the paths.
Behavior is unchanged on every platform.
2026-12-03 00:09:32 -08:00
dotCooCoo 96ba49f5bd Files: check a write again before it is put in place off Unix
Off Unix, write_atomic_checked asked `allowed` once, before the file
was written, so a destination that stopped being allowed while the file
was filled still received it. The check now runs again after the fill,
right before the rename, and again before the content is copied over a
file whose folder refuses the rename. A refusal removes the staging
file and leaves the target as it was.

The hard-link fixtures in the capture tests unwrap the link again, as
the other hard-link tests in the engine do (script_io.rs, plugins.rs).
2026-12-02 23:09:11 -08:00
dotCooCoo 3d69c8d49a Scripts: removeAll cannot leave an image first in a group named Image Trace
textFrames.removeAll() and the removeAll() of a group's pageItems,
groupItems and compoundPathItems checked only clip groups whose mask
they release. Deleting the type or art below an image in an ordinary
group named Image Trace left the image first, so the group was read as
a tracing and the image dropped out of pageItems. Both now throw
"Only Image Trace can make a tracing" and delete nothing, checking the
whole set being deleted at once.
2026-12-02 22:58:00 -08:00
dotCooCoo 85d9759773 Merge main into fix/doc-pathitems-removeall-clipping 2026-12-02 22:49:14 -08:00
dotCooCoo 14e8959bc0 Scripts: tighten rasterize clip bounds and imageCapture destination checks
- object.rasterize and Document.rasterize refuse clipBounds that reach
  none of the selected objects' own bounds, including a rectangle in the
  gap between two of them, instead of replacing the art with a
  background-only image.
- imageCapture checks its destination again on every write the export
  makes and as the file is committed, so a destination that becomes a
  link to an open document or a linked file while the art renders is
  refused.
- imageCapture refuses a destination whose real path is not valid UTF-8
  instead of writing under a name with its bytes replaced.
- A missing linked file's name in the other Unicode normalization form
  counts as the linked file in folders that ignore the form (macOS, and
  casefolded folders on Linux).
- The hard-link tests skip on volumes without hard links.
- docs/mcp.md: imageCapture rounds clip dimensions to the nearest pixel;
  rasterize rounds fractional dimensions up.
2026-12-02 22:19:16 -08:00
dotCooCoo 13488c3103 Scripts: document pathItems.removeAll refuses to delete a clipping path
Document.pathItems.removeAll() deleted every path of the document even when
one was the clipping path of a group or layer that keeps other objects, so
the next object became the clipping path. The scoped collections already
refuse this. The document's collection now runs the same check before
anything is deleted, and also refuses when it would empty a compound path or
group that clips other objects. edit.clear removes an emptied compound path
and keeps an emptied group, and the check follows it.

The fault came with #9041, which added Document.pathItems.
2026-12-02 22:10:09 -08:00
dotCooCoo ebe9e41a33 Tests: check where the spot gradient midpoint lands in the PDF
The test passed "midpoint": 30, which the command clamps to 0.87, and its
tint assertions hold at any midpoint. It now passes 0.3 and asserts the
stitching function's /Bounds[0.3].
2026-12-02 21:57:42 -08:00
dotCooCoo 06e5e28a0b Tests: cover SVG font keywords, CSS border styles and Save for Web text cells
- SVG import: font-size keywords (x-large), larger and smaller against
  the parent's size, and every bolder and lighter step from the parent's
  weight.
- CSS Properties: a round-capped dash starting with 0 gives a dotted
  border, other dashes a dashed one, and a gradient stroke a border with
  border-image. A pen-drawn upright rectangle is written as a rectangle
  with square corners, and the same path rotated gets the note for a
  shape CSS cannot draw.
- Save for Web: a No Image cell over the matte color, aligned right and
  bottom, and an HTML Text cell whose lines are escaped and joined with
  <br>.
2026-12-02 21:55:45 -08:00
dotCooCoo 81263e7c0c Merge main into fix/undo-group-coverage 2026-12-02 21:27:18 -08:00
dotCooCoo 9ec2f5c4bd Tests: cover three undo group paths no test reached
- A document added outside a command while edit.undoGroup.begin is
  open joins the group: its two edits are one "Job" step, and one undo
  takes both back (Session::add_document).
- Canceling a group rewrites a batch's journal entry: a dropped step
  that left another document in front becomes document.activate with
  that index, so the edit made after the group replays in the same
  document (keep_batch_steps).
- Renaming a graph design to its own name succeeds and records no undo
  step, and the design list stays the same.

Each test fails with the covered lines removed.
2026-12-02 21:26:18 -08:00
dotCooCoo 72e99d1c3b Merge main into feat/scripts-layer-text-frames 2026-12-02 21:17:26 -08:00
dotCooCoo c2d242eafa Tests: cover PDF mesh shadings, restroked glyphs, repeated masks and spot midpoints
Adds tests for PDF import and export paths that no test reached:

- A tensor-product patch mesh (type 7) imports as the gradient mesh of
  its boundary, the same mesh a Coons patch over that boundary gives.
- A triangle mesh (type 4) imports as one gradient mesh per triangle,
  each corner in its vertex's color.
- Tensor and triangle meshes over the 16,384-patch limit import as a
  flat gray with a warning.
- The last glyph of a run stroked again in another color splits off
  into its own run; the glyph before it keeps its stroke.
- A masked CMYK image drawn twice at two sizes keeps its opacity mask
  both times, fitted to each drawing; with a mask that hides nothing it
  has no mask either time.
- A one-spot-ink gradient with an off-center midpoint exports a stop at
  the midpoint with the mean tint, still as a Separation shading.

Each test fails with the code it covers broken.
2026-12-02 21:14:39 -08:00
dotCooCoo f1ac779b9f Merge main into test/docx-place-coverage 2026-12-02 21:14:29 -08:00
dotCooCoo 7a066e53b8 Tests: cover the limits and package errors of placing Word documents
Placing a .docx or .doc file had guards that no test reached, so removing
or loosening any of them left every test passing:

- malformed_docx_fails_cleanly now checks the messages for a package with
  no end record, an encrypted part, an unknown compression method and
  ZIP64 end-record values, and that 100,002 empty paragraphs fail with
  "too much text or formatting".
- docx_parts_in_utf16_with_a_byte_order_mark_place_their_text places a
  main part in UTF-16LE and UTF-16BE after a byte-order mark.
- docx_based_on_chains_stop_at_a_cycle_and_after_32_styles places a
  paragraph in a style whose basedOn chain loops, and chains of 32 and 33
  styles where only the last style sets a size.
- docx_run_containers_and_table_rows_nested_past_the_depth_read_are_left_out
  nests runs in smart tags and table rows in content controls 70 and 60
  levels deep.
- malformed_doc_fails_cleanly refuses a .doc WordDocument stream whose
  directory entry gives 64 MB plus one byte.

Each new check fails with the guard it covers broken.
2026-12-02 21:14:29 -08:00
dotCooCoo cd172d1e77 Tests: cover import limits, .af blend fallback and action.batch destinations
- PSD slices: a version 7 or 8 descriptor that lists more than 10,000
  slices, objects nested 17 deep and lists nested 17 deep are refused
  with a warning, and 16 levels of either still open.
- .pcraft: a 12000 x 12000 canvas leaves the preview with the "too
  large to combine" note before any layer is read.
- .af files: Multiply keeps its blend mode, and Linear Light imports as
  Normal with one warning however many objects use it.
- action.batch: an unknown destination is refused, and destination
  "folder" without destinationFolder is refused before any file opens.
2026-12-02 21:08:11 -08:00
dotCooCoo 252e2ef3d4 Recolor Artwork: a waiting picker answer, excluded rows and removed group swatches
- The pump applies a Color Picker answer only while the row is the one the
  picker answered; a row that ui.dialog.set changed in between takes neither
  the color nor the swatch, and the status line says the rows changed.
- An excluded row offers no Tint slider, since recolor.apply skips its art;
  the row keeps its tint.
- A row picked from a group swatch that groupColors removes (null) offers no
  Tint slider; its chip keeps the tinted color, which the art takes unlinked.
- docs/mcp.md and the recolor.apply params say a null swatch is no swatch.
2026-12-02 20:44:04 -08:00
dotCooCoo f46d591204 Merge main into feat/scripts-api-d8c-rasterize-capture 2026-12-02 20:30:16 -08:00
dotCooCoo 80569dc577 Scripts: deleting a clipping path cannot make a tracing
remove(), the document's pageItems.removeAll() and textFrames.removeAll()
release the mask of a clip group whose clipping path they delete. A clip
group named Image Trace with an image next above its clipping path then
became an ordinary group named as a tracing with an image first, which
reads as a tracing. They now throw "Only Image Trace can make a tracing"
and delete nothing in that case.

docs/mcp.md names the removeAll() collections that release a mask and
the ones that refuse to delete a clipping path instead.
2026-12-02 20:24:21 -08:00
dotCooCoo 8714ec7731 Scripts: rasterize refuses sources clipped differently, capture checks file identity
- object.rasterize with ids refuses objects whose nearest clip group or
  clipped layer differs, before rendering: the image goes where the last
  object is, so mixed sources would be clipped by another object's path.
- Document.rasterize reads the image id from the command's result inside
  the run's savepoint, so an id above 2^53 binds the new RasterItem and a
  missing id undoes the edit.
- Document.imageCapture refuses a destination that is another name of an
  open document's file or a linked file (same device and inode, or same
  volume and file index), and on Unix any file with other hard links,
  which an in-place write would change under every name.
- Docs: gaps.md and target-app-parity.md list what rasterizing and
  capturing still lack; mcp.md states the clipping rule, the hard-link
  rule and that a later OS write failure can leave some files written.
2026-12-02 20:10:56 -08:00
dotCooCoo 0d8a56cfde Scripts: zOrderPosition reuses the layer list; textFrames.removeAll releases masks
- 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.
2026-12-02 18:44:26 -08:00
dotCooCoo c1470adfc6 Merge main into feat/scripts-text-paint 2026-12-02 18:14:59 -08:00
dotCooCoo e4e6dd517d Merge main into feat/scripts-layer-text-frames 2026-12-02 17:49:12 -08:00
dotCooCoo a7c6ff1d43 Scripts: clipped = true refuses a hidden or locked topmost object
Assigning `clipped = true` to a GroupItem checked only that the group and
its layer were editable, so a hidden or locked topmost object lost its fill
and stroke and became the clipping path. The setter now refuses that object
before running the command, with no undo step. The setter came from #9048.
2026-12-02 17:45:14 -08:00
dotCooCoo b51d13d2a4 New document: a replayed rows count over 1000 is kept to 1000
A file.new step replayed from a journal or the Actions panel rounded
artboardLayout.rows and then refused a result over 1000, so a step with
rows 1000.5 or 5000 stopped the playback. The rows count now follows the
columns rule: it is rounded, must be 1 or more, and is kept to at most
1000. Recent stores the kept count. docs/mcp.md says the same.
2026-12-02 17:28:48 -08:00
dotCooCoo a7c7dae179 Merge main into feat/scripts-api-d8c-rasterize-capture 2026-12-02 17:25:26 -08:00