001Notes
Protecting User Actions and Physical Devices
On this page14
How the fork protects selection, context menus, keyboard defaults, clipboard, drag data, camera, microphone, location, and display capture.
Article details
- Status
- Building Publicly
- Subcategory
- Hardened Chromium
- Last reviewed
- 7 Sept 2026
14 sections
The stock event contract
Selection is enforced below CSS and events
| Hook | Hardened behavior |
|---|---|
ComputedStyle::UsedUserSelect | Treats content as selectable text; preserves the more permissive user-select: all |
ComputedStyle::IsSelectable | Returns true even for inert or author-disabled content |
FrameSelection | Dispatches selectstart but ignores its cancellation for the native selection path |
SelectionController | Applies the same rule to mouse/touch selection and permits touch multi-click selection |
EventHandler | Runs selection handling after a trusted left press even when the page handled the press |
GestureManager | Keeps touch selection from being suppressed by canceled synthesized pointer/mouse events |
sequenceDiagram
participant U as User
participant I as Blink input dispatch
participant P as Page handler
participant S as Native selection
U->>I: Mouse/touch press
I->>P: pointerdown / mousedown / selectstart
P-->>I: preventDefault()
I->>S: Continue protected selection
S-->>U: Rendered DOM text selected
Context menus and native keyboard defaults
Clipboard: one real action and one page-facing facade
flowchart TD
Shortcut[Trusted copy/cut/paste shortcut] --> Snapshot[Protect target and selection]
Snapshot --> OS[Browser-owned system clipboard operation]
Snapshot --> DOM[Dispatch page-visible clipboard event]
DOM --> Isolated[Isolated DataTransfer payload]
Script[navigator.clipboard calls] --> Virtual[Page-facing virtual clipboard]
Virtual -. no direct write .-> OS
Native drag data survives page handlers
What sites expect from media devices
sequenceDiagram
participant W as Website
participant P as Chrome permission UI
participant R as Exact-origin/profile policy
participant M as Content MediaDevicesManager
participant F as Composite capture factory
participant D as Real or private device
W->>P: getUserMedia(constraints)
P->>R: Resolve camera/microphone source
P-->>W: User still chooses Allow or Block
P->>M: Allowed request + source preference
M->>F: Selected descriptor
F->>D: Open platform, OBS, loop, or synthetic source
D-->>W: MediaStreamTrack