Commit Graph
8781 Commits
Author SHA1 Message Date
Codex 9fdcbf93c2 test: cover asset failure after save script shifts tabs 2026-11-04 13:48:59 +01:00
FredApps ec549530b8 Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	crates/ui-egui/src/app/files.rs
2026-11-04 13:44:14 +01:00
FredApps 66a0853024 Merge pull request #11244 from hnoerenberg/fix/assets-after-script-close-11121
fix(assets): bind post-save generation to the saved document's identity
2026-11-04 13:42:57 +01:00
FredApps 97ba6d16a9 Merge pull request #11189 from hnoerenberg/fix/windows-replace-recovery-11178
fix(atomic): report where the original survives when the Windows restore fails
2026-11-04 13:42:21 +01:00
Hartmut NörenbergandHartmut Nörenberg bf5c479d29 fix(layers): refuse to ungroup the sole empty layer group (#11118) (#11163)
* fix(layers): refuse to ungroup the sole empty layer group (#11118)

* fix(layers): document the ungroup guard and cover the valid empty-group case

Review follow-up: docstring on ungroup() and a control test showing an empty group that has sibling root layers still ungroups (the group simply disappears).

---------

Co-authored-by: Hartmut Nörenberg <[email protected]>
2026-11-04 13:40:06 +01:00
Tareq HalabyandFredApps 2472b4a46b PSD: keep stylistic sets in Txt2 for PhotoCraft-native documents (#10313)
* PSD: keep stylistic sets in Txt2 for PhotoCraft-native documents.

needs_txt2 now covers Txt2-only OpenType flags (ss01–ss20 and non-default TXT2_FEATURES). Fresh documents get a framed point-text object with full style runs so Set 1/5 round-trip on save/reopen (#10308).

* Txt2: seed fill colour and font list on PhotoCraft-native blocks.

Fresh style runs get a /53 paint dict, and an empty font list gets a CoolTypeFont entry so index 0 resolves (CodeRabbit on #10313).

* Txt2: tag SimplePaint and ensure numbered /0 on legacy blocks.

CodeRabbit: write /99 /SimplePaint on fresh /53 dicts, and create the numbered resource dictionary before pad_frames when a legacy block lacks it.

* Txt2: treat a missing stylistic-set mask as 0 when comparing styles

A style run without key 85 used to agree with any ssNN mask, so enabling
ss01 could leave the file's runs in place on save. Align with import's
default of 0. Also restore the G8 gaps note after rebasing onto main.

* style(io): rustfmt psd_kerning stylistic-sets test

* Txt2: keep Photoshop /0 stable when seeding fonts and frames

Only seed a CoolTypeFont list and inject /0/8 when the block is
PhotoCraft-native or already had those keys / needs new frames, so
unedited Photoshop Txt2 saves stay byte-identical (#2374).

* style(text): rustfmt oversized-template assert

* PSD: keep the Txt2 scaffolding to PhotoCraft-native blocks

A file's own Txt2 block (any Photoshop era) is written as before: no
numbered /0 or /0/8 frame list is injected, a layer without a template
object gets its stub, a run without /53 isn't given one, and no
minimal style base is used. Only a block PhotoCraft creates itself
(prev.is_none()) gets fresh point-text objects, minimal runs, a seeded
font list and a frame list.

Fresh objects now write one /5 paragraph run per paragraph (UTF-16
lengths, checked conversion), as edited objects are refitted.

Tests: Photoshop blocks with an empty or missing /0 get no native
scaffolding; the oversized-template test is back to main's assertion;
fresh paragraph runs; the PSD round trip checks ss01 and ss05 on every
run.

---------

Co-authored-by: FredApps <[email protected]>
2026-11-04 13:28:06 +01:00
skylar taylor-barrick 68b6dbfa79 Merge pull request #10750 from RickiNano/perf/bench-cmd-refresh-split
perf(bench): split command and refresh time; refresh like the app; stop rows timing setup
2026-11-04 12:39:54 +01:00
skylar taylor-barrick e88adf20a0 Merge pull request #10921 from RickiNano/fix/show-effect-cache-pref
Preferences: show Effect Cache, which the engine reads (#204)
2026-11-04 12:36:56 +01:00
skylar taylor-barrick db18b9d432 Merge pull request #10802 from RickiNano/fix/props-percent-units
Properties: W/H/X/Y take a typed percentage (#10784)
2026-11-04 12:30:05 +01:00
Tareq HalabyandFredApps 4d0ecd746f Toolbar: Alt/Option-click cycles the flyout tool slot (#10301)
* Toolbar: Alt/Option-click cycles the flyout tool slot.

Matches Photoshop: plain click keeps the shown tool; Alt-click advances through the slot without opening the menu (including tools Shift+letter skips).

* Toolbar: don't fit-on-screen on rapid Alt-clicks through Hand.

Alt-click only cycles the flyout slot; exclude Alt from the Hand/Zoom double-click handlers and cover inactive-slot cycling.

* Toolbar: ignore Hand/Zoom double-click after an Alt-click.

egui pairs a plain click with a prior Alt-click as a double-click; remember the previous click's Alt so fit-on-screen and actual-pixels only run for two plain clicks.

* Toolbar: read click modifiers from the slot's pointer release.

Match DesignCraft/EffectCraft: bind release mods to the tool rect, treat any modifier as blocking Hand/Zoom double-click, and harden the Alt-cycle test by clearing i.modifiers before release.

* Toolbar: cover 1/2/3-tool Alt-click cycles and hidden-tool slots.

Addresses ReviewerA on #10301: next_slot_tool wrap cases for short flyouts, and visible_sections so Edit › Toolbar hidden tools shrink the Alt-click cycle.

* style(ui): rustfmt after rebase onto main

* Toolbar: next_slot_tool never panics on an empty slot

Index with checked arithmetic and get() (house rule: no panics on
input-derived indices); an empty slot returns the current tool. Test
added.

---------

Co-authored-by: FredApps <[email protected]>
2026-11-04 12:29:11 +01:00
Hartmut Nörenberg f7f2983f78 fix(assets): bind post-save generation to the saved document's identity
A Save Document script that closes or moves a tab changed the document list between the script event and the Image Assets continuation, which reused a resolved-before index: the saved document's outputs were silently skipped, or a shifted-to index exported another tab's. document_saved now takes the DocId, resolves it only after the script ran, and generates nothing when the script closed the saved document.
2026-11-04 07:36:16 +01:00
Dylan M. Taylor 37a01ca874 format: bound blob inflation by the load's remaining budget; browser budgets (#10984)
LoadFetch::blob_bounded decompressed a new blob up to max_blob_bytes
and only then charged it against max_total_bytes. Successful blobs are
retained, so several distinct, highly compressible blobs each allocated
a full max_blob_bytes before the total was checked. A new blob may now
inflate only to what the total budget has left.

The browser build loaded native documents with the desktop defaults
(1 GiB a blob, 16 GiB in all), far beyond a wasm32 instance's 4 GiB of
linear memory that the editor also uses. On wasm32 the defaults are now
512 MiB a blob and 1 GiB in all.
2026-11-03 20:55:42 -05:00
Dylan M. Taylor 3225307e57 codecs: admit animated GIF screens, sparse RLE BMPs and icon PNG profiles (#10979)
* codecs: admit animated GIF screens, sparse RLE BMPs and icon PNG profiles

- Animated GIF decoding (decode_gif_frames) skipped the logical-screen
  plausibility check the first-frame decode applies, although the
  backend initializes the whole screen before reading a frame. Both now
  share gif_plausible().
- RLE BMPs skipped the file-size plausibility check entirely, so a
  header-only file could make the decoder allocate and clear a
  multi-gigabyte canvas. Like a GIF's screen, 256 MiB of canvas is now
  free of data and the rest must be backed by the file.
- The image crate's ICO decoder opens an embedded PNG with no limits,
  and png inflates an iCCP profile while the decoder is built. Icon
  PNG profiles are now inflated into a sink first and refused past
  255 x 65519 bytes (or max_alloc), with a 64 MiB total across entries.

* address review: visit each ICO profile chunk offset once
2026-11-03 20:54:58 -05:00
Dylan M. Taylor d82e166494 codecs: charge dropped PNG text against the metadata budget (#10980)
* codecs: charge dropped PNG text against the metadata budget

read_text_metadata debited the shared text allowance only for text it
kept. A compressed iTXt chunk that inflated up to the whole remaining
allowance and then failed UTF-8 validation (or hit a corrupt or
truncated stream) was dropped without being charged, so every further
such chunk could repeat the same inflation. bounded_text now reports
the bytes it produced and the caller charges them whether or not the
text is kept.

* codecs: charge the output a failing text decompress wrote

* address review: charge Latin-1 zTXt error batch at UTF-8 length
2026-11-03 20:51:19 -05:00
Dylan M. Taylor 20f92ee405 codecs: leave Extended XMP fragments out of zune-jpeg's header parse (#10981)
* codecs: leave Extended XMP fragments out of zune-jpeg's header parse

zune-jpeg 0.5 keeps every Extended XMP APP1 fragment until its GUID's
set is complete, and re-sorts and re-checks the whole pending list
after every marker it parses. A file with many small, consistent but
incomplete fragments (or a few followed by many other markers) costs
quadratic time before any pixel is decoded.

Nothing in PhotoCraft reads zune's reassembled Extended XMP (metadata
comes from scan_metadata over the original bytes), so the decoder now
hands zune a copy without those segments when a file has any. Files
without Extended XMP are passed through unchanged.

* codecs: reserve only the bytes kept after dropping Extended XMP segments
2026-11-03 20:50:58 -05:00
Dylan M. Taylor 4c33a7b8f2 raw: keep at most 64 GainMap opcodes from one list (#11023)
Development applies every gain map to every pixel it covers, so a list
of thousands of maps multiplied the work of an otherwise admissible
image. Cap them like MapPolynomial; the rest are named as not applied.
2026-11-03 20:50:37 -05:00
Dylan M. Taylor 87f0bb3942 raw: refuse JPEG XL tiles with compressed metadata boxes or splines (#11039)
jxl-oxide inflates Brotli-compressed auxiliary boxes (Exif, XMP) into
storage its allocation tracker doesn't see while it reads a container,
and samples spline geometry into an untracked vector with no bound on
the sample count. A raw tile needs neither: refuse a container holding a
brob box before reading it, and a codestream whose frames draw splines
before rendering.
2026-11-03 20:37:49 -05:00
Dylan M. Taylor c004e38e75 raw: decode a tile range once when several tiles share it (#11041)
read_plane decoded every segment separately, even when a file pointed
every tile at the same bytes. Each lossless JPEG decode rebuilds its
Huffman tables and each result is retained until assembly, so one small
range repeated across many tiles multiplied header work and memory by
the tile count.

Decode each distinct (offset, length, geometry) once and scatter the
shared samples into every tile that names it.
2026-11-03 20:37:28 -05:00
Dylan M. Taylor 06bedca787 raw: refuse lossy DNG tiles that carry Extended XMP (#11042)
* raw: refuse lossy DNG tiles that carry Extended XMP

zune-jpeg keeps every Extended XMP fragment until its set is complete
and re-sorts and re-checks all pending fragments after each marker, so a
lossy (compression 34892) tile of many small incomplete fragments costs
quadratic time before a pixel is decoded. A raw tile has no metadata:
refuse one with an Extended XMP APP1 segment before parsing it.

* address review: bound Extended XMP identifier to APP1 payload
2026-11-03 20:37:07 -05:00
Dylan M. Taylor 4367131008 raw: check retone's pixel count with checked multiplication (#11043)
retone compared the buffer length with an unchecked w * h. In a release
build a product that wraps passed the check for a tiny buffer, and the
banded passes then ran over the original, huge height.
2026-11-03 20:31:35 -05:00
Dylan M. Taylor f960a65eb3 ipp: resume the reply's header search where the last read stopped (#11049)
read_response searched every byte read so far for the blank line after
each read, so a server trickling a 16 MiB reply in tiny fragments made
the client rescan it once per fragment. Resume the search three bytes
before the previous end.
2026-11-03 20:31:14 -05:00
Dylan M. Taylor e47dee26d0 fix(gpu): saturate effect band edges at the coordinate ceiling (#11057) 2026-11-03 20:30:53 -05:00
Dylan M. Taylor d5bd171810 text: merge a run of union components once when fitting area type (#11065)
AreaShape::spans folded each Combine/Join component into the growing
interval list with a full merge, so a shape of many disjoint components
cost components x intervals per row, repeated for every row the layout
tries. Gather a run of union components' intervals and merge them once
(sort and sweep) when the run ends; other operators fold as before.
2026-11-03 20:23:51 -05:00
Dylan M. Taylor 282be0927e text: group glyphs by colour once instead of rescanning per colour (#11069)
The rasterizer found each glyph's colour with a linear search of the
colours seen so far, then walked every glyph and decoration twice per
colour (bounds, then coverage) to draw that colour's items. A text layer
with a colour per letter cost colours x glyphs before drawing anything.

Build each colour's glyph and decoration lists in one pass, keyed by the
colour's bits, and draw each pass from its own lists.
2026-11-03 20:23:29 -05:00
David Mann 205db62a29 Merge pull request #11157 from davidmann4/integration-batch-14
Integration batch 14: 9 PRs planned
2026-11-04 01:42:35 +01:00
Dylan M. Taylor 3fd5304dfe text: find paragraphs and trailing blanks without rescanning (#11045)
Layout looked up each paragraph's style with a reverse scan of every
paragraph start, tab placement re-checked the whole rest of the line for
every cluster, and PSD import found each character run's paragraph by
summing paragraph lengths from the first one. Each was quadratic in
counts a file controls.

Use the existing binary search over run starts for paragraphs, one
reverse scan for the line's last inked slot, and precomputed paragraph
ends with a binary search on import.
2026-11-03 19:35:50 -05:00
Hartmut Nörenberg 82ee6ada2e fix(atomic): the vanished-backup error names the path it looked at 2026-11-04 01:13:43 +01:00
David Mann dff83780d0 Merge main into integration-batch-14 2026-11-04 00:59:38 +01:00
David Mann 545d447c10 Merge PR #10998: Actions: map recorded Scale Effects and Create Layers 2026-11-04 00:51:01 +01:00
Hartmut Nörenberg 30c617cc79 fix(atomic): a vanished backup is not a recovery copy 2026-11-04 00:36:12 +01:00
David MannandClaude Opus 5.5 c430647bb0 Batch: drop the Info panel's crop Ratio line from #10453
The reference application's Info panel shows the crop frame's W and H but no
ratio line, so it stays out for now; W and H keep following the frame.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-04 00:18:12 +01:00
David MannandClaude Opus 5.5 75a6828f53 Batch: picking the Crop tool again keeps a committed crop's frame hidden
Measured in the reference application: after ↵ commits a crop, the Crop
tool shows no frame; pressing C again, or another tool and back, keeps it
hidden, and only a press on the canvas brings the frame back. A crop
committed by leaving the tool is different: back on the Crop tool the idle
frame shows at once. #10642 brought the frame back on re-picking; picking
the tool no longer ends the hidden state, and a commit on leaving the tool
does not start it. Tests follow.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-04 00:13:42 +01:00
Hartmut Nörenberg fbe7680328 fix(atomic): report where the original survives when the Windows restore fails 2026-11-03 23:55:50 +01:00
David MannandClaude Opus 5.5 37c84c18e5 Batch: Ctrl-held Straighten test expects transparent corners with Delete Cropped Pixels off
Main's #10905 (#10867) turns the Background into Layer 0 when a crop keeps
the cropped pixels, so the corners a turn uncovers stay transparent instead
of taking the background colour. The #10950 test now expects that for its
Delete Cropped Pixels off cases; with it on the corners are still the
background colour.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-03 23:39:48 +01:00
Hartmut Nörenberg 0122a97a40 fix(ui): the Image Assets failure keeps the full path and what did go out
Review follow-up on the Image Assets PR: the notice title carries the full saved path so same-named documents in different folders stay distinguishable, and the status line keeps the success count and assets folder alongside the first failure.
2026-11-03 23:37:50 +01:00
David MannandClaude Opus 5.5 c466cac619 Batch: H/P and Info panel tests pick the Crop tool again after a commit
#10642 hides the frame after a committed crop until the next press or
re-picking the tool. The #9855 and #10453 tests expected the default frame
right after the commit; they now check that it is hidden, pick the tool
again and then test the default frame as before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-03 22:56:21 +01:00
David Mann e06d1cbdc1 Merge PR #11067: Layers panel: filter by layer effect (#10880) 2026-11-03 22:55:47 +01:00
David Mann 3c9ae63951 Merge PR #10955: Actions: map recorded Shear curves 2026-11-03 22:55:46 +01:00
David Mann d8ea8061ee Merge PR #11109: Crop: turning the image keeps the frame inside it (#10869) 2026-11-03 22:55:46 +01:00
Hartmut Nörenberg 7ad4797c2e fix(ui): the Image Assets failure names the saved document
Review follow-up: the failure status and notice keep the Saved file name, so with several documents or a late background save the user sees which one saved fine and whose assets failed.
2026-11-03 22:50:47 +01:00
Hartmut Nörenberg c68d0a1925 fix(ui): a save that failed some Image Assets reports which outputs (#11117) 2026-11-03 22:03:59 +01:00
Psychotoxical 66b9f2f68b Merge remote-tracking branch 'origin/main' into feat/layer-filter-effect
# Conflicts:
#	crates/automation/src/server.rs
#	crates/ui-egui/src/panels/layer_filter_ui.rs
#	crates/ui-egui/src/state.rs
#	docs/control-protocol.md
2026-11-03 21:55:06 +01:00
ljkx c15a281045 Merge remote-tracking branch 'origin/main' into crop-turn-keeps-frame-inside 2026-11-03 21:49:55 +01:00
David Mann 81bd97376f Merge pull request #10387 from davidmann4/fix/flaky-split-route
CMYK: adjustment layers in the special eight keep the Fill rule on the ink path (#10386)
2026-11-03 21:39:21 +01:00
yoriswind 27f86af55b Merge main into recorded layer style mappings 2026-11-03 12:12:41 -08:00
yoriswind 7763e2578f Merge main into recorded Shear mapping 2026-11-03 12:11:27 -08:00
David Mann 576b705a07 Merge PR #10850: fix(algo): Filter Gallery reach no longer overflows on out-of-range stored effect values 2026-11-03 20:47:27 +01:00
David Mann 0d4e565062 Merge PR #9573: fix(ui): Free Transform keeps plain layers over the moving one under a blend or adjustment layer (#9387) 2026-11-03 20:47:24 +01:00
David Mann f199789b00 Merge PR #10453: Crop: the Info panel shows the crop frame's W and H (#3145) 2026-11-03 20:47:20 +01:00
David Mann b91a75185a Merge PR #9855: Crop: H and P pick the Hand and Pen tools over the default frame (#9731) 2026-11-03 20:47:16 +01:00