1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
//! Scroll interaction for scroll containers — scrollbar hit testing
//! and thumb drag, keyboard scrolling, drag-autoscroll, and caret /
//! node reveal.
//!
//! Companion to `render::paint_pass::scrollbar` (which paints the
//! track + thumb). Hit-testing and drag share the same geometry math
//! from that module so click targets match what's rendered.
//!
//! Split by concern; this file keeps the shared [`ScrollAxis`] and the
//! re-exports, so callers keep addressing `runtime::scrollbar::*`:
//!
//! - `hit.rs` — scrollbar hit testing: `hit`, [`ScrollbarHit`],
//! [`ScrollbarPart`].
//! - `drag.rs` — `mousedown` → page or thumb-drag session
//! (`handle_mousedown`, `extend_drag`, `end_drag`,
//! `ScrollbarDrag` on the router).
//! - `keys.rs` — keyboard scrolling of the focused scroll container
//! (`handle_scroll_key`) and its focus cue ([`SCROLL_FOCUS_ATTR`],
//! `scroll_focus_target`).
//! - `autoscroll.rs` — edge-zone autoscroll for captured drags
//! (`resolve_autoscroll_container`, `autoscroll_step_for`,
//! `autoscroll_step`).
//! - `into_view.rs` — `Element.scrollIntoView` over every scroll
//! container on the ancestor chain (`scroll_element_into_view`).
//! - `reveal.rs` — scroll the caret or a node's region into view
//! (`reveal_caret`, `service_caret_reveal`, `scroll_into_view`).
//! - `geometry.rs` — padding-box scroll metrics and scroll-container
//! predicates (`nearest_scroll_container`).
//! - `scroll.rs` — the scroll writers: clamp + `scroll` event.
//! - `painted.rs` — the offsets the last frame painted, so any offset
//! change repaints (`moved_since_paint`, `note_painted`).
//!
//! Hooks into `router::mouse`:
//!
//! - On `mousedown`: call `hit` to see if the click landed on a
//! scrollbar. If it did, `handle_mousedown` pages (track click) or
//! begins a drag (thumb click). Beginning a drag engages pointer
//! capture so subsequent mousemove/mouseup route back here.
//! - On `mousemove` while `router.scrollbar_drag` is set:
//! `extend_drag` adjusts the scroll offset proportionally to
//! the cursor's movement along the track.
//! - On `mouseup`: the router's existing pointer-capture release
//! auto-triggers. `end_drag` clears the drag record.
pub
pub use ;
pub use ;
pub use hit;
pub use ;
pub use scroll_element_into_view;
pub use SCROLL_FOCUS_ATTR;
pub use ;
pub use ;
pub use ;
pub use ;
/// Which scrollbar axis a user is interacting with.