Commit Graph
6348 Commits
Author SHA1 Message Date
FredAppsandClaude Opus 5.5 fc6dc4f2d6 refactor(ui): drop dead and test-only image geometry
HandleId duplicated ImageHandle with conversion tables both ways; the
image engine now takes ImageHandle, which also carries the cursor icon,
and the crop grips map through one GRIPS table instead of two index
matches. ImageObb loses from_center_size_angle, scale_proportional,
project_delta, new, handle_id, handles_with_ids and the width, height
and theta fields, which only the test of scale_proportional read.
reset_crop, RESIZE_ACCENT, image_owns_pointer and DragTarget::CropHandle
had no callers, and turn_degrees is test-only. The image engine is
private and its unused re-exports are gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 12:35:35 +01:00
FredAppsandClaude Opus 5.5 d1cba7fdd1 refactor(ui): remove update_image_crop, which only its test called
The image panel crops through Edit::UpdateContent with the fractions it
reads, and nothing else called update_image_crop. Removed with its test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 12:34:57 +01:00
FredAppsandClaude Opus 5.5 8abd35cf67 feat(automation): text_script tool for superscript and subscript
Format text's Superscript and Subscript had no headless path (AGENTS §3):
text_script toggles them on a paragraph, or a byte range of its editor text,
through the engine's text_script and writes the paragraph as text_edit does.
The parity entry now lists the tool and its tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 12:34:56 +01:00
FredAppsandClaude Opus 5.5 f01823f6fa refactor(edit): one superscript/subscript toggle, in the engine
The four character match blocks become two const tables in a new engine
module, text_script, keeping the minus sign's mapping. One toggle_script in
Edit text replaces the three copies (paragraph editor, added-text draft and
the Format text button state).

A range is now 'already in the script' when at least one character is and
none of the others has a form in it. Before, one character with no Unicode
form (a space, q, H in H2O) kept the range from ever counting as converted,
so the second click converted again, changed nothing, and the text could not
be toggled back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 12:34:54 +01:00
FredAppsandClaude Opus 5.5 2ef192b7cd refactor(ui): remove the unused list helpers from Edit text
is_bulleted, is_numbered, toggle_bullet_list and toggle_numbered_list had no
caller outside their own tests: Format text shows bulleted and numbered lists
as planned. Removed with their tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 12:34:54 +01:00
FredAppsandCodex GPT-6.1 1a2f7b2a34 fix(edit): refuse arrange across crossed scope boundaries
Require both graphics and marked-content boundaries to balance inside source, destination and removed spans. Regression fails before the guard; all 408 edit tests, scoped clippy, fmt, layers and assets pass on GGEO-AI02.

Co-Authored-By: Codex GPT-6.1 <noreply@openai.com>
2026-11-01 12:33:51 +01:00
FredAppsandClaude Opus 5.5 eb0d5e64c7 refactor(edit): fold duplicated image scope and arrange helpers
PR #2155 review item A5 (part 2), plus the unreachable Ok(()) exits in
arrange_image from B11. No behaviour change for well-formed content:
- image_exclusive_scope and image_transform_scope were one scan; they are
  now image_scopes, and transform/crop take ImageScopes::transform_scope.
  The shared scan resets an open path at Q, as the exclusive one did; the
  two only differed on content that leaves a path open across Q.
- arrange_image and remove_image_crop took page and index and listed the
  page's images again; change_image now passes the page, its streams and
  the image, and neither is public any more.
- content_units' four copied scan loops are one sequence_end.
- DrawingState keeps its line-style, intent and flatness operators in a
  table; the w/J/j/M/d guards in compute_inherited_drawing_ops tested ops
  extract_scope_state never collects.
- clip_path_to_ops: ImageState never builds a quadratic segment and only
  stores finite points, so the QuadTo arm and finite checks were dead; it
  now reports a segment it can't write instead of dropping the clip.
- target_destination_unit and determine_arrange_spans are shorter; the
  Ok(()) exits for lookups that cannot fail are now errors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 12:33:50 +01:00
FredAppsandClaude Opus 5.5 71b39aec5b refactor(edit): drop test-only image API and dead graphics-state code
PR #2155 review item A5 (part 1). No behaviour change for callers:
- crop_image, and the arrange_image/crop_image/remove_image_crop/MaskIdentity
  re-exports, existed only for tests; tests now go through change_image.
- PageImage.smask was read only by tests; page_images no longer tracks
  ExtGState for it. The nested-mask test keeps its rendered-pixel check.
- MaskIdentity's Display, ExtractedScopeState.effective_cm, the
  ExtendedGStateTracker overflow_depth (an error ends the scan, so it was
  never read) and the EffectiveGState one-line getters were unused.
- merge_dict always gets the ExtGState name, so the hash fallback for an
  unnamed inline soft mask was unreachable outside a test.
- cid_to_gid_map_odd_length_is_trimmed_to_even exercised no crate code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 12:33:50 +01:00
FredAppsandCodex GPT-6.1 a910b8cca2 fix(automation): reject invalid transform coefficients
Reject malformed matrices instead of dropping non-numeric coefficients and applying an unintended transform. The regression failed against the previous parser on GGEO-AI02; all 1721 scoped tests pass with the fix.

Co-Authored-By: Codex GPT-6.1 <noreply@openai.com>
2026-11-01 12:33:50 +01:00
FredAppsandClaude Opus 5.5 e61da46f92 fixup! feat(automation): image_edit transform action
rustfmt layout of the new test's closure.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 12:33:50 +01:00
FredAppsandClaude Opus 5.5 b5ddf2cc80 feat(automation): image_edit transform action
A resize of a turned image sends ImageEdit::Transform, which had no
headless path (AGENTS 3). image_edit now takes action transform with
matrix: six numbers in top-left-origin points, like the tool's other
geometry, applied after the image's placement. The tool converts it to
user space through the page's view mapping, and refuses a matrix that is
not finite, is flat (a·d − b·c = 0) or moves the image out of range.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 12:33:50 +01:00
FredAppsandClaude Opus 5.5 ac4f26a00d chore: revert unrelated churn from #2155
Restore main's text where the PR changed things it did not need to:
intra-doc links turned into plain code spans (engine js.rs and
camera_edges.rs, forms raster.rs, fonts pdf.rs, sign keys.rs and
pkcs12.rs, ui-egui motion.rs and web_print.rs), the #[allow(dead_code)]
on render's byte_capacity and ui-egui's unit_for_tag (both are used on
every native target, as on main), the loosened combine_grid timings, the
forms test case rename (scratch() already numbers its folders), and the
computed xref size in a_recovered_page_tree_survives_a_full_save (always
5 there).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 12:33:50 +01:00
FredAppsandClaude Opus 5.5 92de289ecc fix(engine): spend the font budget only on fonts the picker lists
discover charged each candidate's size against the 64 MiB budget before
reading it, so proprietary or broken files early in a fonts folder could
use the budget up and hide openly licensed fonts after them. Charge only
fonts that pass validation and are not duplicates. Reads are still
bounded: every file read counts against four times the budget.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 12:33:50 +01:00
FredAppsandClaude Opus 5.5 3817a9f3ec refactor(engine): drop redundant image and font checks
- page_image_at: PageImage::contains already requires the point inside
  visible_rect (rect clipped by the placement clip), so the extra bounds
  test before it decided nothing.
- image_dimensions: the 256 MB input-length guard repeated the caller's;
  the decoder's max_alloc limit still caps what decoding allocates. Its
  test no longer allocates 256 MB to hit that guard.
- font_content_key hashed every font file twice; one 64-bit hash plus the
  length is enough to tell duplicate files apart.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 12:33:49 +01:00
FredAppsandClaude Opus 5.5 4c70761803 refactor(engine): use pdfcraft_content::Matrix for added-image edits
run_edit_page_image carried its own inverse, bbox and multiply; Matrix
already has invert, bbox and then with the same formulas and the same
degenerate-determinant guard. Also drop the second finite check on Move
(checked on entry), match the added item with two finds instead of a
four-way chain, and toggle flips in one place for both the parallel and
perpendicular cases. No behaviour change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 12:33:49 +01:00
FredAppsandClaude Opus 5.5 4416405232 refactor(fonts): drop the unused TrueType subsetter
subset_truetype, subset_tag and their table helpers had no caller apart
from their own test, and validate_document_input validated twice: names()
already runs validate() first. No behaviour change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 12:33:49 +01:00
mtlcl410andClaude Opus 5.5 dbea0793e8 M6: a radio group's XFA data compares every button's on state before any /PCOn
radio_dataset_value returned the first widget whose on state or /PCOn
equalled the selected state. With states /0 /1 and /PCOn items 1 2,
selecting /1 matched the first widget's /PCOn "1" and wrote 1 instead of
2, and strip_xfa's comparison, which uses the same function, could then
miss a lost value. The selection is an on-state name, so every widget's
state is now compared first and /PCOn only after.

Test (fails with the one-pass match restored, writing "1" for /1): the
static radio fixture with /PCOn 1 2 writes 1 for /0, 2 for /1, 2 for the
item 2, the value itself when nothing matches, and nothing with no
selection.

This changes the XFA data saved for such groups.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pq7HyCfwzyRXj4VfQAVVdv
2026-11-01 19:24:24 +08:00
mtlcl410andClaude Opus 5.5 c42851da1e M6: a radio option given as a JSON number names the option its integer spelling exports, and the export-value-first precedence is stated
form_fill turned a JSON number for a radio group into text with
Number::to_string, which spells a float with a fraction part: 1.0, 1e0
and 0.1e1 became "1.0", and serde_json parses -0 as the float -0.0
("-0.0"). None names the option "1". number_option now spells a whole
number below 2^53 as that integer (1.0 -> "1", -0 -> "0"); integers keep
their exact spelling; any other number keeps JSON's spelling (1.5,
1e300), so it names only an option exported as exactly that text, and is
otherwise refused with the options listed.

The precedence when an on-state name equals another button's export
value (export value first, then on-state names; ISO 32000-2 Table 230
lets state names be positions) is now stated in state_for_export, at the
call site and in form_fill's tool description, with the number rules.

Test (fails with Number::to_string restored): the ambiguous pair (the
first button exports "1", the second's state is /1) filled with 1, 1.0,
1e0, 0.1e1, "1", -0, 2e0, 2.000 and 3.0 selects the right button; "1.0",
1.5, -1, 1e300, u64::MAX and 9007199254740993.0 are refused with the
options listed and the selection kept.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pq7HyCfwzyRXj4VfQAVVdv
2026-11-01 19:24:24 +08:00
mtlcl410andClaude Opus 5.5 b6f93a3aef M2: every match on RenderWarning names MalformedIndexedImage, and an Indexed lookup string given by reference is read (ISO 32000-2 8.6.6.3)
- render_warning_text (crates/automation/src/pages.rs, on main since this
  branch was cut) matched RenderWarning exhaustively and did not build
  with the new variant. It now names it, in the CLI's words, so
  page_render and render_preview report the skip. A workspace search
  finds no other match on RenderWarning outside pdfcraft-render.
- An Indexed lookup is a string or a stream (8.6.6.3). Indexed::new and
  is_malformed_indexed tried it as a stream first; a failed stream read
  of a reference consumed the reference, so a string lookup given by
  reference was never found and the image was skipped. The lookup is now
  read once and dispatched by type, in both places.
- hival is judged before the base: an out-of-range hival rules the space
  out even when the base cannot be read (the table size still needs the
  base, so a usable hival keeps today's handling there).

The size check is unchanged: hival is range-checked to 0..=255 before
(hival + 1) * m is formed with checked_add/checked_mul.

Tests (each seen failing with a fault injected): bounds at DeviceCMYK,
DeviceGray and hival 255 (exact and one short); hivals past u32/u64/any
integer, negative and fractional (with unchecked arithmetic and the range
widened the test panics with "attempt to multiply with overflow"); a
lookup string by reference (fails with the old stream-then-string read);
an unreadable base with hival 300; an undecodable lookup stream; and
page_render reporting the skip (without the new arm the crate does not
build, E0004).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pq7HyCfwzyRXj4VfQAVVdv
2026-11-01 19:20:55 +08:00
Grzegorz MartensandClaude Opus 5.5 5660075295 M8: the test of rows too wide for Group 4 says Group 4 refused them
Flate coming out didn't show that: Group 4 could have been coded and lost on size.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AmsdeUCdTaD72jkDw2pJKY
2026-11-01 12:15:58 +01:00
mtlcl410andClaude Opus 5.5 a215cc7bd6 M2: zero-area fill and clip tests quote the half-open pixel rule and cover each case on and off a boundary
The test module now quotes ISO 32000-2 §10.7.4 on which pixel a point on
a boundary belongs to (i = floor(x), j = floor(y); shapes include their
floor sides but not their ceiling sides), so the row a line on a pixel
boundary marks follows from the text. A new test runs zero-height and
zero-width lines, as a fill and as a clip, on a boundary, off one, and with
their ends inside pixels.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pq7HyCfwzyRXj4VfQAVVdv
2026-11-01 19:15:09 +08:00
mtlcl410andClaude Opus 5.5 6f5c0d5c9c M12: the XFA table-row test checks a row is exactly at its minimum height
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pq7HyCfwzyRXj4VfQAVVdv
2026-11-01 19:10:59 +08:00
mtlcl410andClaude Opus 5.5 536ab543d1 M12: test that an XFA caption's room follows its field's font, and that a size-only caption font keeps the rest
A caption with no font and no reserve beside a 24pt and a 6pt field takes its text's width in
each field's font (four times as much at 24pt), and one line of that font above the box. A
caption font naming only a size keeps the field's family, weight and posture.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pq7HyCfwzyRXj4VfQAVVdv
2026-11-01 19:08:54 +08:00
mtlcl410andClaude Opus 5.5 2c02ca3a56 M5: a text box's /DA without a usable size, with a non-finite operand or naming no listed font draws at the defaults (ISO 32000-2 12.7.4.3)
A /DA string comes from the file. Reviewing how the PR reads it:

- An operand that is not a finite number was taken as one: Rust parses
  "NaN" and "inf", so "NaN NaN NaN rg" reached the appearance stream as
  "NaN NaN NaN rg" (clamping keeps NaN), and "/Helv inf Tf" drew at the
  400 pt cap. parse_da now ignores such an operand with its operator.
- A Tf without its size ("/TiRo Tf") lost its font: da_font_name read
  the name two tokens before Tf only. The name is now read whether or
  not a size sits between it and Tf; the size falls back to 12 pt.
- A zero or negative size keeps the default 12 pt (zero is auto-size
  only for form fields, §12.7.4.3; a text box has none), now stated in
  parse_da's comment.

Tests (each fails with its fix reverted): a text_style unit test over
missing, zero, negative, NaN, infinite, huge and non-numeric sizes,
missing Tf, non-finite and out-of-range colours, garbage and non-UTF-8
bytes; and an appearance test that draws boxes from such /DA strings,
including a font in /DR and one no /DR lists, and checks the stream's
font, size and colour and that no NaN or inf reaches it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pq7HyCfwzyRXj4VfQAVVdv
2026-11-01 19:05:11 +08:00
mtlcl410andClaude Opus 5.5 76ba431dee M12: the XFA subform minH comment cites p. 847 and names the form it follows Acrobat on
Comment only; no behaviour change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pq7HyCfwzyRXj4VfQAVVdv
2026-11-01 19:04:18 +08:00
mtlcl410andClaude Opus 5.5 7ba0ee5804 M12: XFA prototypes: resolve each element's reference once, cap SOM expressions at 1,024 bytes, and test expansion limits
A prototype shared by many elements was reached again from each of them and its own
reference read again every time, so a long reference (1 MB) on a prototype used by
60,000 fields cost tens of gigabytes of hashing while the written template stayed small.
Each element's reference is now resolved once. A SOM expression longer than 1,024 bytes
names nothing (the longest in 198 local Designer templates is 109 bytes).

Tests: a "billion laughs" template (ten levels, each prototype referencing the level below
ten times) fails as a whole within the output cap and the form is read as written; a long
Designer-style form resolves in full with no warning; the shared long reference; the SOM
length limit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pq7HyCfwzyRXj4VfQAVVdv
2026-11-01 19:04:11 +08:00
mtlcl410andClaude Opus 5.5 2b36cfebea M12: test a positioned XFA subform with a minH above its content and with h, and name the form
The minH-above-content case now has its own assertions, a fixed h with a minH below it is
checked, the doc comment names IRCC IMM 5257 and cites XFA 3.3 p. 847, and the row test cites
the subform page (p. 847) instead of the exclGroup one (p. 719).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pq7HyCfwzyRXj4VfQAVVdv
2026-11-01 19:03:59 +08:00
mtlcl410andClaude Opus 5.5 ae73e95c7e M12: test where an XFA row group lands at a page break, and table rows at their minimum height
A growable lr-tb row group that fits stays, one taller than a page goes on over pages, an rl-tb
one splits as lr-tb does, and one with a height or a positioned one moves whole. A table of
empty multi-line cells with a minimum height fits as many rows on a page as that height allows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pq7HyCfwzyRXj4VfQAVVdv
2026-11-01 18:58:59 +08:00
mtlcl410andClaude Opus 5.5 b559caaf54 Merge upstream/main into fix/indexed-short-lookup
main added a second exhaustive match on RenderWarning (render_warning_text in
crates/automation/src/pages.rs); the merge lets this branch handle it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pq7HyCfwzyRXj4VfQAVVdv
2026-11-01 18:57:55 +08:00
mtlcl410andClaude Opus 5.5 a20607da36 M3: full screen takes no page input until the current page is on screen
While a page's transition plays, or the page waits for its raster, the
page under the pointer isn't the one shown, yet its links, fields, text
and comments took clicks. Page input now waits until full screen shows
the current page; turning pages (a click, a key) is handled apart and
still works. A press made meanwhile gives nothing on the page an owner,
so its release once the page is in takes nothing either.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pq7HyCfwzyRXj4VfQAVVdv
2026-11-01 18:44:11 +08:00
mtlcl410andClaude Opus 5.5 4dbc4fac69 M8: the apply notification says where the removed text is still held (#2448)
After "Applied N redaction marks…", the same notification names the bookmark titles,
attachments, comments and other metadata streams that still hold the redacted text, and points
to Remove hidden information. New English templates; untranslated text shows in English. The
protect.apply-redactions parity note and evidence say what is reported and what is still left.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pq7HyCfwzyRXj4VfQAVVdv
2026-11-01 18:31:52 +08:00
mtlcl410andClaude Opus 5.5 d37bde8c3b M8: Apply redactions passes on where the removed text is still held; redact_apply returns it (#2448)
The document keeps the last apply's Report::still_holding as redaction_elsewhere (re-exported as
RedactionElsewhere), cleared by the next edit, undo or redo as edit_notices is. redact_apply
returns it as still_holding with the four counts, their total and unsearched.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pq7HyCfwzyRXj4VfQAVVdv
2026-11-01 18:31:52 +08:00
FredAppsandClaude Opus 5.5 25916985ca fix(ui): keep document_area under the complexity gate after merging main
Main's page-edge-shadow preference (#2088) added a fade-strength branch to
document_area, and this branch's image-menu work added others; together they
put it one over clippy's cognitive-complexity limit. page_scroll, its only
caller's scroll helper, now takes the fade flag and restores the spacing itself.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 11:26:22 +01:00
FredAppsandClaude Opus 5.5 29913dcfca Merge current main into #2155
Brings the branch up to date with main (47f42ba0), which moved 37 commits since
the merge base, including page-edge shadows (#2088), full rewrite after page
delete (#4279) and the licence-check stage (#2212). No conflicts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 11:23:43 +01:00
mtlcl410andClaude Opus 5.5 1fd2ff31bb M8: test that a form whose content can't be decoded clears the metadata (#2448)
The unread-form branch was tested for a form nested past the depth limit only; a form under a
mark whose filter can't be decoded is removed unread too, and now has an end-to-end test, seen
failing with that branch's flag removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pq7HyCfwzyRXj4VfQAVVdv
2026-11-01 18:09:13 +08:00
mtlcl410andClaude Opus 5.5 81d629d1ff M8: applying redactions counts the bookmarks, attachments, comments and XMP that still hold the removed text (#2448)
Report::still_holding (Elsewhere) counts the places apply leaves as they are that still hold the
removed text: bookmark titles, attachment names, file names and descriptions, the text and authors
of the comments that remain, and XMP on objects other than the catalog and the pages. Nothing is
changed; Remove hidden information removes them. The text is matched as the metadata check
matches it (one Search type now serves both), with its own work limit. When the removed text
couldn't be searched for, every place holding any text counts and `unsearched` says so. The walks
read each outline item and name-tree node once, within caps.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pq7HyCfwzyRXj4VfQAVVdv
2026-11-01 17:51:37 +08:00
mtlcl410andClaude Opus 5.5 ca4ddcfb90 M8: a test for each way the metadata check fails closed; XMP is decoded strictly (#2448)
End-to-end tests for a removed run over 64 KiB, more than 20,000 terms, a run over 4,096
characters, and XMP that is corrupt, cut short, behind two filters, over 16 MiB or in another
encoding. Each was seen failing with its guard removed or loosened.

The corrupt and cut-short cases showed that the tolerant decoder returned the part of the packet
before the damage, which was then searched as if it were the whole packet. XMP is now decoded
strictly, and a packet behind more than one filter goes unread.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pq7HyCfwzyRXj4VfQAVVdv
2026-11-01 17:46:19 +08:00
RiceDee d90cf79a2a fix(ui): the line spacing list keeps its column in every language (#5634)
A longer "Auto" (Czech "Automaticky") pushed the list 46 pt past the Tools pane at its
narrowest. It is now cut short, with the whole word in the list's menu and tooltip. A test
checks the lists in every interface language the fonts can draw, and the narrow-pane test also
runs at the largest interface size.
2026-11-01 20:02:38 +11:00
mtlcl410andClaude Opus 5.5 c2251a4e16 M5: a pop-up /Rect too large for f32 reads as no pop-up; reversed corners are tested (#2137 review)
A file's huge number became infinite as f32 and reached the window's
place. Both readers (annot summaries and the render inspector) now take
such a rectangle as no pop-up, as one that isn't four numbers; opening it
gives it a new place. Reversed corners were already put in order; tests
now cover both, read from a file and saved through set_popup.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pq7HyCfwzyRXj4VfQAVVdv
2026-11-01 16:38:13 +08:00
Grzegorz MartensandClaude Opus 5.5 db4162d2ef test(create,optimize): the other way round, the same size and larger
The shapes in these tests all ran one way. The way round depends on the shapes: 1 × 100,000 to
100,000 × 1 asks for 10 GB if it goes across first, or 30 GB at three components, so that is held to
as well. A mask of its image's size comes through byte for byte, and a larger one scales.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AmsdeUCdTaD72jkDw2pJKY
2026-11-01 09:31:58 +01:00
Grzegorz MartensandClaude Opus 5.5 33d7a51301 M2: a reference in /Decode, /W or a palette that leads back to itself ends
Colour spaces already had tests of this through their bases. `/Decode`, in the renderer and in image
export, `/W`, `/W2` and an Indexed space's table hadn't: each read now has such a reference in its
test, and ends.

These hold that the read ends, not what value it comes to. A reference to a reference in a number
array reads as the first number of that reference in the renderer (`/Decode [11 0 R 0]`, with 11
naming 6 and 6 holding 1, reads as 6). That is older than this branch, in `IndirectObject::read` for
an object stored on its own and `ObjectStream::get` for one in an object stream.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AmsdeUCdTaD72jkDw2pJKY
2026-11-01 09:31:58 +01:00
Grzegorz MartensandClaude Opus 5.5 43202e10f9 M2.6: a page of many pictures stops at the export's allowance
The allowance's sharing was tested on a few images. This runs a whole page through the export: the
pictures past it are left out and counted, and the page is listed, which is what the warning goes
by. A few large pictures all come through. The README gives the numbers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AmsdeUCdTaD72jkDw2pJKY
2026-11-01 09:31:58 +01:00
RiceDee 9538640f56 fix(ui): a bookmark made in the page grid goes to the current page (#5636)
The grid moves the viewport without refreshing where the pages are on screen, so
bookmark_position now gives no position there.
2026-11-01 19:19:23 +11:00
RiceDeeandClaude Sonnet 5.5 560acae86e fix(ui): the sliver bookmark_position ignores is one physical pixel, not one point (#5636)
Page rectangles snap to whole physical pixels, so what counts as rounding scales with the display:
the view keeps last frame's pixels per point and the threshold is its inverse.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-01 19:00:15 +11:00
mtlcl410andClaude Opus 5.5 0e580f7672 M3: full screen tests for display times, bounded and hostile durations, unknown styles, reduced motion, Escape and every key
Review on #5316. No behaviour change: the presenter already cut transitions
when animations are off (by default following the system), bounded /D to
10 s and /Dur to a day, ignored non-finite or negative values, read an
unknown /S as Replace (ISO 32000-2 Table 164) and stopped with full screen.
These tests pin each of those down, and every key and click full screen
answers to. The Wipe test now counts the transition's frames from its first
painted strip, so frames spent waiting for the raster don't count toward it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pq7HyCfwzyRXj4VfQAVVdv
2026-11-01 15:59:58 +08:00
RiceDeeandClaude Sonnet 5.5 1bb7da1372 test(ui): quick_bar_offset is pinned at the margin that just holds the bar, a point less, and 1000 pt (#5635)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-01 18:50:54 +11:00
Grzegorz MartensandClaude Opus 5.5 025050942c M12: each of the nine anchors turns, at each turn
Rotation was tested from the top left and the bottom right. The other seven share that code, but
nothing held them to it. What is asked for comes from the box's corners in the test, not from layout.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AmsdeUCdTaD72jkDw2pJKY
2026-11-01 08:46:27 +01:00
RiceDeeandClaude Sonnet 5.5 3896e6c30a fix(ui): the rail's page and zoom fields are wide enough for "6400%", and the sliver size is named (#5636)
At 36 pt the largest zoom was cut off at the right. The fields are 42 pt, set by RAIL_FIELD_SIZE
and pinned in the rail test. The one-pixel tolerance in bookmark_position is the constant SLIVER.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-01 18:46:01 +11:00
RiceDeeandClaude Sonnet 5.5 461200e74a fix(ui): bookmark_position keeps a sliver page when nothing else shows; the rail test checks the rail's real edges (#5636)
A page showing under a pixel at the window's top is ignored in favour of the next page, but still
chosen when no other page shows. The rail test no longer tolerates 2 pt of overflow: it compares the
page and zoom fields with the rail's own edges.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-01 18:37:23 +11:00
mtlcl410andClaude Opus 5.5 36db141cf4 M12: tests for flowed XFA table cells and nodes without a height
Six tests for the review of #5370: every kind of node without a height
is as tall as its content after the measurement moved into
content_height; a flowed cell grows past a small or zero height, keeps
its margins and maxH and is measured across spanned columns; fields,
exclusion groups and positioned or row subforms in a cell keep their
heights; empty, nested and repeating flowed cells and repeating rows;
a cell taller than the page, huge margins and deep nesting.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pq7HyCfwzyRXj4VfQAVVdv
2026-11-01 15:18:57 +08:00