From 39e1b2f56ac0f5818ad961b456dd35aa04f7fba2 Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Wed, 18 Nov 2026 05:03:08 -0500 Subject: [PATCH] combine pdf-canvas-fw: the auto-scroll mark's look moved to style::paint (pdf-canvas-w2); point cx.rs (pdf-chrome-w3) and draw.rs at it Co-Authored-By: Claude Opus 5.5 --- Cargo.lock | 60 +++++++++++++---------- crates/ui-contract/src/primitives/draw.rs | 2 +- crates/ui-contract/src/style/cx.rs | 4 +- 3 files changed, 38 insertions(+), 28 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 869923850a..45c790acac 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -476,7 +476,7 @@ dependencies = [ "futures-lite", "parking", "polling", - "rustix 1.1.5", + "rustix 1.1.6", "slab", "windows-sys 0.61.2", ] @@ -507,7 +507,7 @@ dependencies = [ "cfg-if", "event-listener", "futures-lite", - "rustix 1.1.5", + "rustix 1.1.6", ] [[package]] @@ -533,7 +533,7 @@ dependencies = [ "cfg-if", "futures-core", "futures-io", - "rustix 1.1.5", + "rustix 1.1.6", "signal-hook-registry", "slab", "windows-sys 0.61.2", @@ -1182,7 +1182,7 @@ dependencies = [ "io-lifetimes 3.0.1", "ipnet", "maybe-owned", - "rustix 1.1.5", + "rustix 1.1.6", "rustix-linux-procfs", "windows-sys 0.61.2", "winx", @@ -1979,7 +1979,7 @@ dependencies = [ name = "craft-atomic" version = "0.1.0" dependencies = [ - "rustix 1.1.5", + "rustix 1.1.6", ] [[package]] @@ -2022,6 +2022,7 @@ dependencies = [ "sha2 0.10.9", "tempfile", "thiserror 2.0.21", + "web-time", ] [[package]] @@ -3374,6 +3375,7 @@ dependencies = [ "wasm-bindgen-test", "web-sys", "web-time", + "windows", "wl-clipboard-rs", "x11rb", "xcap", @@ -3522,6 +3524,8 @@ dependencies = [ "egui", "objc2 0.6.5", "objc2-app-kit 0.3.2", + "wasm-bindgen", + "web-sys", ] [[package]] @@ -3627,6 +3631,7 @@ dependencies = [ "tempfile", "toml", "toml_edit", + "web-sys", "web-time", ] @@ -3990,6 +3995,7 @@ dependencies = [ "smallvec", "syn 2.0.119", "toml", + "wasm-bindgen-futures", "web-time", ] @@ -4121,12 +4127,14 @@ dependencies = [ "craft-host", "craft-i18n", "craft-keymap", + "craft-svg", "craft-theme", "craft-ui-contract", "craft-ui-macros", "craft-ui-test-kit", "craft-ui-widgets", "egui", + "log", "serde", "smallvec", ] @@ -4145,7 +4153,7 @@ dependencies = [ "image", "log", "plist", - "rustix 1.1.5", + "rustix 1.1.6", "semver", "serde", "serde_json", @@ -4224,7 +4232,9 @@ name = "craft-web-host" version = "0.1.0" dependencies = [ "craft-host", + "craft-platform", "wasm-bindgen", + "wasm-bindgen-futures", "wasm-bindgen-test", "web-sys", ] @@ -4954,7 +4964,7 @@ dependencies = [ "drm-ffi", "drm-fourcc", "libc", - "rustix 1.1.5", + "rustix 1.1.6", ] [[package]] @@ -4964,7 +4974,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "51a91c9b32ac4e8105dec255e849e0d66e27d7c34d184364fb93e469db08f690" dependencies = [ "drm-sys", - "rustix 1.1.5", + "rustix 1.1.6", ] [[package]] @@ -5867,7 +5877,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94e7099f6313ecacbe1256e8ff9d617b75d1bcb16a6fddef94866d225a01a14a" dependencies = [ "io-lifetimes 2.0.4", - "rustix 1.1.5", + "rustix 1.1.6", "windows-sys 0.59.0", ] @@ -6105,7 +6115,7 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bd49230192a3797a9a4d6abe9b3eed6f7fa4c8a8a4947977c6f80025f92cbd8" dependencies = [ - "rustix 1.1.5", + "rustix 1.1.6", "windows-link", ] @@ -7774,7 +7784,7 @@ dependencies = [ "libc", "libspa-sys", "nom 8.0.0", - "rustix 1.1.5", + "rustix 1.1.6", "system-deps", ] @@ -7813,7 +7823,7 @@ dependencies = [ "image", "khronos-egl", "memmap2", - "rustix 1.1.5", + "rustix 1.1.6", "thiserror 2.0.21", "tracing", "wayland-backend", @@ -9479,7 +9489,7 @@ dependencies = [ "libspa", "libspa-sys", "pipewire-sys", - "rustix 1.1.5", + "rustix 1.1.6", ] [[package]] @@ -9610,7 +9620,7 @@ dependencies = [ "concurrent-queue", "hermit-abi", "pin-project-lite", - "rustix 1.1.5", + "rustix 1.1.6", "windows-sys 0.61.2", ] @@ -10687,9 +10697,9 @@ dependencies = [ [[package]] name = "rustix" -version = "1.1.5" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "891efababe418670775f199f0d233d84843c227a0949a883ce15b37c78d6629d" +checksum = "e5e76742e5294153d4dde1207dbec5bdd81eef6fabdc0d2118babadabfd858aa" dependencies = [ "bitflags 2.13.2", "errno", @@ -10705,7 +10715,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2fc84bf7e9aa16c4f2c758f27412dc9841341e16aa682d9c7ac308fe3ee12056" dependencies = [ "once_cell", - "rustix 1.1.5", + "rustix 1.1.6", ] [[package]] @@ -12050,7 +12060,7 @@ dependencies = [ "fastrand", "getrandom 0.4.3", "once_cell", - "rustix 1.1.5", + "rustix 1.1.6", "windows-sys 0.61.2", ] @@ -13305,7 +13315,7 @@ checksum = "38a91b4eaddff87b1cd1074985e3713da4af2c49742d1b356b2c01670a67a078" dependencies = [ "cc", "downcast-rs", - "rustix 1.1.5", + "rustix 1.1.6", "scoped-tls", "smallvec", "wayland-sys", @@ -13318,7 +13328,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3c36a0f861ad76d0901f2800b46321410d9f73f2ea88aac0650d86c32688073" dependencies = [ "bitflags 2.13.2", - "rustix 1.1.5", + "rustix 1.1.6", "wayland-backend", "wayland-scanner", ] @@ -13367,7 +13377,7 @@ checksum = "0dde9c29be0f723a573977de51ee455bf3dfa03652730a74f9dd3b337e374d75" dependencies = [ "bitflags 2.13.2", "downcast-rs", - "rustix 1.1.5", + "rustix 1.1.6", "wayland-backend", "wayland-scanner", ] @@ -13983,7 +13993,7 @@ dependencies = [ "libc", "log", "os_pipe", - "rustix 1.1.5", + "rustix 1.1.6", "thiserror 2.0.21", "tree_magic_mini", "wayland-backend", @@ -14100,7 +14110,7 @@ dependencies = [ "libc", "libloading", "once_cell", - "rustix 1.1.5", + "rustix 1.1.6", "x11rb-protocol", ] @@ -14183,7 +14193,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32e45ad4206f6d2479085147f02bc2ef834ac85886624a23575ae137c8aa8156" dependencies = [ "libc", - "rustix 1.1.5", + "rustix 1.1.6", ] [[package]] @@ -14343,7 +14353,7 @@ dependencies = [ "hex", "libc", "ordered-stream", - "rustix 1.1.5", + "rustix 1.1.6", "serde", "serde_repr", "tracing", diff --git a/crates/ui-contract/src/primitives/draw.rs b/crates/ui-contract/src/primitives/draw.rs index f18f083d20..c3805480e3 100644 --- a/crates/ui-contract/src/primitives/draw.rs +++ b/crates/ui-contract/src/primitives/draw.rs @@ -410,7 +410,7 @@ impl<'a> Draw<'a> { } /// Paints the auto-scroll mark of `look` at `anchor`. - pub fn auto_scroll_mark(&self, look: &super::AutoScrollMarkLook, anchor: Pos2) { + pub fn auto_scroll_mark(&self, look: &crate::style::AutoScrollMarkLook, anchor: Pos2) { self.painter.extend(super::AutoScrollMark::shapes(look, anchor)); } diff --git a/crates/ui-contract/src/style/cx.rs b/crates/ui-contract/src/style/cx.rs index 9d39149660..bb83a5a113 100644 --- a/crates/ui-contract/src/style/cx.rs +++ b/crates/ui-contract/src/style/cx.rs @@ -3,12 +3,12 @@ use super::key::{EnvKey, Ink}; use super::look::{DataColor, FocusLook, StyleColor, SurfaceKind, SurfaceLook, TrackLook}; use super::paint::{ - HandleLook, MarkerLook, ResetMarkLook, RuleKind, RuleLook, ScrollBarLook, handle_look, marker_look, reset_mark_look, rule_look, scroll_bar_look, + AutoScrollMarkLook, HandleLook, MarkerLook, ResetMarkLook, RuleKind, RuleLook, ScrollBarLook, auto_scroll_mark_look, handle_look, marker_look, + reset_mark_look, rule_look, scroll_bar_look, }; use super::surface::{SurfaceStyle, surface_style}; use super::tokens::UiTokens; use crate::fonts::stack_facts; -use crate::primitives::{AutoScrollMarkLook, auto_scroll_mark_look}; use crate::runtime::env::{AppValues, Scale, StyleValue}; use crate::runtime::pass_state; use craft_behavior::ControlMetrics;