Skip to content

fix: step DevTools zoom through blink's preset zoom factors - #54349

Merged
MarshallOfSound merged 2 commits into
mainfrom
fix/devtools-zoom-presets
Sep 25, 2026
Merged

MarshallOfSound merged 2 commits into
mainfrom
fix/devtools-zoom-presets

Conversation

@MarshallOfSound

@MarshallOfSound MarshallOfSound commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

Description of Change

DevTools zoom in/out kept its own copy of the browser zoom table, which had drifted from blink::kPresetBrowserZoomFactors (no 80% step, rounded 33%/67% entries) and only moved when the stored level exactly matched a table entry. Step through the blink table to the nearest neighbouring preset instead, comparing factors so a level stored from the old rounded entries still counts as the 1/3 / 2/3 preset. Adds a spec that steps DevTools zoom in and out.

Checklist

Release Notes

Notes: DevTools zoom in/out now uses the same zoom steps as Chromium.

@MarshallOfSound MarshallOfSound added semver/patch backwards-compatible bug fixes target/44-x-y PR should also be added to the "44-x-y" branch. target/45-x-y PR should also be added to the "45-x-y" branch. labels Sep 25, 2026
@MarshallOfSound MarshallOfSound self-assigned this Sep 25, 2026
GetNextZoomLevel() kept its own copy of the browser zoom table, which
had drifted from blink::kPresetBrowserZoomFactors (no 80% step, rounded
33%/67% values) and only moved when the stored level exactly matched an
entry. Use the blink table and step to the nearest neighbouring preset
so zooming also works from a level that is not in the table.
A level persisted from the old table's rounded 0.333 / 0.666 entries is a
hair below the 1/3 / 2/3 preset in level space, so the first zoom-in from it
was an invisible step. Compare factors with blink::ZoomValuesEqual instead.
@MarshallOfSound
MarshallOfSound force-pushed the fix/devtools-zoom-presets branch from d63c804 to 5e9b2f7 Compare September 25, 2026 10:30
@MarshallOfSound
MarshallOfSound merged commit 0ae1a02 into main Sep 25, 2026
70 of 72 checks passed
@MarshallOfSound
MarshallOfSound deleted the fix/devtools-zoom-presets branch September 25, 2026 16:08
@release-clerk

release-clerk Bot commented Sep 25, 2026

Copy link
Copy Markdown

Release Notes Persisted

DevTools zoom in/out now uses the same zoom steps as Chromium.

@trop

trop Bot commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

I have automatically backported this PR to "44-x-y", please check out #54387

@trop

trop Bot commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

I have automatically backported this PR to "45-x-y", please check out #54388

@trop trop Bot added in-flight/44-x-y in-flight/45-x-y merged/44-x-y PR was merged to the "44-x-y" branch. merged/45-x-y PR was merged to the "45-x-y" branch. and removed target/44-x-y PR should also be added to the "44-x-y" branch. target/45-x-y PR should also be added to the "45-x-y" branch. in-flight/44-x-y in-flight/45-x-y labels Sep 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

46-x-y merged/44-x-y PR was merged to the "44-x-y" branch. merged/45-x-y PR was merged to the "45-x-y" branch. semver/patch backwards-compatible bug fixes

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants