Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01KX1hkNiiBq2fQEsXWusxpm Co-authored-by: Claude <[email protected]>
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]>
There was a problem hiding this comment.
I reviewed this backport and didn't find any bugs. The new Chromium patch falls under the /patches/ CODEOWNERS entry, so a patch owner should still take a look.
What was reviewed (from a standalone clone, so none of the upstream Chromium source was available):
- The new patch only removes the
#if BUILDFLAG(IS_MAC)/#endifguard inWebContentsImpl::CenterSelection(). That matches its commit message, which includes an upstream CL link and says when the patch can be dropped. The patch is added topatches/chromium/.patches. - The new
centerSelection()spec needs OS focus and is taggedserial, as spec/CLAUDE.md requires. It uses vitest matchers and waits for the selection to be centred instead of reacting to the first scroll. - I couldn't check that the hunk applies to the pinned
web_contents_impl.ccor that the mojom/renderer path really is platform-neutral, because that code isn't in this checkout. I also didn't run the spec.
Extended reasoning...
The change adds one Chromium patch that removes a macOS-only build guard from WebContentsImpl::CenterSelection(), lists it in patches/chromium/.patches, and adds a serial-tagged spec in spec/api-web-contents.spec.ts. It touches no security-sensitive area (no IPC handlers, webPreferences, permissions or protocol handlers). It is small and matches its description. The deciding fact is that /patches/ is assigned to the patch-owners team in .github/CODEOWNERS, so I deferred instead of approving.
|
Release Notes Persisted
|
Backport of #55909
See that PR for details.
Notes: Fixed
webContents.centerSelection()so that it works on Windows and Linux.