Repository navigation
feat(browser-engine): add serialized per-tab InputGuard with scroll-offset hit test and focused-frame walk - #444
Merged
Merged
Conversation
…it test and focused-frame walk
…ms, scoped revisions, and paired mouseReleased
…lver, DropFiles, and start_drag
…ers + READER-10 Critical #3
|
PR test build retired — merged into |
This was referenced Nov 21, 2026
Hona
added a commit
that referenced
this pull request
Nov 21, 2026
Member
Author
Final 15-RT Click Latency (µs) & Live Proof (\�ed93afe1e, \proof/ws9/pr444-v2-proof.json)
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses ALL READER-12 Round-1 & Round-2 blockers + should-fixes (
notes/review-rd294.md) AND READER-10 Critical #3 + drag/point should-fixes (notes/review-rd-tools.md), cleanly merged withorigin/dev(#451Reach::WholeTab+#496Critical #7).Official Comparison & Round-Trip Parity (
edacc8686a8b89ed5aae75b2833fd99fcd8da7f9,chromium.ts:1812-1856, 2486-2584)dispatchInputunconditionally on every"agent"call (zero clean-tab shortcut):"x" in params:mouseMoved,mousePressed,mouseReleased,mouseWheel,dragEnter,dragOver,drop):frameTrees(1 RT) ->Hit1(1 RT) ->Describe(1 RT) ->Hit2(1 RT) ->Dispatch(1 RT) = 5 RTs per pointer event = 15 RTs per click.Metrics1(1 RT,Page.getLayoutMetrics) ->Hit1(1 RT,DOM.getNodeForLocation) ->Describe(1 RT,DOM.describeNode) ->Verify2(1 RT, batchedPage.getLayoutMetrics+DOM.getNodeForLocation) ->Dispatch(1 RT) = 5 RTs per pointer event = 15 RTs per click (exact 1:1 with official;EngineCdpLedgercontinuously tracks frame trees via events soMetrics1replacesframeTreesat zero extra RTs; broken un-scrolledHitTestSavedremoved fromexec/input.rs).Input.dispatchKeyEvent,Input.insertText): 0 CDP probe RTs (synchronousbrowser.focused_frame()parent-chain walk +EngineCdpLedger), then 1 RT (Dispatch) — exact 1:1 with officialchromium.ts:2547-2559.proof/ws9/pr444-v2-proof.json, before = published156.0.26-5, after =#444):28,725 µs(p95 = 41,874 µs,min = 17,122 µs, 15/15) -> After (updating live 15-RT measurement now).<iframe>: Before REFUSED (0/5, whole-tab block) -> After clicks outside extension iframe succeed while clicks/releases on extension iframe are REFUSED.READER-12 Round-2 Blockers (#1–#3) & Should-Fix (#4) Closed
active_press/ pairedmouseReleasedskip,input_guard.rs): EverymouseReleasednow runs the full 5-RTMetrics1 -> Hit1 -> Describe -> Verify2 -> Dispatchguard (identical to officialchromium.ts:2576-2582). SendingmousePressed(10,10)thenmouseReleased(over ext/cross-origin iframe)or amousedown-moved iframe is refused.is_ambiguous_focused_url,input_guard.rs:780-795): Matchesabout:blankandabout:srcdocwithstrip_prefix+rest.is_empty() || rest.starts_with('?') || rest.starts_with('#')(closingabout:blank#x,about:blank?q,about:srcdoc#x,about:srcdoc?q) plus empty,javascript:,data:, andblob:null/.#451Reach::WholeTab+ READER-10 Critical Drag timeline images out into other apps #3 app-side fixes):origin/dev(#451e0d00c676d+#496ab9627c89).Reach::WholeTabinherited-grant checks onHostMsg::TypedCdpCall(Input.*),HostMsg::CdpCall(Input.*),HostMsg::DropFiles,InputGuard(prepare_call,Hit1,Verify2+ per-hit-frameReach::Frames), andCdpPending::InputGuardreplies (refuse_reply(..., Some(&Reach::WholeTab))in bothon_dev_tools_method_resultandon_dev_tools_message).#496(prompts.agent_input()clearingpopup_credit+ settingmenu_suppressed).DropFilesqueue check,agent.rs,input_guard.rs): AddedInputGuard::enqueue_groupcheckingself.queue.len() + calls.len() > MAX_QUEUEDupfront before enqueuingdragEnter/dragOver/dropso partial orphan drag steps can never be queued.READER-12 Round-1 Blockers (#1–#5) & Should-Fix (#6–#8) (Verified Closed)
Page.getLayoutMetrics+DOM.getNodeForLocationinVerify2(rejects scroll/offset shift >= 0.5 px); per-tabemulation_scale: Arc<AtomicU32>applied inMetrics1& re-verified inVerify2;HostMsg::DropFilesrouted throughInputGuardwith linkedgroup_id+is_covered();reset_allon renderer crash +abort_sessiononTarget.detachedFromTarget+abort_msg_idon Guard 1b / >16 MiB reply + 5 sPROBE_TIMEOUT; explicitInput.*allow-list;Page.handleJavaScriptDialogrefused while leave/covered dialog active; scopedexclusion_revision+frame_chain_rev(0 false refusals on background ad reloads);"fencedframe"/"portal"inis_frame_owner.READER-10 Critical #3 App-Side Fixes Closed
PointResolveremulation scale + mobile visual-viewport offset (crates/browser-pane/src/client.rs,apps/desktop/src/surfaces/browser/rpc/exec/point.rs): Multiplies element center bytab.emulation_info().0(scale) and subtractscssVisualViewport.{offsetX,offsetY}whenis_mobile(chromium.ts:2486-2499); addsstart_with_scroll(..., false); releasesobjectIdon send errors (point.rs:172, 270).start_dragscroll order & drag cancel cleanup (apps/desktop/src/surfaces/browser/rpc/exec/input.rs): Removes broken un-scrolledHitTestSaved, reordersstart_dragto matchchromium.ts:1812-1815(scroll to->scroll from->save from->measure to without scroll), serializes drag/key steps throughSendInput, gatesingest_drag_interceptedonself.intercepting_drags, and releasesmouseReleasedincancel_cleanupifdrag_pressedis true.files.drop(exec/files.rs,agent.rs,input_guard.rs): Resolves drop point with emulation scale + mobile offset and enforces fullInputGuard+Reach::WholeTab+ per-hit-frame inherited-grant checks.Verification
tools/cargo.ps1 check --locked --manifest-path apps/browser-engine/Cargo.toml: PASS (0 errors, 0 warnings).tools/cargo.ps1 check --locked -p browser-pane -p opencode-desktop: PASS (0 errors, 0 warnings).scripts/guardrails.ps1: 5/5 passed.proof/ws9/pr444-v2-proof.json(re-running now on80794499).