Commit Graph
63 Commits
Author SHA1 Message Date
aiongg 2103be6de1 Fix clippy and rustdoc errors in automation, draw, imaging, svg, ui-patterns and ui-widgets 2026-11-16 15:40:46 +00:00
aiongg 2df33d2f01 Merge remote-tracking branch 'upstream/main' into sync/main-1116
# Conflicts:
#	Cargo.lock
#	crates/audio/src/lib.rs
#	crates/exr/src/decode.rs
#	crates/font-catalog/src/lib.rs
#	crates/ps/src/lib.rs
#	crates/svg/Cargo.toml
#	crates/text/Cargo.toml
#	crates/text/src/lib.rs
#	crates/video/Cargo.toml
#	crates/video/src/lib.rs
2026-11-16 14:23:07 +00:00
FredApps c7a872e2f2 Merge pull request #1878 from storytold/onee/778-svg-guard-path
craft-svg: bound entity scans and reset smooth controls after Z
2026-11-16 15:13:24 +01:00
FredApps becf2a0a55 svg: recognise rectangles, rounded rectangles and ellipses in scene paths (#778, #789) (#1869)
tree::primitive::recognize (and Path::primitive) returns the axis-aligned
basic shape a path draws: one closed contour whose points all lie on a
(rounded) rectangle's or ellipse's outline and that encloses its area. usvg
turns rect, circle and ellipse into paths; apps that edit them as shapes get
them back from the segments.
2026-11-16 08:07:44 -05:00
FredApps 7888c863df svg: bound entity declaration scans and reset smooth controls after Z
#778, #789. Comments and CDATA are skipped, and a declaration name is
only scanned up to MAX_NAME+1, so a comment full of `<!ENTITYx` markers
is no longer a quadratic walk. Names longer than MAX_NAME are still
recorded so the expansion guard can refuse them. Closepath also clears
the smooth-control history, so S and T after Z start from the current
point rather than reflecting the pre-close control.
2026-11-16 13:51:42 +01:00
aiongg faea5d0b1a merge-fwd: item 4: Preflight.height is read only by the image resolver; expect dead_code without tree 2026-11-16 12:49:22 +00:00
aiongg 014ead170f merge-fwd: item 4: FW9: ui-contract and ui-shell parse and draw icons through craft-svg (features tree-core, tree, draw, tree-render; Limits.allow_dtd); resvg 0.45 goes; trials 2026-11-16 12:40:51 +00:00
FredApps 431f704478 svg: let SvgWriter name the encoding and write a DOCTYPE subset (#778, #789) (#1842)
* svg: let SvgWriter name the encoding and write a DOCTYPE subset

VectorCraft's SVG document wrapper needs a Latin-1 declaration and a
<!DOCTYPE svg [ <!ENTITY …> ]> internal subset, including a minified
form with no extra newlines. The existing declaration was UTF-8 only,
and craft-xml's doctype helper writes only <!DOCTYPE name>.

Part of #778 and #789.

* svg: expose SvgWriter::as_str for a second pass on open markup

A consumer that rewrites character references or hashes the document
around a metadata element needs the text of an unclosed root. finish()
would close it first.
2026-11-16 07:04:35 -05:00
FredApps b836a71856 craft-svg: a paths feature, and CSS colours with their alpha (#1848)
The geometry reader (craft_svg::paths) is the only part of the crate that
needs vectorcraft-geom and vectorcraft-pathops, and the tree is the only part
that needs craft-image-codecs. Both are now optional: paths is a default
feature and tree turns it on, so existing users build the same crate, while
an app that only needs SVG text, guards, path data, colours and the writer can
turn default features off and take no app crates or image codecs.

parse_color_alpha is parse_color keeping the alpha of #rgba, #rrggbbaa and
the fourth value of rgb()/hsl(). parse_color now calls it and still drops it.

Refs #778, #789
2026-11-16 06:54:06 -05:00
aiongg 0835e114ca Fix CI lints: samples referenced in every build, missing docs, rustdoc links, deprecated Ui::id, unused manifest dependencies 2026-11-16 03:03:33 +00:00
aiongg dffc61a7e0 Merge storytold main 832883b5 (sync 16 Nov)
961 upstream commits since 7bb6c900. Resolutions:
- Test-only conflicts: upstream tests from before the base that our side
  cut stay cut; tests new upstream are kept (audio aac/config, layout,
  encode_format; cms lutfile; media mux; print windows_native, ticket;
  update self_update; xml hostile).
- Code our side moved, with upstream's change carried to the new place:
  craft-media mux roll sample groups (mux/boxes.rs) and writer-start
  offsets with overflow checks (mux/progressive.rs); craft-print's
  shrink-to-fit scale guard (sheets/plan.rs); craft-update's nextest
  archive detection (self_update/detect.rs); craft-vectorcraft-format's
  Tail::write_to_with (container.rs); craft-i18n's pedantic fixes
  (bidi.rs, negotiation.rs).
- craft-ui: the old crate's modules stay removed; gpu_test_lock guarded
  their per-test wgpu renderers, which the snapshot kit does not have.
- New upstream tests in crates that build their integration tests into
  the library's test executable are modules of tests/main.rs (audio
  flac_decode and qoa_oracle, cms, docpath, pcraft-format,
  vectorcraft-format).
- The 22 new crates are optional members of the craft facade.
2026-11-16 01:52:09 +00:00
Dylan M. Taylor f44195aa11 Reject damaged later SVGZ members 2026-11-15 18:12:18 +00:00
Dylan M. Taylor c4c4547b7b Merge pull request #1602 from storytold/codex/svg-neutral-document
Share streaming SVG primitives and drawing output
2026-11-15 12:10:47 -05:00
Dylan M. Taylor 9eb96c47e0 Merge pull request #1199 from storytold/codex/craft-svg-photo-preflight
Expose shared SVG preflight and viewport rewrite
2026-11-15 11:49:35 -05:00
Dylan M. Taylor 89cbc41650 Satisfy SVG reader clippy gate 2026-11-15 15:22:39 +00:00
Dylan M. Taylor 6c22881fc1 Share streaming neutral SVG geometry and output 2026-11-15 15:16:39 +00:00
Dylan M. Taylor 38c26217b1 Support fixed-precision SVG scene coordinates 2026-11-15 15:01:28 +00:00
FredApps cec6e24381 Check the rewritten SVG viewport output under the same limits 2026-11-15 15:52:47 +01:00
FredApps 4f6e49b1ee Test SVG preflight depth and root viewport rewrite; accept px root sizes
Correct the source-depth expectations (svg>g>path is 3 levels, 2 open), cover
Preflight and every rewrite_root_viewport refusal, and read a root width or
height written with px as the pixels the docs promise.
2026-11-15 15:13:06 +01:00
FredApps 3bfe94538b Merge main into codex/craft-svg-photo-preflight
The base this branch was stacked on has landed separately: #1187 through #1182,
and #1198 through #1331 and #1465. Take main for everything outside crates/svg
so this PR carries only the SVG preflight and viewport rewrite.

In crates/svg, keep main's root_unitless_size, embedded data-URL and text-size
accounting, and check_document, now on top of the shared preflight. Embedded
SVGs still charge the reference-following height to the shared depth budget,
as on main, rather than the source depth.
2026-11-15 15:13:00 +01:00
Dylan M. Taylor d594b6763b fix(svg): use normalized data URL error accounting 2026-11-15 04:32:18 -05:00
Dylan M. Taylor 586041bb68 fix(svg): preserve omission accounting on malformed data 2026-11-15 04:30:16 -05:00
Dylan M. Taylor 4e9b3e9fdd fix(svg): account for invalid embedded image data 2026-11-15 04:11:43 -05:00
Dylan M. Taylor 727f945fc9 Merge branch 'main' into codex/format-adapter-safety 2026-11-14 20:11:50 -05:00
Dylan M. Taylor 465fa74789 fix(metadata,raw,svg): address CodeRabbit review findings 2026-11-14 21:31:04 +00:00
Dylan M. Taylor 30209caad8 feat(gif,image-codecs): add indexed/interlaced GIF, jpeg_progressive_scans, and JP2 decode (#1358)
* feat(gif,image-codecs): add indexed/interlaced GIF, jpeg_progressive_scans, and JP2 decode

* chore: update Cargo.lock for craft-image-codecs jp2 dep

* fix(image-codecs,svg): deref jp2 ch and re-export resvg from craft_svg::tree::draw
2026-11-14 15:13:21 -05:00
Terra854 58ef208c13 fix: preserve RAW identity and SVG byte-limit reporting 2026-11-15 03:49:35 +08:00
Terra854 d61afc4a3b fix: preserve bundle commits and expose SVG resource refusals 2026-11-14 17:53:32 +08:00
Dylan M. Taylor e58cd131af test(svg): use tree-depth limit for referenced depth 2026-11-14 05:17:03 +00:00
Dylan M. Taylor fd708734aa Merge pull request #1182 from storytold/codex/photocraft-file-caps
Add shared format capability catalog
2026-11-13 22:38:59 -05:00
aiongg deeb91802f Lints: doc links, test lint allowances, struct update in tests, wildcard imports, dead code 2026-11-14 02:35:35 +00:00
aiongg 577055bc34 Merge storytold main 3c59a2aa5 into craft-framework (sync 13 Nov)
202 upstream commits since 6cb00467a. Resolutions:
- craft-window, craft-platform: ours. Upstream's frame policy v2, restore
  store and GNOME light/wait_first are the versions carried on 28 Oct;
  ours moved place() to craft-behavior and kept LayoutWatch and the
  appearance/portal.rs split.
- craft-timeline: ours. craft-time (crates/time) lands as upstream wrote
  it and is not yet used by craft-timeline.
- Old crates/ui modules stay removed. Upstream's frosted backdrops, shape
  gallery, dialog tabs and the iconic flyout top-edge rendering are not
  carried. The #1094 model half is in craft-behavior's dock:
  Group::flyout_offset and Action::MoveFlyoutTop.
- craft-update: #586 Save and Update, the install probe on the check
  thread and quiet per-user MSI self-updates, carried into updater.rs,
  stack_dialogs.rs, install/windows.rs and self_update/helper.rs.
- craft-jpeg: progressive Huffman decoding, carried into huffman.rs,
  parse.rs and scan.rs.
- craft-print: the driver settings dialog's new tests and the bounded
  XML parse's tests, as trials.
- Test-only conflicts: upstream tests from before the base that our side
  cut stay cut; tests new upstream are kept.
2026-11-13 17:11:48 +00:00
Dylan M. Taylor 344dbef231 Test SVG preflight limits and classify bad embedded SVG 2026-11-13 09:31:49 -05:00
Dylan M. Taylor 3eae15e8ec Expose bounded unitless SVG viewport metadata 2026-11-13 09:31:49 -05:00
Dylan M. Taylor 330280203c Reuse bounded preflight for embedded SVG 2026-11-13 09:31:49 -05:00
Dylan M. Taylor 81bd633c7f Expose checked SVG preflight and viewport rewrite 2026-11-13 09:31:49 -05:00
Dylan M. Taylor c5fae05a5a Merge remote-tracking branch 'upstream/main' into codex/craft-svg-photo-1171-sync
# Conflicts:
#	Cargo.lock
2026-11-13 08:55:10 -05:00
Dylan M. Taylor b5dfdb0bda Fix shared file import edge cases 2026-11-13 07:50:09 -05:00
Dylan M. Taylor f4f48a9ac2 Make open clip fixtures explicitly stroked 2026-11-13 07:36:18 -05:00
Dylan M. Taylor ee548f530c Avoid unused fill contour flag 2026-11-13 07:36:18 -05:00
Dylan M. Taylor 2a8bb6a4e3 Harden neutral vector import and shared output 2026-11-13 07:36:18 -05:00
Dylan M. Taylor 62e2328905 Add shared neutral file import and writer registry 2026-11-13 07:36:18 -05:00
Dylan M. Taylor 59c52ac1dc Merge pull request #1174 from dylanmtaylor/codex/vector-file-imports
Add shared vector path import APIs
2026-11-13 07:35:46 -05:00
Dylan M. Taylor a07481b416 Bound EXR pixel area and SVG image recursion 2026-11-13 06:27:24 -05:00
Dylan M. Taylor 365bf47db6 Expose bounded SVG root dimensions 2026-11-13 06:08:48 -05:00
Dylan M. Taylor dec78a5c40 Split SVG source and expanded-tree depth limits 2026-11-13 06:01:21 -05:00
Dylan M. Taylor 490884beec Add shared SVG subtree render handles 2026-11-13 05:48:22 -05:00
Dylan M. Taylor 4546555126 Fix bounds and limits in shared vector readers 2026-11-13 05:42:34 -05:00
Dylan M. Taylor 435f093b58 Preserve SVG gradients and fallback metadata 2026-11-13 05:41:23 -05:00
Dylan M. Taylor 75d2aeaf17 Expose neutral SVG vector document 2026-11-13 05:41:23 -05:00