Skip to content

WebView: revert background-colour patches (experimental)#31

Closed
jakepenn wants to merge 4 commits into
minimal_masterfrom
webview-revert-bg-color-experiments
Closed

WebView: revert background-colour patches (experimental)#31
jakepenn wants to merge 4 commits into
minimal_masterfrom
webview-revert-bg-color-experiments

Conversation

@jakepenn

Copy link
Copy Markdown
Member

Summary

Reverts the four Minimal patches that customise WebView background painting on macOS/iOS and Windows. Purpose: validate whether the white-flash fixes were actually necessary, and isolate them as the cause of monitor-dependent pixelation we're now seeing in the Memory Rites player on macOS (high-DPI WKWebView content rasterising at 1x when the host window moves between displays with different + "backingScaleFactor" + ).

Reverts, newest first:

  • + "a8b2868" + — WebView (Windows): suppress background flash on creation and hide/show
  • + "fe88d6d" + — WebView (Windows): pre-seed renderer background colour via CLI switch
  • + "5575dec" + — WebView (macOS/iOS): set drawsBackground on WebView, not config
  • + "bdddb16" + — WebView (macOS/iOS): expose AppleWkWebView::withBackgroundColour

Expected consequences

  • macOS/iOS: The transparent-WKWebView trick goes away. WKWebView renders against its default opaque background again. The white/grey flash on first reveal will likely return until we ship a different fix.
  • Windows: The renderer's default background colour falls back to chromium's white default, and the host HWND class brush goes back to the JUCE default. Startup/hide-show flashes will likely return.
  • API surface: + "AppleWkWebView::withBackgroundColour" + / + "getBackgroundColour" + are removed by the + "bdddb16" + revert. Any caller in + "minimal_core" + will fail to compile until updated — there's one call site in + "lib/managers/web_bridge/MKUEmbeddedWebView.cpp" + that needs to be dropped in a follow-up commit alongside the submodule bump.

Test plan

  • Build Memory Rites on macOS with this branch pinned and confirm the webview is no longer pixelated on Retina displays / when dragging across monitors
  • Build on Windows and confirm WebView2 startup still works (cosmetic flash expected)
  • If pixelation goes away, design a non-regressing fix for the flash (likely a + "viewDidChangeBackingProperties" + override on the WKWebView subclass to keep + "layer.contentsScale" + in sync with the window's backing factor)

🤖 Generated with Claude Code

@jakepenn

Copy link
Copy Markdown
Member Author

Reverting isn't the right path — adding a targeted viewDidChangeBackingProperties override on top of the existing patches instead. New PR incoming.

@jakepenn jakepenn closed this May 26, 2026
@jakepenn jakepenn deleted the webview-revert-bg-color-experiments branch May 26, 2026 19:30
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.

1 participant