Skip to content

Fix fullscreen in Chromium release builds - #2066

Merged
svillar merged 1 commit into
mainfrom
chromium_fullscreen_minify
Sep 2, 2026
Merged

Fix fullscreen in Chromium release builds#2066
svillar merged 1 commit into
mainfrom
chromium_fullscreen_minify

Conversation

@svillar

@svillar svillar commented Sep 2, 2026

Copy link
Copy Markdown
Member

The actual fix is just the second commit but we're including the first one (part of another PR) because otherwise there would be conflicts in the proguard rules file.

Fixes #2047

@svillar svillar added this to the v1.9.1 milestone Sep 2, 2026
@svillar svillar added the release_candidate PR that should be part of the next release label Sep 2, 2026
Minification was never enabled for Chromium builds, among other things,
because video fullscreen (YouTube, Vimeo...) didn't work. No error was
shown but clicking on the fullscreen buttons didn't just work.

The problem was that TabImpl object holds a private TabWebContentsDelegate
which is written once but never read. Chromium keeps only a weak global
ref to that Java object, so this field is the only thing keeping it
alive. R8's optimizer removes write-only fields, so the delegate gets
garbage collected, and from then on
WebContentsDelegateAndroid::EnterFullscreenModeForTab finds a dead weak
ref and returns without calling Java.

That bail out return no exception and no log is recorded. The
requestFullscreen() promise just hangs forever, that's the reason why
nothing was fullscreen'ed.

The problem was actually worst as not only the delegate was removed, so
it was the WebContents observer for example which is crucial for
interacting with web content.

Fixes #2047
@svillar
svillar force-pushed the chromium_fullscreen_minify branch from 2bbe5a9 to 68ee3f0 Compare September 2, 2026 14:16
@svillar
svillar merged commit ad24a43 into main Sep 2, 2026
22 checks passed
@svillar
svillar deleted the chromium_fullscreen_minify branch September 2, 2026 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release_candidate PR that should be part of the next release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Video fullscreen never engages in release builds (chromium m144)

2 participants