MakeSense for GitHub — Make Sense of Any GitHub PR, with full cognitive coverage of every change.
wailsapp/wails#5856 — 1 file, 8 review comments
Implement Custom Zoom Animation for macOS WebviewWindow
Overview
A custom window zoom animation is implemented for `WebviewWindow` on macOS. This replaces AppKit's default animation for `WKWebView` content. It aims for smoother, more responsive resizing.
Technical Highlights
v3/pkg/application/webview_window_darwin.m: Overrides `NSWindow`'s `zoom:` method with `NSTimer`-driven frame interpolation. Introduces state flags (`preparingZoomAnimationTarget`, `applyingZoomAnimationFrame`) to manage animation flow.
v3/pkg/application/webview_window_darwin.m: Respects 'Reduce motion' system setting, falling back to instant frame change. Cleans up animation timers in `setFrame:`, `close`, and `dealloc` to prevent resource leaks.
Impact
Functionality: Provides a smoother, more responsive resizing experience for `WKWebView` content on macOS.
Risk: Custom animation logic requires careful state management to avoid conflicts with AppKit's internal window management.
Files reviewed
- v3/pkg/application/webview_window_darwin.m — 8 comment(s)
View the full interactive review (JavaScript required).