Skip to content

fix: make webContents.centerSelection() work on Windows and Linux - #55915

Merged
jkleinsc merged 3 commits into
45-x-yfrom
trop/45-x-y-bp-fix-make-webcontents-centerselection-work-on-windows-and-linux-1795017624315
Nov 18, 2026
Merged

jkleinsc merged 3 commits into
45-x-yfrom
trop/45-x-y-bp-fix-make-webcontents-centerselection-work-on-windows-and-linux-1795017624315

Conversation

@trop

@trop trop Bot commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Backport of #55909

See that PR for details.

Notes: Fixed webContents.centerSelection() so that it works on Windows and Linux.

@trop
trop Bot requested a review from a team as a code owner November 18, 2026 16:01
@trop trop Bot added 45-x-y backport This is a backport PR semver/patch backwards-compatible bug fixes labels Nov 18, 2026

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review found no issues

No high-confidence issues detected in this change.

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review found no issues

No high-confidence issues detected in this change.

trop Bot and others added 3 commits November 18, 2026 18:44
Wait until the middle of the selection is within tolerance of the middle
of the viewport instead of until the page has scrolled at all, and say
why we wait: centerSelection() reaches the renderer asynchronously, but
the scroll itself (RevealSelection -> ScrollRectToVisible) is instant
since the page does not use CSS smooth scrolling.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01KX1hkNiiBq2fQEsXWusxpm

Co-authored-by: Claude <[email protected]>
@dsanders11
dsanders11 force-pushed the trop/45-x-y-bp-fix-make-webcontents-centerselection-work-on-windows-and-linux-1795017624315 branch from d6934b0 to a5c2d85 Compare November 18, 2026 19:30

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review found no issues

No high-confidence issues detected in this change.

@jkleinsc
jkleinsc enabled auto-merge (squash) November 18, 2026 21:55
@jkleinsc
jkleinsc merged commit 5238308 into 45-x-y Nov 18, 2026
72 checks passed
@jkleinsc
jkleinsc deleted the trop/45-x-y-bp-fix-make-webcontents-centerselection-work-on-windows-and-linux-1795017624315 branch November 18, 2026 22:07
@release-clerk

release-clerk Bot commented Nov 18, 2026

Copy link
Copy Markdown

Release Notes Persisted

Fixed webContents.centerSelection() so that it works on Windows and Linux.

claude Bot pushed a commit that referenced this pull request Nov 18, 2026
Brings in fix_allow_webcontentsimpl_centerselection_on_all_platforms.patch
(#55915), appended to patches/chromium/.patches after this branch's
cherry-picks. None of the cherry-picks touch web_contents_impl.cc, so the
patch applies unchanged at its new position.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NayLZhuZckr4ZNSG5nC8SV
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

45-x-y backport This is a backport PR semver/patch backwards-compatible bug fixes

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants