Skip to content

feat(macos): add CEF support to setPageZoom/getPageZoom#370

Open
COCPORN wants to merge 1 commit intoblackboardsh:mainfrom
COCPORN:feat/cef-page-zoom
Open

feat(macos): add CEF support to setPageZoom/getPageZoom#370
COCPORN wants to merge 1 commit intoblackboardsh:mainfrom
COCPORN:feat/cef-page-zoom

Conversation

@COCPORN
Copy link
Copy Markdown

@COCPORN COCPORN commented Apr 8, 2026

Summary

  • webviewSetPageZoom and webviewGetPageZoom only handled WKWebView, silently doing nothing for CEF views
  • Adds CEF zoom via browser->GetHost()->SetZoomLevel()/GetZoomLevel() with linear-to-logarithmic conversion so the JS API stays consistent across renderers (1.0 = 100%, 1.5 = 150%, etc.)

Test plan

  • Verified CMD+=/CMD- zoom in/out works on CEF BrowserWindow
  • Verified CMD+0 resets to 100%
  • Verified zoom bounds (0.5x–2.0x) are respected
  • Verified no regression for WKWebView zoom

🤖 Generated with Claude Code

Previously these functions only handled WKWebView, silently doing nothing
for CEF views. Converts between the linear zoom API (1.0 = 100%) and
CEF's logarithmic scale (log base 1.2).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants