detached 08629e9

Merge pull request #358 from bnema/fix/cef-canvas-background

fix(cef): keep browser canvas white, move anti-flash to presentation layer
commit
08629e9db8c0d3927d6b60bbac71329688bebd29
author
bnema · · 2026-07-22 05:43 UTC
committer
GitHub · · 2026-07-22 05:43 UTC
merge of
3b318d2 + 902c404 · diff against the first parent
signature
GPG UnverifiedB5690EEEBB952194 The key is unknown
80 files · +1985 -2004
M go.mod +1 -1
@@ -6,7 +6,7 @@ require (
66 github.com/a-h/templ v0.3.1020
77 github.com/andybalholm/brotli v1.2.2
88 github.com/bnema/purego v0.11.0-bnema.4
9- github.com/bnema/purego-cef v0.13.4
9+ github.com/bnema/purego-cef v0.14.1
1010 github.com/bnema/purego-cef2gtk v0.8.5
1111 github.com/bnema/purego-pipewire v0.1.5
1212 github.com/bnema/purego-sqlite v0.1.4
@@ -6,7 +6,7 @@ require (
6 github.com/a-h/templ v0.3.10206 github.com/a-h/templ v0.3.1020
7 github.com/andybalholm/brotli v1.2.27 github.com/andybalholm/brotli v1.2.2
8 github.com/bnema/purego v0.11.0-bnema.48 github.com/bnema/purego v0.11.0-bnema.4
9- github.com/bnema/purego-cef v0.13.49+ github.com/bnema/purego-cef v0.14.1
10 github.com/bnema/purego-cef2gtk v0.8.510 github.com/bnema/purego-cef2gtk v0.8.5
11 github.com/bnema/purego-pipewire v0.1.511 github.com/bnema/purego-pipewire v0.1.5
12 github.com/bnema/purego-sqlite v0.1.412 github.com/bnema/purego-sqlite v0.1.4
M go.sum +2 -2 generated file: collapsed
A internal/infrastructure/cef/background_guard.go +106 -0
@@ -0,0 +1,106 @@
1+package cef
2+
3+import (
4+ "fmt"
5+
6+ "github.com/bnema/puregotk/v4/gdk"
7+ "github.com/bnema/puregotk/v4/gtk"
8+)
9+
10+// opaqueWhiteBackground is Chromium's standard windowless canvas fallback. It is
11+// baked into every BrowserSettings.BackgroundColor so pages that paint nothing
12+// get an opaque white canvas (never a theme-dark one). A zero value must not be
13+// used: in windowless/OSR mode a zero-alpha background enables transparent
14+// painting, which this engine does not want.
15+const opaqueWhiteBackground uint32 = 0xFFFFFFFF
16+
17+// flashGuardCSSClassPrefix scopes each WebView's transient background provider to
18+// its own render widget so guards from different tabs never collide.
19+const flashGuardCSSClassPrefix = "dumber-cef-flash-guard-"
20+
21+// colorByteMask isolates a single 8-bit channel from a packed ARGB value.
22+const colorByteMask = 0xFF
23+
24+// applyBackgroundFlashGuard paints the theme background color behind the CEF
25+// render widget until the first frame is presented. It is the presentation-layer
26+// replacement for the former dark BrowserSettings.BackgroundColor: Chromium's
27+// canvas is now always opaque white, so the anti-white-flash lives here instead.
28+// The bridge widget (a GtkPicture/GtkGLArea) renders its CSS background until an
29+// opaque frame texture covers it, at which point markFirstFramePainted tears the
30+// guard down. Must run on the GTK main thread.
31+func (wv *WebView) applyBackgroundFlashGuard(widget *gtk.Widget) {
32+ if wv == nil || widget == nil {
33+ return
34+ }
35+ argb := wv.backgroundColor
36+ if argb == 0 {
37+ return // No theme color configured; nothing to guard against.
38+ }
39+ display := gdk.DisplayGetDefault()
40+ if display == nil {
41+ return
42+ }
43+
44+ a := float64((argb>>24)&colorByteMask) / colorScale
45+ r := (argb >> 16) & colorByteMask
46+ g := (argb >> 8) & colorByteMask
47+ b := argb & colorByteMask
48+ class := fmt.Sprintf("%s%d", flashGuardCSSClassPrefix, uint64(wv.id))
49+ css := fmt.Sprintf(".%s { background-color: rgba(%d, %d, %d, %.4f); }", class, r, g, b, a)
50+
51+ provider := gtk.NewCssProvider()
52+ if provider == nil {
53+ return
54+ }
55+ provider.LoadFromString(css)
56+
57+ wv.bgGuardMu.Lock()
58+ defer wv.bgGuardMu.Unlock()
59+ if wv.firstFramePainted.Load() {
60+ return // First frame already arrived before the guard could be installed.
61+ }
62+ widget.AddCssClass(class)
63+ gtk.StyleContextAddProviderForDisplay(display, provider, uint(gtk.STYLE_PROVIDER_PRIORITY_APPLICATION))
64+ wv.bgGuardProvider = provider
65+ wv.bgGuardWidget = widget
66+ wv.bgGuardClass = class
67+}
68+
69+// markFirstFramePainted records that the first CEF frame has been presented and
70+// schedules teardown of the background flash guard so later frames render
71+// normally. Safe to call from any thread and idempotent.
72+func (wv *WebView) markFirstFramePainted() {
73+ if wv == nil || !wv.firstFramePainted.CompareAndSwap(false, true) {
74+ return
75+ }
76+ wv.runOnGTK(func() {
77+ wv.removeBackgroundFlashGuard()
78+ })
79+}
80+
81+// removeBackgroundFlashGuard detaches the transient theme-background provider and
82+// clears the render widget's guard class. Must run on the GTK main thread. It is
83+// safe to call when no guard is installed.
84+func (wv *WebView) removeBackgroundFlashGuard() {
85+ if wv == nil {
86+ return
87+ }
88+ wv.bgGuardMu.Lock()
89+ provider := wv.bgGuardProvider
90+ widget := wv.bgGuardWidget
91+ class := wv.bgGuardClass
92+ wv.bgGuardProvider = nil
93+ wv.bgGuardWidget = nil
94+ wv.bgGuardClass = ""
95+ wv.bgGuardMu.Unlock()
96+
97+ if provider == nil {
98+ return
99+ }
100+ if widget != nil && class != "" {
101+ widget.RemoveCssClass(class)
102+ }
103+ if display := gdk.DisplayGetDefault(); display != nil {
104+ gtk.StyleContextRemoveProviderForDisplay(display, provider)
105+ }
106+}
@@ -0,0 +1,106 @@
1+package cef
2+
3+import (
4+ "fmt"
5+
6+ "github.com/bnema/puregotk/v4/gdk"
7+ "github.com/bnema/puregotk/v4/gtk"
8+)
9+
10+// opaqueWhiteBackground is Chromium's standard windowless canvas fallback. It is
11+// baked into every BrowserSettings.BackgroundColor so pages that paint nothing
12+// get an opaque white canvas (never a theme-dark one). A zero value must not be
13+// used: in windowless/OSR mode a zero-alpha background enables transparent
14+// painting, which this engine does not want.
15+const opaqueWhiteBackground uint32 = 0xFFFFFFFF
16+
17+// flashGuardCSSClassPrefix scopes each WebView's transient background provider to
18+// its own render widget so guards from different tabs never collide.
19+const flashGuardCSSClassPrefix = "dumber-cef-flash-guard-"
20+
21+// colorByteMask isolates a single 8-bit channel from a packed ARGB value.
22+const colorByteMask = 0xFF
23+
24+// applyBackgroundFlashGuard paints the theme background color behind the CEF
25+// render widget until the first frame is presented. It is the presentation-layer
26+// replacement for the former dark BrowserSettings.BackgroundColor: Chromium's
27+// canvas is now always opaque white, so the anti-white-flash lives here instead.
28+// The bridge widget (a GtkPicture/GtkGLArea) renders its CSS background until an
29+// opaque frame texture covers it, at which point markFirstFramePainted tears the
30+// guard down. Must run on the GTK main thread.
31+func (wv *WebView) applyBackgroundFlashGuard(widget *gtk.Widget) {
32+ if wv == nil || widget == nil {
33+ return
34+ }
35+ argb := wv.backgroundColor
36+ if argb == 0 {
37+ return // No theme color configured; nothing to guard against.
38+ }
39+ display := gdk.DisplayGetDefault()
40+ if display == nil {
41+ return
42+ }
43+
44+ a := float64((argb>>24)&colorByteMask) / colorScale
45+ r := (argb >> 16) & colorByteMask
46+ g := (argb >> 8) & colorByteMask
47+ b := argb & colorByteMask
48+ class := fmt.Sprintf("%s%d", flashGuardCSSClassPrefix, uint64(wv.id))
49+ css := fmt.Sprintf(".%s { background-color: rgba(%d, %d, %d, %.4f); }", class, r, g, b, a)
50+
51+ provider := gtk.NewCssProvider()
52+ if provider == nil {
53+ return
54+ }
55+ provider.LoadFromString(css)
56+
57+ wv.bgGuardMu.Lock()
58+ defer wv.bgGuardMu.Unlock()
59+ if wv.firstFramePainted.Load() {
60+ return // First frame already arrived before the guard could be installed.
61+ }
62+ widget.AddCssClass(class)
63+ gtk.StyleContextAddProviderForDisplay(display, provider, uint(gtk.STYLE_PROVIDER_PRIORITY_APPLICATION))
64+ wv.bgGuardProvider = provider
65+ wv.bgGuardWidget = widget
66+ wv.bgGuardClass = class
67+}
68+
69+// markFirstFramePainted records that the first CEF frame has been presented and
70+// schedules teardown of the background flash guard so later frames render
71+// normally. Safe to call from any thread and idempotent.
72+func (wv *WebView) markFirstFramePainted() {
73+ if wv == nil || !wv.firstFramePainted.CompareAndSwap(false, true) {
74+ return
75+ }
76+ wv.runOnGTK(func() {
77+ wv.removeBackgroundFlashGuard()
78+ })
79+}
80+
81+// removeBackgroundFlashGuard detaches the transient theme-background provider and
82+// clears the render widget's guard class. Must run on the GTK main thread. It is
83+// safe to call when no guard is installed.
84+func (wv *WebView) removeBackgroundFlashGuard() {
85+ if wv == nil {
86+ return
87+ }
88+ wv.bgGuardMu.Lock()
89+ provider := wv.bgGuardProvider
90+ widget := wv.bgGuardWidget
91+ class := wv.bgGuardClass
92+ wv.bgGuardProvider = nil
93+ wv.bgGuardWidget = nil
94+ wv.bgGuardClass = ""
95+ wv.bgGuardMu.Unlock()
96+
97+ if provider == nil {
98+ return
99+ }
100+ if widget != nil && class != "" {
101+ widget.RemoveCssClass(class)
102+ }
103+ if display := gdk.DisplayGetDefault(); display != nil {
104+ gtk.StyleContextRemoveProviderForDisplay(display, provider)
105+ }
106+}
M internal/infrastructure/cef/factory.go +12 -8
@@ -27,7 +27,7 @@ type WebViewFactory struct {
2727 windowlessFrameRate int32
2828 windowlessFrameRateMax int32
2929 inputConfig RuntimeInputConfig
30- bgColor atomic.Uint32 // packed ARGB for BrowserSettings.BackgroundColor
30+ bgColor atomic.Uint32 // packed ARGB theme color for the presentation-layer flash guard
3131 audioOutputFactory port.AudioOutputFactory
3232 }
3333
@@ -69,7 +69,9 @@ func newWebViewFactory(engine *Engine, opts webViewFactoryOptions) *WebViewFacto
6969 }
7070 }
7171
72-// setDefaultBackgroundColor stores a packed ARGB color for new browser creation.
72+// setDefaultBackgroundColor stores the packed ARGB theme color used by the
73+// presentation-layer flash guard on newly-created WebViews. It no longer feeds
74+// BrowserSettings.BackgroundColor, which is always opaque white.
7375 func (f *WebViewFactory) setDefaultBackgroundColor(r, g, b, a float64) {
7476 const s = colorScale
7577 argb := uint32(a*s)<<24 | uint32(r*s)<<16 | uint32(g*s)<<8 | uint32(b*s)
@@ -96,9 +98,9 @@ func (f *WebViewFactory) Create(ctx context.Context) (port.WebView, error) {
9698 settings := purecef.NewBrowserSettings()
9799 cef2gtk.ConfigureBrowserSettings(&settings, cef2gtk.BrowserSettingsOptions{WindowlessFrameRate: f.windowlessFrameRate})
98100 settings.LocalStorage = 1 // CEF_STATE_ENABLED
99- if bg := f.bgColor.Load(); bg != 0 {
100- settings.BackgroundColor = bg
101- }
101+ // Always opaque white: Chromium's standard canvas fallback. The theme
102+ // background is applied at the presentation layer as a flash guard instead.
103+ settings.BackgroundColor = opaqueWhiteBackground
102104
103105 // Defer browser creation until the bridge view has a non-zero size.
104106 // CEF requires GetViewRect to return a non-empty rect, but the GL area
@@ -142,6 +144,8 @@ func (f *WebViewFactory) newWebView(ctx context.Context) (*WebView, error) {
142144 wv.nativeWidget = popupRoot
143145 }
144146 }
147+ // Guard the render widget with the theme background until the first frame.
148+ wv.applyBackgroundFlashGuard(nativeWidget)
145149 })
146150 if !result.Completed() {
147151 wv.destroyViewBridgeOnGTKAsync()
@@ -383,9 +387,9 @@ func (f *WebViewFactory) CreateRelated(ctx context.Context, parentID port.WebVie
383387 settings := purecef.NewBrowserSettings()
384388 cef2gtk.ConfigureBrowserSettings(&settings, cef2gtk.BrowserSettingsOptions{WindowlessFrameRate: f.windowlessFrameRate})
385389 settings.LocalStorage = 1 // CEF_STATE_ENABLED
386- if bg := f.bgColor.Load(); bg != 0 {
387- settings.BackgroundColor = bg
388- }
390+ // Always opaque white: the theme background is applied as a presentation-layer
391+ // flash guard, not baked into Chromium's canvas.
392+ settings.BackgroundColor = opaqueWhiteBackground
389393
390394 if err := f.configureInitialBrowserCreation(ctx, popupWV, popupWV.client, &windowInfo, &settings, func(w, h int32) {
391395 f.handlePopupShellInitialResize(ctx, popupWV, func(w, h int32) {
@@ -27,7 +27,7 @@ type WebViewFactory struct {
27 windowlessFrameRate int3227 windowlessFrameRate int32
28 windowlessFrameRateMax int3228 windowlessFrameRateMax int32
29 inputConfig RuntimeInputConfig29 inputConfig RuntimeInputConfig
30- bgColor atomic.Uint32 // packed ARGB for BrowserSettings.BackgroundColor30+ bgColor atomic.Uint32 // packed ARGB theme color for the presentation-layer flash guard
31 audioOutputFactory port.AudioOutputFactory31 audioOutputFactory port.AudioOutputFactory
32 }32 }
33 33
@@ -69,7 +69,9 @@ func newWebViewFactory(engine *Engine, opts webViewFactoryOptions) *WebViewFacto
69 }69 }
70 }70 }
71 71
72-// setDefaultBackgroundColor stores a packed ARGB color for new browser creation.72+// setDefaultBackgroundColor stores the packed ARGB theme color used by the
73+// presentation-layer flash guard on newly-created WebViews. It no longer feeds
74+// BrowserSettings.BackgroundColor, which is always opaque white.
73 func (f *WebViewFactory) setDefaultBackgroundColor(r, g, b, a float64) {75 func (f *WebViewFactory) setDefaultBackgroundColor(r, g, b, a float64) {
74 const s = colorScale76 const s = colorScale
75 argb := uint32(a*s)<<24 | uint32(r*s)<<16 | uint32(g*s)<<8 | uint32(b*s)77 argb := uint32(a*s)<<24 | uint32(r*s)<<16 | uint32(g*s)<<8 | uint32(b*s)
@@ -96,9 +98,9 @@ func (f *WebViewFactory) Create(ctx context.Context) (port.WebView, error) {
96 settings := purecef.NewBrowserSettings()98 settings := purecef.NewBrowserSettings()
97 cef2gtk.ConfigureBrowserSettings(&settings, cef2gtk.BrowserSettingsOptions{WindowlessFrameRate: f.windowlessFrameRate})99 cef2gtk.ConfigureBrowserSettings(&settings, cef2gtk.BrowserSettingsOptions{WindowlessFrameRate: f.windowlessFrameRate})
98 settings.LocalStorage = 1 // CEF_STATE_ENABLED100 settings.LocalStorage = 1 // CEF_STATE_ENABLED
99- if bg := f.bgColor.Load(); bg != 0 {101+ // Always opaque white: Chromium's standard canvas fallback. The theme
100- settings.BackgroundColor = bg102+ // background is applied at the presentation layer as a flash guard instead.
101- }103+ settings.BackgroundColor = opaqueWhiteBackground
102 104
103 // Defer browser creation until the bridge view has a non-zero size.105 // Defer browser creation until the bridge view has a non-zero size.
104 // CEF requires GetViewRect to return a non-empty rect, but the GL area106 // CEF requires GetViewRect to return a non-empty rect, but the GL area
@@ -142,6 +144,8 @@ func (f *WebViewFactory) newWebView(ctx context.Context) (*WebView, error) {
142 wv.nativeWidget = popupRoot144 wv.nativeWidget = popupRoot
143 }145 }
144 }146 }
147+ // Guard the render widget with the theme background until the first frame.
148+ wv.applyBackgroundFlashGuard(nativeWidget)
145 })149 })
146 if !result.Completed() {150 if !result.Completed() {
147 wv.destroyViewBridgeOnGTKAsync()151 wv.destroyViewBridgeOnGTKAsync()
@@ -383,9 +387,9 @@ func (f *WebViewFactory) CreateRelated(ctx context.Context, parentID port.WebVie
383 settings := purecef.NewBrowserSettings()387 settings := purecef.NewBrowserSettings()
384 cef2gtk.ConfigureBrowserSettings(&settings, cef2gtk.BrowserSettingsOptions{WindowlessFrameRate: f.windowlessFrameRate})388 cef2gtk.ConfigureBrowserSettings(&settings, cef2gtk.BrowserSettingsOptions{WindowlessFrameRate: f.windowlessFrameRate})
385 settings.LocalStorage = 1 // CEF_STATE_ENABLED389 settings.LocalStorage = 1 // CEF_STATE_ENABLED
386- if bg := f.bgColor.Load(); bg != 0 {390+ // Always opaque white: the theme background is applied as a presentation-layer
387- settings.BackgroundColor = bg391+ // flash guard, not baked into Chromium's canvas.
388- }392+ settings.BackgroundColor = opaqueWhiteBackground
389 393
390 if err := f.configureInitialBrowserCreation(ctx, popupWV, popupWV.client, &windowInfo, &settings, func(w, h int32) {394 if err := f.configureInitialBrowserCreation(ctx, popupWV, popupWV.client, &windowInfo, &settings, func(w, h int32) {
391 f.handlePopupShellInitialResize(ctx, popupWV, func(w, h int32) {395 f.handlePopupShellInitialResize(ctx, popupWV, func(w, h int32) {
M internal/infrastructure/cef/render_handler_adapter.go +9 -0
@@ -51,6 +51,15 @@ func newDumberRenderHandler(wv *WebView) purecef.RenderHandler {
5151
5252 var unsupportedPaintOnce sync.Once
5353 hooks := startupPresentationHooks(activeStartupTrace())
54+ // Tear down the theme background flash guard once the first frame is
55+ // presented, without dropping the startup trace mark the bridge already set.
56+ firstAcceleratedPaint := hooks.OnFirstAcceleratedPaint
57+ hooks.OnFirstAcceleratedPaint = func() {
58+ if firstAcceleratedPaint != nil {
59+ firstAcceleratedPaint()
60+ }
61+ wv.markFirstFramePainted()
62+ }
5463 hooks.OnUnsupportedPaint = func() {
5564 unsupportedPaintOnce.Do(func() {
5665 if wv.ctx != nil {
@@ -51,6 +51,15 @@ func newDumberRenderHandler(wv *WebView) purecef.RenderHandler {
51 51
52 var unsupportedPaintOnce sync.Once52 var unsupportedPaintOnce sync.Once
53 hooks := startupPresentationHooks(activeStartupTrace())53 hooks := startupPresentationHooks(activeStartupTrace())
54+ // Tear down the theme background flash guard once the first frame is
55+ // presented, without dropping the startup trace mark the bridge already set.
56+ firstAcceleratedPaint := hooks.OnFirstAcceleratedPaint
57+ hooks.OnFirstAcceleratedPaint = func() {
58+ if firstAcceleratedPaint != nil {
59+ firstAcceleratedPaint()
60+ }
61+ wv.markFirstFramePainted()
62+ }
54 hooks.OnUnsupportedPaint = func() {63 hooks.OnUnsupportedPaint = func() {
55 unsupportedPaintOnce.Do(func() {64 unsupportedPaintOnce.Do(func() {
56 if wv.ctx != nil {65 if wv.ctx != nil {
M internal/infrastructure/cef/webview.go +20 -11
@@ -239,6 +239,18 @@ type WebView struct {
239239 backgroundColor uint32
240240 inputConfig RuntimeInputConfig
241241
242+ // Background flash guard: a theme-colored CSS provider painted behind the
243+ // render widget until the first CEF frame is presented. It replaces the
244+ // former dark BrowserSettings.BackgroundColor anti-white-flash, whose canvas
245+ // is now always opaque white. State is guarded by bgGuardMu; firstFramePainted
246+ // gates the one-shot teardown and resets naturally when a fresh WebView is
247+ // created after a browser recreation.
248+ firstFramePainted atomic.Bool
249+ bgGuardMu sync.Mutex
250+ bgGuardProvider *gtk.CssProvider
251+ bgGuardWidget *gtk.Widget
252+ bgGuardClass string
253+
242254 // Touchpad input diagnostics are debounced to avoid flooding logs while
243255 // debugging continuous scroll streams.
244256 touchpadNavigation *touchpadNavigationRecognizer
@@ -992,7 +1004,7 @@ func (wv *WebView) prepareNativePopup(
9921004 prep.parent.trackPendingNativePopup(popupID, wv)
9931005 }
9941006
995- configureNativePopupWindow(windowInfo, settings, prep.frameRate, prep.backgroundColor)
1007+ configureNativePopupWindow(windowInfo, settings, prep.frameRate)
9961008 clientSlot.Set(client)
9971009 return true
9981010 }
@@ -1007,9 +1019,8 @@ func (wv *WebView) nativePopupPreparationSnapshot() (nativePopupPreparation, boo
10071019 return nativePopupPreparation{}, false
10081020 }
10091021 return nativePopupPreparation{
1010- parent: wv.nativePopupParent,
1011- frameRate: wv.windowlessFrameRate,
1012- backgroundColor: wv.backgroundColor,
1022+ parent: wv.nativePopupParent,
1023+ frameRate: wv.windowlessFrameRate,
10131024 }, true
10141025 }
10151026
@@ -1045,7 +1056,6 @@ func configureNativePopupWindow(
10451056 windowInfo *purecef.WindowInfo,
10461057 settings *purecef.BrowserSettings,
10471058 frameRate int32,
1048- backgroundColor uint32,
10491059 ) {
10501060 cef2gtk.ConfigureWindowInfo(windowInfo, cef2gtk.WindowInfoOptions{})
10511061 if externalBeginFrameEnabled() {
@@ -1056,15 +1066,13 @@ func configureNativePopupWindow(
10561066 }
10571067 cef2gtk.ConfigureBrowserSettings(settings, cef2gtk.BrowserSettingsOptions{WindowlessFrameRate: frameRate})
10581068 settings.LocalStorage = 1
1059- if backgroundColor != 0 {
1060- settings.BackgroundColor = backgroundColor
1061- }
1069+ // Always opaque white; the popup shell WebView carries the theme flash guard.
1070+ settings.BackgroundColor = opaqueWhiteBackground
10621071 }
10631072
10641073 type nativePopupPreparation struct {
1065- parent *WebView
1066- frameRate int32
1067- backgroundColor uint32
1074+ parent *WebView
1075+ frameRate int32
10681076 }
10691077
10701078 func (wv *WebView) handleNativePopupAborted() {
@@ -1244,6 +1252,7 @@ func (wv *WebView) destroyViewBridgeOnGTKThread() {
12441252 if wv == nil || wv.viewBridge == nil {
12451253 return
12461254 }
1255+ wv.removeBackgroundFlashGuard()
12471256 if wv.removeSizeObserver != nil {
12481257 wv.removeSizeObserver()
12491258 wv.removeSizeObserver = nil
@@ -239,6 +239,18 @@ type WebView struct {
239 backgroundColor uint32239 backgroundColor uint32
240 inputConfig RuntimeInputConfig240 inputConfig RuntimeInputConfig
241 241
242+ // Background flash guard: a theme-colored CSS provider painted behind the
243+ // render widget until the first CEF frame is presented. It replaces the
244+ // former dark BrowserSettings.BackgroundColor anti-white-flash, whose canvas
245+ // is now always opaque white. State is guarded by bgGuardMu; firstFramePainted
246+ // gates the one-shot teardown and resets naturally when a fresh WebView is
247+ // created after a browser recreation.
248+ firstFramePainted atomic.Bool
249+ bgGuardMu sync.Mutex
250+ bgGuardProvider *gtk.CssProvider
251+ bgGuardWidget *gtk.Widget
252+ bgGuardClass string
253+
242 // Touchpad input diagnostics are debounced to avoid flooding logs while254 // Touchpad input diagnostics are debounced to avoid flooding logs while
243 // debugging continuous scroll streams.255 // debugging continuous scroll streams.
244 touchpadNavigation *touchpadNavigationRecognizer256 touchpadNavigation *touchpadNavigationRecognizer
@@ -992,7 +1004,7 @@ func (wv *WebView) prepareNativePopup(
992 prep.parent.trackPendingNativePopup(popupID, wv)1004 prep.parent.trackPendingNativePopup(popupID, wv)
993 }1005 }
994 1006
995- configureNativePopupWindow(windowInfo, settings, prep.frameRate, prep.backgroundColor)1007+ configureNativePopupWindow(windowInfo, settings, prep.frameRate)
996 clientSlot.Set(client)1008 clientSlot.Set(client)
997 return true1009 return true
998 }1010 }
@@ -1007,9 +1019,8 @@ func (wv *WebView) nativePopupPreparationSnapshot() (nativePopupPreparation, boo
1007 return nativePopupPreparation{}, false1019 return nativePopupPreparation{}, false
1008 }1020 }
1009 return nativePopupPreparation{1021 return nativePopupPreparation{
1010- parent: wv.nativePopupParent,1022+ parent: wv.nativePopupParent,
1011- frameRate: wv.windowlessFrameRate,1023+ frameRate: wv.windowlessFrameRate,
1012- backgroundColor: wv.backgroundColor,
1013 }, true1024 }, true
1014 }1025 }
1015 1026
@@ -1045,7 +1056,6 @@ func configureNativePopupWindow(
1045 windowInfo *purecef.WindowInfo,1056 windowInfo *purecef.WindowInfo,
1046 settings *purecef.BrowserSettings,1057 settings *purecef.BrowserSettings,
1047 frameRate int32,1058 frameRate int32,
1048- backgroundColor uint32,
1049 ) {1059 ) {
1050 cef2gtk.ConfigureWindowInfo(windowInfo, cef2gtk.WindowInfoOptions{})1060 cef2gtk.ConfigureWindowInfo(windowInfo, cef2gtk.WindowInfoOptions{})
1051 if externalBeginFrameEnabled() {1061 if externalBeginFrameEnabled() {
@@ -1056,15 +1066,13 @@ func configureNativePopupWindow(
1056 }1066 }
1057 cef2gtk.ConfigureBrowserSettings(settings, cef2gtk.BrowserSettingsOptions{WindowlessFrameRate: frameRate})1067 cef2gtk.ConfigureBrowserSettings(settings, cef2gtk.BrowserSettingsOptions{WindowlessFrameRate: frameRate})
1058 settings.LocalStorage = 11068 settings.LocalStorage = 1
1059- if backgroundColor != 0 {1069+ // Always opaque white; the popup shell WebView carries the theme flash guard.
1060- settings.BackgroundColor = backgroundColor1070+ settings.BackgroundColor = opaqueWhiteBackground
1061- }
1062 }1071 }
1063 1072
1064 type nativePopupPreparation struct {1073 type nativePopupPreparation struct {
1065- parent *WebView1074+ parent *WebView
1066- frameRate int321075+ frameRate int32
1067- backgroundColor uint32
1068 }1076 }
1069 1077
1070 func (wv *WebView) handleNativePopupAborted() {1078 func (wv *WebView) handleNativePopupAborted() {
@@ -1244,6 +1252,7 @@ func (wv *WebView) destroyViewBridgeOnGTKThread() {
1244 if wv == nil || wv.viewBridge == nil {1252 if wv == nil || wv.viewBridge == nil {
1245 return1253 return
1246 }1254 }
1255+ wv.removeBackgroundFlashGuard()
1247 if wv.removeSizeObserver != nil {1256 if wv.removeSizeObserver != nil {
1248 wv.removeSizeObserver()1257 wv.removeSizeObserver()
1249 wv.removeSizeObserver = nil1258 wv.removeSizeObserver = nil
M internal/infrastructure/cef/webview_handlers_test.go +2 -2
@@ -380,14 +380,14 @@ func TestConfigureNativePopupWindow_UsesSharedTextureWindowlessDefaults(t *testi
380380 windowInfo := purecef.NewWindowInfo()
381381 settings := purecef.NewBrowserSettings()
382382
383- configureNativePopupWindow(&windowInfo, &settings, 72, 0xFF112233)
383+ configureNativePopupWindow(&windowInfo, &settings, 72)
384384
385385 require.Equal(t, purecef.WindowHandle(0), windowInfo.ParentWindow)
386386 require.Equal(t, int32(1), windowInfo.WindowlessRenderingEnabled)
387387 require.Equal(t, int32(1), windowInfo.SharedTextureEnabled)
388388 require.Equal(t, int32(72), settings.WindowlessFrameRate)
389389 require.Equal(t, int32(1), settings.LocalStorage)
390- require.Equal(t, uint32(0xFF112233), settings.BackgroundColor)
390+ require.Equal(t, opaqueWhiteBackground, settings.BackgroundColor)
391391 }
392392
393393 func TestOnLoadStartFiresCommittedAndUpdatesURI(t *testing.T) {
@@ -380,14 +380,14 @@ func TestConfigureNativePopupWindow_UsesSharedTextureWindowlessDefaults(t *testi
380 windowInfo := purecef.NewWindowInfo()380 windowInfo := purecef.NewWindowInfo()
381 settings := purecef.NewBrowserSettings()381 settings := purecef.NewBrowserSettings()
382 382
383- configureNativePopupWindow(&windowInfo, &settings, 72, 0xFF112233)383+ configureNativePopupWindow(&windowInfo, &settings, 72)
384 384
385 require.Equal(t, purecef.WindowHandle(0), windowInfo.ParentWindow)385 require.Equal(t, purecef.WindowHandle(0), windowInfo.ParentWindow)
386 require.Equal(t, int32(1), windowInfo.WindowlessRenderingEnabled)386 require.Equal(t, int32(1), windowInfo.WindowlessRenderingEnabled)
387 require.Equal(t, int32(1), windowInfo.SharedTextureEnabled)387 require.Equal(t, int32(1), windowInfo.SharedTextureEnabled)
388 require.Equal(t, int32(72), settings.WindowlessFrameRate)388 require.Equal(t, int32(72), settings.WindowlessFrameRate)
389 require.Equal(t, int32(1), settings.LocalStorage)389 require.Equal(t, int32(1), settings.LocalStorage)
390- require.Equal(t, uint32(0xFF112233), settings.BackgroundColor)390+ require.Equal(t, opaqueWhiteBackground, settings.BackgroundColor)
391 }391 }
392 392
393 func TestOnLoadStartFiresCommittedAndUpdatesURI(t *testing.T) {393 func TestOnLoadStartFiresCommittedAndUpdatesURI(t *testing.T) {
M vendor/github.com/bnema/purego-cef/cef/cef_browser_gen.go +15 -2 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_command_line_gen.go +15 -2 generated file: collapsed
A vendor/github.com/bnema/purego-cef/cef/cef_component_updater_gen.go +323 -0 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_cookie_gen.go +14 -1 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_drag_data_gen.go +14 -1 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_image_gen.go +14 -1 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_media_router_gen.go +24 -41 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_menu_model_gen.go +14 -1 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_parser_gen.go +10 -4 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_preference_gen.go +14 -1 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_print_settings_gen.go +14 -1 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_process_message_gen.go +14 -1 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_request_context_gen.go +16 -3 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_request_gen.go +42 -3 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_resource_bundle_gen.go +14 -1 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_response_gen.go +14 -1 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_shared_memory_region_gen.go +3 -3 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_shared_process_message_builder_gen.go +20 -4 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_stream_gen.go +34 -5 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_task_gen.go +15 -2 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_task_manager_gen.go +14 -1 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_thread_gen.go +14 -1 generated file: collapsed
A vendor/github.com/bnema/purego-cef/cef/cef_types_component_gen.go +45 -0 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_types_content_settings_gen.go +72 -79 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_types_gen.go +59 -52
@@ -163,7 +163,8 @@ const (
163163 ResultcodeResultCodeSystemResourceExhausted Resultcode = 37
164164 ResultcodeResultCodeNormalExitAutoDeElevated Resultcode = 38
165165 ResultcodeResultCodeTerminatedByOtherProcessOnCommitFailure Resultcode = 39
166- ResultcodeResultCodeChromeLast Resultcode = 40
166+ ResultcodeResultCodeInvalidIsolatedBrowserProcess Resultcode = 40
167+ ResultcodeResultCodeChromeLast Resultcode = 41
167168 ResultcodeResultCodeSandboxFatalFirst Resultcode = 7006
168169 ResultcodeResultCodeSandboxFatalIntegrity Resultcode = 7006
169170 ResultcodeResultCodeSandboxFatalDroptoken Resultcode = 7007
@@ -194,7 +195,8 @@ const (
194195 WindowOpenDispositionWodIgnoreAction WindowOpenDisposition = 9
195196 WindowOpenDispositionWodSwitchToTab WindowOpenDisposition = 10
196197 WindowOpenDispositionWodNewPictureInPicture WindowOpenDisposition = 11
197- WindowOpenDispositionWodNumValues WindowOpenDisposition = 12
198+ WindowOpenDispositionWodNewSplitView WindowOpenDisposition = 12
199+ WindowOpenDispositionWodNumValues WindowOpenDisposition = 13
198200 )
199201
200202 // DragOperationsMask is a CEF enum type.
@@ -245,7 +247,6 @@ const (
245247 PostdataelementTypePdeTypeBytes PostdataelementType = 1
246248 PostdataelementTypePdeTypeFile PostdataelementType = 2
247249 PostdataelementTypePdeTypeNumValues PostdataelementType = 3
248- PostdataelementTypePdfTypeNumValues PostdataelementType = 4
249250 )
250251
251252 // ResourceType is a CEF enum type.
@@ -1106,7 +1107,9 @@ const (
11061107 ChannelLayout514Downmix ChannelLayout = 33
11071108 ChannelLayout11 ChannelLayout = 34
11081109 ChannelLayout31Back ChannelLayout = 35
1109- ChannelLayoutChannelNumValues ChannelLayout = 36
1110+ ChannelLayout514 ChannelLayout = 36
1111+ ChannelLayout714 ChannelLayout = 37
1112+ ChannelLayoutChannelNumValues ChannelLayout = 38
11101113 )
11111114
11121115 // MediaRouteCreateResult is a CEF enum type.
@@ -1227,7 +1230,15 @@ const (
12271230 ChromePageActionIconTypeCpaitReadingMode ChromePageActionIconType = 36
12281231 ChromePageActionIconTypeCpaitContextualSidePanel ChromePageActionIconType = 37
12291232 ChromePageActionIconTypeCpaitJsOptimizations ChromePageActionIconType = 38
1230- ChromePageActionIconTypeCpaitNumValues ChromePageActionIconType = 39
1233+ ChromePageActionIconTypeCpaitRecordReplay ChromePageActionIconType = 39
1234+ ChromePageActionIconTypeCpaitIndigo ChromePageActionIconType = 40
1235+ ChromePageActionIconTypeCpaitFederation ChromePageActionIconType = 41
1236+ ChromePageActionIconTypeCpaitGlic ChromePageActionIconType = 42
1237+ ChromePageActionIconTypeCpaitAnchoredContextualCue ChromePageActionIconType = 43
1238+ ChromePageActionIconTypeCpaitWebAuthnAmbientSignin ChromePageActionIconType = 44
1239+ ChromePageActionIconTypeCpaitAutofillPayment ChromePageActionIconType = 45
1240+ ChromePageActionIconTypeCpaitMultistepFilter ChromePageActionIconType = 46
1241+ ChromePageActionIconTypeCpaitNumValues ChromePageActionIconType = 47
12311242 )
12321243
12331244 // ChromeToolbarButtonType is a CEF enum type.
@@ -1235,18 +1246,14 @@ type ChromeToolbarButtonType = int32
12351246
12361247 const (
12371248 ChromeToolbarButtonTypeCtbtCastDeprecated ChromeToolbarButtonType = 0
1238- ChromeToolbarButtonTypeCtbtCast ChromeToolbarButtonType = 1
1239- ChromeToolbarButtonTypeCtbtDownloadDeprecated ChromeToolbarButtonType = 2
1240- ChromeToolbarButtonTypeCtbtSendTabToSelfDeprecated ChromeToolbarButtonType = 3
1241- ChromeToolbarButtonTypeCtbtDownload ChromeToolbarButtonType = 4
1242- ChromeToolbarButtonTypeCtbtSendTabToSelf ChromeToolbarButtonType = 5
1243- ChromeToolbarButtonTypeCtbtSidePanelDeprecated ChromeToolbarButtonType = 6
1244- ChromeToolbarButtonTypeCtbtMedia ChromeToolbarButtonType = 7
1245- ChromeToolbarButtonTypeCtbtTabSearch ChromeToolbarButtonType = 8
1246- ChromeToolbarButtonTypeCtbtBatterySaver ChromeToolbarButtonType = 9
1247- ChromeToolbarButtonTypeCtbtAvatar ChromeToolbarButtonType = 10
1248- ChromeToolbarButtonTypeCtbtSidePanel ChromeToolbarButtonType = 11
1249- ChromeToolbarButtonTypeCtbtNumValues ChromeToolbarButtonType = 12
1249+ ChromeToolbarButtonTypeCtbtDownloadDeprecated ChromeToolbarButtonType = 1
1250+ ChromeToolbarButtonTypeCtbtSendTabToSelfDeprecated ChromeToolbarButtonType = 2
1251+ ChromeToolbarButtonTypeCtbtSidePanelDeprecated ChromeToolbarButtonType = 3
1252+ ChromeToolbarButtonTypeCtbtMedia ChromeToolbarButtonType = 4
1253+ ChromeToolbarButtonTypeCtbtTabSearch ChromeToolbarButtonType = 5
1254+ ChromeToolbarButtonTypeCtbtBatterySaver ChromeToolbarButtonType = 6
1255+ ChromeToolbarButtonTypeCtbtAvatar ChromeToolbarButtonType = 7
1256+ ChromeToolbarButtonTypeCtbtNumValues ChromeToolbarButtonType = 8
12501257 )
12511258
12521259 // DockingMode is a CEF enum type.
@@ -1299,35 +1306,36 @@ const (
12991306 type PermissionRequestTypes = int32
13001307
13011308 const (
1302- PermissionRequestTypesPermissionTypeNone PermissionRequestTypes = 0
1303- PermissionRequestTypesPermissionTypeArSession PermissionRequestTypes = 1 << 0
1304- PermissionRequestTypesPermissionTypeCameraPanTiltZoom PermissionRequestTypes = 1 << 1
1305- PermissionRequestTypesPermissionTypeCameraStream PermissionRequestTypes = 1 << 2
1306- PermissionRequestTypesPermissionTypeCapturedSurfaceControl PermissionRequestTypes = 1 << 3
1307- PermissionRequestTypesPermissionTypeClipboard PermissionRequestTypes = 1 << 4
1308- PermissionRequestTypesPermissionTypeTopLevelStorageAccess PermissionRequestTypes = 1 << 5
1309- PermissionRequestTypesPermissionTypeDiskQuota PermissionRequestTypes = 1 << 6
1310- PermissionRequestTypesPermissionTypeLocalFonts PermissionRequestTypes = 1 << 7
1311- PermissionRequestTypesPermissionTypeGeolocation PermissionRequestTypes = 1 << 8
1312- PermissionRequestTypesPermissionTypeHandTracking PermissionRequestTypes = 1 << 9
1313- PermissionRequestTypesPermissionTypeIdentityProvider PermissionRequestTypes = 1 << 10
1314- PermissionRequestTypesPermissionTypeIdleDetection PermissionRequestTypes = 1 << 11
1315- PermissionRequestTypesPermissionTypeMicStream PermissionRequestTypes = 1 << 12
1316- PermissionRequestTypesPermissionTypeMidiSysex PermissionRequestTypes = 1 << 13
1317- PermissionRequestTypesPermissionTypeMultipleDownloads PermissionRequestTypes = 1 << 14
1318- PermissionRequestTypesPermissionTypeNotifications PermissionRequestTypes = 1 << 15
1319- PermissionRequestTypesPermissionTypeKeyboardLock PermissionRequestTypes = 1 << 16
1320- PermissionRequestTypesPermissionTypePointerLock PermissionRequestTypes = 1 << 17
1321- PermissionRequestTypesPermissionTypeProtectedMediaIdentifier PermissionRequestTypes = 1 << 18
1322- PermissionRequestTypesPermissionTypeRegisterProtocolHandler PermissionRequestTypes = 1 << 19
1323- PermissionRequestTypesPermissionTypeStorageAccess PermissionRequestTypes = 1 << 20
1324- PermissionRequestTypesPermissionTypeVrSession PermissionRequestTypes = 1 << 21
1325- PermissionRequestTypesPermissionTypeWebAppInstallation PermissionRequestTypes = 1 << 22
1326- PermissionRequestTypesPermissionTypeWindowManagement PermissionRequestTypes = 1 << 23
1327- PermissionRequestTypesPermissionTypeFileSystemAccess PermissionRequestTypes = 1 << 24
1328- PermissionRequestTypesPermissionTypeLocalNetworkAccess PermissionRequestTypes = 1 << 25
1329- PermissionRequestTypesPermissionTypeLocalNetwork PermissionRequestTypes = 1 << 26
1330- PermissionRequestTypesPermissionTypeLoopbackNetwork PermissionRequestTypes = 1 << 27
1309+ PermissionRequestTypesPermissionTypeNone PermissionRequestTypes = 0
1310+ PermissionRequestTypesPermissionTypeArSession PermissionRequestTypes = 1 << 0
1311+ PermissionRequestTypesPermissionTypeCameraPanTiltZoom PermissionRequestTypes = 1 << 1
1312+ PermissionRequestTypesPermissionTypeCameraStream PermissionRequestTypes = 1 << 2
1313+ PermissionRequestTypesPermissionTypeCapturedSurfaceControl PermissionRequestTypes = 1 << 3
1314+ PermissionRequestTypesPermissionTypeClipboard PermissionRequestTypes = 1 << 4
1315+ PermissionRequestTypesPermissionTypeTopLevelStorageAccess PermissionRequestTypes = 1 << 5
1316+ PermissionRequestTypesPermissionTypeDiskQuota PermissionRequestTypes = 1 << 6
1317+ PermissionRequestTypesPermissionTypeLocalFonts PermissionRequestTypes = 1 << 7
1318+ PermissionRequestTypesPermissionTypeGeolocation PermissionRequestTypes = 1 << 8
1319+ PermissionRequestTypesPermissionTypeHandTracking PermissionRequestTypes = 1 << 9
1320+ PermissionRequestTypesPermissionTypeIdentityProvider PermissionRequestTypes = 1 << 10
1321+ PermissionRequestTypesPermissionTypeIdleDetection PermissionRequestTypes = 1 << 11
1322+ PermissionRequestTypesPermissionTypeMicStream PermissionRequestTypes = 1 << 12
1323+ PermissionRequestTypesPermissionTypeMidiSysex PermissionRequestTypes = 1 << 13
1324+ PermissionRequestTypesPermissionTypeMultipleDownloads PermissionRequestTypes = 1 << 14
1325+ PermissionRequestTypesPermissionTypeNotifications PermissionRequestTypes = 1 << 15
1326+ PermissionRequestTypesPermissionTypeKeyboardLock PermissionRequestTypes = 1 << 16
1327+ PermissionRequestTypesPermissionTypePointerLock PermissionRequestTypes = 1 << 17
1328+ PermissionRequestTypesPermissionTypeProtectedMediaIdentifier PermissionRequestTypes = 1 << 18
1329+ PermissionRequestTypesPermissionTypeRegisterProtocolHandler PermissionRequestTypes = 1 << 19
1330+ PermissionRequestTypesPermissionTypeStorageAccess PermissionRequestTypes = 1 << 20
1331+ PermissionRequestTypesPermissionTypeVrSession PermissionRequestTypes = 1 << 21
1332+ PermissionRequestTypesPermissionTypeWebAppInstallation PermissionRequestTypes = 1 << 22
1333+ PermissionRequestTypesPermissionTypeWindowManagement PermissionRequestTypes = 1 << 23
1334+ PermissionRequestTypesPermissionTypeFileSystemAccess PermissionRequestTypes = 1 << 24
1335+ PermissionRequestTypesPermissionTypeLocalNetworkAccessDeprecated PermissionRequestTypes = 1 << 25
1336+ PermissionRequestTypesPermissionTypeLocalNetwork PermissionRequestTypes = 1 << 26
1337+ PermissionRequestTypesPermissionTypeLoopbackNetwork PermissionRequestTypes = 1 << 27
1338+ PermissionRequestTypesPermissionTypeSensors PermissionRequestTypes = 1 << 28
13311339 )
13321340
13331341 // PermissionRequestResult is a CEF enum type.
@@ -1440,12 +1448,11 @@ const (
14401448 TaskTypeExtension TaskType = 6
14411449 TaskTypeGuest TaskType = 7
14421450 TaskTypePluginDeprecated TaskType = 8
1443- TaskTypePlugin TaskType = 9
1444- TaskTypeSandboxHelper TaskType = 10
1445- TaskTypeDedicatedWorker TaskType = 11
1446- TaskTypeSharedWorker TaskType = 12
1447- TaskTypeServiceWorker TaskType = 13
1448- TaskTypeNumValues TaskType = 14
1451+ TaskTypeSandboxHelper TaskType = 9
1452+ TaskTypeDedicatedWorker TaskType = 10
1453+ TaskTypeSharedWorker TaskType = 11
1454+ TaskTypeServiceWorker TaskType = 12
1455+ TaskTypeNumValues TaskType = 13
14491456 )
14501457
14511458 // RawSettings Initialization settings. Specify NULL or 0 to get the recommended default values. Many of these and other settings can also configured using command- line switches.
@@ -163,7 +163,8 @@ const (
163 ResultcodeResultCodeSystemResourceExhausted Resultcode = 37163 ResultcodeResultCodeSystemResourceExhausted Resultcode = 37
164 ResultcodeResultCodeNormalExitAutoDeElevated Resultcode = 38164 ResultcodeResultCodeNormalExitAutoDeElevated Resultcode = 38
165 ResultcodeResultCodeTerminatedByOtherProcessOnCommitFailure Resultcode = 39165 ResultcodeResultCodeTerminatedByOtherProcessOnCommitFailure Resultcode = 39
166- ResultcodeResultCodeChromeLast Resultcode = 40166+ ResultcodeResultCodeInvalidIsolatedBrowserProcess Resultcode = 40
167+ ResultcodeResultCodeChromeLast Resultcode = 41
167 ResultcodeResultCodeSandboxFatalFirst Resultcode = 7006168 ResultcodeResultCodeSandboxFatalFirst Resultcode = 7006
168 ResultcodeResultCodeSandboxFatalIntegrity Resultcode = 7006169 ResultcodeResultCodeSandboxFatalIntegrity Resultcode = 7006
169 ResultcodeResultCodeSandboxFatalDroptoken Resultcode = 7007170 ResultcodeResultCodeSandboxFatalDroptoken Resultcode = 7007
@@ -194,7 +195,8 @@ const (
194 WindowOpenDispositionWodIgnoreAction WindowOpenDisposition = 9195 WindowOpenDispositionWodIgnoreAction WindowOpenDisposition = 9
195 WindowOpenDispositionWodSwitchToTab WindowOpenDisposition = 10196 WindowOpenDispositionWodSwitchToTab WindowOpenDisposition = 10
196 WindowOpenDispositionWodNewPictureInPicture WindowOpenDisposition = 11197 WindowOpenDispositionWodNewPictureInPicture WindowOpenDisposition = 11
197- WindowOpenDispositionWodNumValues WindowOpenDisposition = 12198+ WindowOpenDispositionWodNewSplitView WindowOpenDisposition = 12
199+ WindowOpenDispositionWodNumValues WindowOpenDisposition = 13
198 )200 )
199 201
200 // DragOperationsMask is a CEF enum type.202 // DragOperationsMask is a CEF enum type.
@@ -245,7 +247,6 @@ const (
245 PostdataelementTypePdeTypeBytes PostdataelementType = 1247 PostdataelementTypePdeTypeBytes PostdataelementType = 1
246 PostdataelementTypePdeTypeFile PostdataelementType = 2248 PostdataelementTypePdeTypeFile PostdataelementType = 2
247 PostdataelementTypePdeTypeNumValues PostdataelementType = 3249 PostdataelementTypePdeTypeNumValues PostdataelementType = 3
248- PostdataelementTypePdfTypeNumValues PostdataelementType = 4
249 )250 )
250 251
251 // ResourceType is a CEF enum type.252 // ResourceType is a CEF enum type.
@@ -1106,7 +1107,9 @@ const (
1106 ChannelLayout514Downmix ChannelLayout = 331107 ChannelLayout514Downmix ChannelLayout = 33
1107 ChannelLayout11 ChannelLayout = 341108 ChannelLayout11 ChannelLayout = 34
1108 ChannelLayout31Back ChannelLayout = 351109 ChannelLayout31Back ChannelLayout = 35
1109- ChannelLayoutChannelNumValues ChannelLayout = 361110+ ChannelLayout514 ChannelLayout = 36
1111+ ChannelLayout714 ChannelLayout = 37
1112+ ChannelLayoutChannelNumValues ChannelLayout = 38
1110 )1113 )
1111 1114
1112 // MediaRouteCreateResult is a CEF enum type.1115 // MediaRouteCreateResult is a CEF enum type.
@@ -1227,7 +1230,15 @@ const (
1227 ChromePageActionIconTypeCpaitReadingMode ChromePageActionIconType = 361230 ChromePageActionIconTypeCpaitReadingMode ChromePageActionIconType = 36
1228 ChromePageActionIconTypeCpaitContextualSidePanel ChromePageActionIconType = 371231 ChromePageActionIconTypeCpaitContextualSidePanel ChromePageActionIconType = 37
1229 ChromePageActionIconTypeCpaitJsOptimizations ChromePageActionIconType = 381232 ChromePageActionIconTypeCpaitJsOptimizations ChromePageActionIconType = 38
1230- ChromePageActionIconTypeCpaitNumValues ChromePageActionIconType = 391233+ ChromePageActionIconTypeCpaitRecordReplay ChromePageActionIconType = 39
1234+ ChromePageActionIconTypeCpaitIndigo ChromePageActionIconType = 40
1235+ ChromePageActionIconTypeCpaitFederation ChromePageActionIconType = 41
1236+ ChromePageActionIconTypeCpaitGlic ChromePageActionIconType = 42
1237+ ChromePageActionIconTypeCpaitAnchoredContextualCue ChromePageActionIconType = 43
1238+ ChromePageActionIconTypeCpaitWebAuthnAmbientSignin ChromePageActionIconType = 44
1239+ ChromePageActionIconTypeCpaitAutofillPayment ChromePageActionIconType = 45
1240+ ChromePageActionIconTypeCpaitMultistepFilter ChromePageActionIconType = 46
1241+ ChromePageActionIconTypeCpaitNumValues ChromePageActionIconType = 47
1231 )1242 )
1232 1243
1233 // ChromeToolbarButtonType is a CEF enum type.1244 // ChromeToolbarButtonType is a CEF enum type.
@@ -1235,18 +1246,14 @@ type ChromeToolbarButtonType = int32
1235 1246
1236 const (1247 const (
1237 ChromeToolbarButtonTypeCtbtCastDeprecated ChromeToolbarButtonType = 01248 ChromeToolbarButtonTypeCtbtCastDeprecated ChromeToolbarButtonType = 0
1238- ChromeToolbarButtonTypeCtbtCast ChromeToolbarButtonType = 11249+ ChromeToolbarButtonTypeCtbtDownloadDeprecated ChromeToolbarButtonType = 1
1239- ChromeToolbarButtonTypeCtbtDownloadDeprecated ChromeToolbarButtonType = 21250+ ChromeToolbarButtonTypeCtbtSendTabToSelfDeprecated ChromeToolbarButtonType = 2
1240- ChromeToolbarButtonTypeCtbtSendTabToSelfDeprecated ChromeToolbarButtonType = 31251+ ChromeToolbarButtonTypeCtbtSidePanelDeprecated ChromeToolbarButtonType = 3
1241- ChromeToolbarButtonTypeCtbtDownload ChromeToolbarButtonType = 41252+ ChromeToolbarButtonTypeCtbtMedia ChromeToolbarButtonType = 4
1242- ChromeToolbarButtonTypeCtbtSendTabToSelf ChromeToolbarButtonType = 51253+ ChromeToolbarButtonTypeCtbtTabSearch ChromeToolbarButtonType = 5
1243- ChromeToolbarButtonTypeCtbtSidePanelDeprecated ChromeToolbarButtonType = 61254+ ChromeToolbarButtonTypeCtbtBatterySaver ChromeToolbarButtonType = 6
1244- ChromeToolbarButtonTypeCtbtMedia ChromeToolbarButtonType = 71255+ ChromeToolbarButtonTypeCtbtAvatar ChromeToolbarButtonType = 7
1245- ChromeToolbarButtonTypeCtbtTabSearch ChromeToolbarButtonType = 81256+ ChromeToolbarButtonTypeCtbtNumValues ChromeToolbarButtonType = 8
1246- ChromeToolbarButtonTypeCtbtBatterySaver ChromeToolbarButtonType = 9
1247- ChromeToolbarButtonTypeCtbtAvatar ChromeToolbarButtonType = 10
1248- ChromeToolbarButtonTypeCtbtSidePanel ChromeToolbarButtonType = 11
1249- ChromeToolbarButtonTypeCtbtNumValues ChromeToolbarButtonType = 12
1250 )1257 )
1251 1258
1252 // DockingMode is a CEF enum type.1259 // DockingMode is a CEF enum type.
@@ -1299,35 +1306,36 @@ const (
1299 type PermissionRequestTypes = int321306 type PermissionRequestTypes = int32
1300 1307
1301 const (1308 const (
1302- PermissionRequestTypesPermissionTypeNone PermissionRequestTypes = 01309+ PermissionRequestTypesPermissionTypeNone PermissionRequestTypes = 0
1303- PermissionRequestTypesPermissionTypeArSession PermissionRequestTypes = 1 << 01310+ PermissionRequestTypesPermissionTypeArSession PermissionRequestTypes = 1 << 0
1304- PermissionRequestTypesPermissionTypeCameraPanTiltZoom PermissionRequestTypes = 1 << 11311+ PermissionRequestTypesPermissionTypeCameraPanTiltZoom PermissionRequestTypes = 1 << 1
1305- PermissionRequestTypesPermissionTypeCameraStream PermissionRequestTypes = 1 << 21312+ PermissionRequestTypesPermissionTypeCameraStream PermissionRequestTypes = 1 << 2
1306- PermissionRequestTypesPermissionTypeCapturedSurfaceControl PermissionRequestTypes = 1 << 31313+ PermissionRequestTypesPermissionTypeCapturedSurfaceControl PermissionRequestTypes = 1 << 3
1307- PermissionRequestTypesPermissionTypeClipboard PermissionRequestTypes = 1 << 41314+ PermissionRequestTypesPermissionTypeClipboard PermissionRequestTypes = 1 << 4
1308- PermissionRequestTypesPermissionTypeTopLevelStorageAccess PermissionRequestTypes = 1 << 51315+ PermissionRequestTypesPermissionTypeTopLevelStorageAccess PermissionRequestTypes = 1 << 5
1309- PermissionRequestTypesPermissionTypeDiskQuota PermissionRequestTypes = 1 << 61316+ PermissionRequestTypesPermissionTypeDiskQuota PermissionRequestTypes = 1 << 6
1310- PermissionRequestTypesPermissionTypeLocalFonts PermissionRequestTypes = 1 << 71317+ PermissionRequestTypesPermissionTypeLocalFonts PermissionRequestTypes = 1 << 7
1311- PermissionRequestTypesPermissionTypeGeolocation PermissionRequestTypes = 1 << 81318+ PermissionRequestTypesPermissionTypeGeolocation PermissionRequestTypes = 1 << 8
1312- PermissionRequestTypesPermissionTypeHandTracking PermissionRequestTypes = 1 << 91319+ PermissionRequestTypesPermissionTypeHandTracking PermissionRequestTypes = 1 << 9
1313- PermissionRequestTypesPermissionTypeIdentityProvider PermissionRequestTypes = 1 << 101320+ PermissionRequestTypesPermissionTypeIdentityProvider PermissionRequestTypes = 1 << 10
1314- PermissionRequestTypesPermissionTypeIdleDetection PermissionRequestTypes = 1 << 111321+ PermissionRequestTypesPermissionTypeIdleDetection PermissionRequestTypes = 1 << 11
1315- PermissionRequestTypesPermissionTypeMicStream PermissionRequestTypes = 1 << 121322+ PermissionRequestTypesPermissionTypeMicStream PermissionRequestTypes = 1 << 12
1316- PermissionRequestTypesPermissionTypeMidiSysex PermissionRequestTypes = 1 << 131323+ PermissionRequestTypesPermissionTypeMidiSysex PermissionRequestTypes = 1 << 13
1317- PermissionRequestTypesPermissionTypeMultipleDownloads PermissionRequestTypes = 1 << 141324+ PermissionRequestTypesPermissionTypeMultipleDownloads PermissionRequestTypes = 1 << 14
1318- PermissionRequestTypesPermissionTypeNotifications PermissionRequestTypes = 1 << 151325+ PermissionRequestTypesPermissionTypeNotifications PermissionRequestTypes = 1 << 15
1319- PermissionRequestTypesPermissionTypeKeyboardLock PermissionRequestTypes = 1 << 161326+ PermissionRequestTypesPermissionTypeKeyboardLock PermissionRequestTypes = 1 << 16
1320- PermissionRequestTypesPermissionTypePointerLock PermissionRequestTypes = 1 << 171327+ PermissionRequestTypesPermissionTypePointerLock PermissionRequestTypes = 1 << 17
1321- PermissionRequestTypesPermissionTypeProtectedMediaIdentifier PermissionRequestTypes = 1 << 181328+ PermissionRequestTypesPermissionTypeProtectedMediaIdentifier PermissionRequestTypes = 1 << 18
1322- PermissionRequestTypesPermissionTypeRegisterProtocolHandler PermissionRequestTypes = 1 << 191329+ PermissionRequestTypesPermissionTypeRegisterProtocolHandler PermissionRequestTypes = 1 << 19
1323- PermissionRequestTypesPermissionTypeStorageAccess PermissionRequestTypes = 1 << 201330+ PermissionRequestTypesPermissionTypeStorageAccess PermissionRequestTypes = 1 << 20
1324- PermissionRequestTypesPermissionTypeVrSession PermissionRequestTypes = 1 << 211331+ PermissionRequestTypesPermissionTypeVrSession PermissionRequestTypes = 1 << 21
1325- PermissionRequestTypesPermissionTypeWebAppInstallation PermissionRequestTypes = 1 << 221332+ PermissionRequestTypesPermissionTypeWebAppInstallation PermissionRequestTypes = 1 << 22
1326- PermissionRequestTypesPermissionTypeWindowManagement PermissionRequestTypes = 1 << 231333+ PermissionRequestTypesPermissionTypeWindowManagement PermissionRequestTypes = 1 << 23
1327- PermissionRequestTypesPermissionTypeFileSystemAccess PermissionRequestTypes = 1 << 241334+ PermissionRequestTypesPermissionTypeFileSystemAccess PermissionRequestTypes = 1 << 24
1328- PermissionRequestTypesPermissionTypeLocalNetworkAccess PermissionRequestTypes = 1 << 251335+ PermissionRequestTypesPermissionTypeLocalNetworkAccessDeprecated PermissionRequestTypes = 1 << 25
1329- PermissionRequestTypesPermissionTypeLocalNetwork PermissionRequestTypes = 1 << 261336+ PermissionRequestTypesPermissionTypeLocalNetwork PermissionRequestTypes = 1 << 26
1330- PermissionRequestTypesPermissionTypeLoopbackNetwork PermissionRequestTypes = 1 << 271337+ PermissionRequestTypesPermissionTypeLoopbackNetwork PermissionRequestTypes = 1 << 27
1338+ PermissionRequestTypesPermissionTypeSensors PermissionRequestTypes = 1 << 28
1331 )1339 )
1332 1340
1333 // PermissionRequestResult is a CEF enum type.1341 // PermissionRequestResult is a CEF enum type.
@@ -1440,12 +1448,11 @@ const (
1440 TaskTypeExtension TaskType = 61448 TaskTypeExtension TaskType = 6
1441 TaskTypeGuest TaskType = 71449 TaskTypeGuest TaskType = 7
1442 TaskTypePluginDeprecated TaskType = 81450 TaskTypePluginDeprecated TaskType = 8
1443- TaskTypePlugin TaskType = 91451+ TaskTypeSandboxHelper TaskType = 9
1444- TaskTypeSandboxHelper TaskType = 101452+ TaskTypeDedicatedWorker TaskType = 10
1445- TaskTypeDedicatedWorker TaskType = 111453+ TaskTypeSharedWorker TaskType = 11
1446- TaskTypeSharedWorker TaskType = 121454+ TaskTypeServiceWorker TaskType = 12
1447- TaskTypeServiceWorker TaskType = 131455+ TaskTypeNumValues TaskType = 13
1448- TaskTypeNumValues TaskType = 14
1449 )1456 )
1450 1457
1451 // RawSettings Initialization settings. Specify NULL or 0 to get the recommended default values. Many of these and other settings can also configured using command- line switches.1458 // RawSettings Initialization settings. Specify NULL or 0 to get the recommended default values. Many of these and other settings can also configured using command- line switches.
M vendor/github.com/bnema/purego-cef/cef/cef_urlrequest_gen.go +14 -1 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_v8_gen.go +166 -19 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_values_gen.go +62 -7 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_waitable_event_gen.go +14 -1 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_xml_reader_gen.go +14 -1 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/cef_zip_reader_gen.go +14 -1 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/test_cef_api_version_test__gen.go +86 -871 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/test_cef_test_server_gen.go +14 -1 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/test_cef_translator_test__gen.go +92 -50 generated file: collapsed
A vendor/github.com/bnema/purego-cef/cef/v8_helpers.go +19 -0 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/views_cef_browser_view_gen.go +15 -2 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/views_cef_display_gen.go +17 -4 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/views_cef_label_button_gen.go +14 -1 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/views_cef_menu_button_gen.go +14 -1 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/views_cef_panel_gen.go +14 -1 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/views_cef_scroll_view_gen.go +14 -1 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/views_cef_textfield_gen.go +14 -60 generated file: collapsed
M vendor/github.com/bnema/purego-cef/cef/views_cef_window_gen.go +14 -1 generated file: collapsed
A vendor/github.com/bnema/purego-cef/internal/capi/cef_component_updater_gen.go +130 -0 generated file: collapsed
A vendor/github.com/bnema/purego-cef/internal/capi/cef_types_component_gen.go +11 -0 generated file: collapsed
M vendor/github.com/bnema/purego-cef/internal/capi/cef_types_gen.go +1 -1 generated file: collapsed
M vendor/github.com/bnema/purego-cef/internal/capi/cef_v8_gen.go +44 -0 generated file: collapsed
M vendor/github.com/bnema/purego-cef/internal/capi/register_gen.go +2 -0 generated file: collapsed
M vendor/github.com/bnema/purego-cef/internal/capi/test_cef_api_version_test__gen.go +0 -459 generated file: collapsed
M vendor/github.com/bnema/purego-cef/internal/capi/views_cef_textfield_gen.go +33 -107 generated file: collapsed
A vendor/github.com/bnema/purego-cef/internal/cefapi/contract.go +11 -0 generated file: collapsed
M vendor/github.com/bnema/purego-cef/internal/loader/loader.go +23 -18 generated file: collapsed
A vendor/github.com/bnema/purego-cef/internal/ports/in/cef_component_updater_gen.go +24 -0 generated file: collapsed
M vendor/github.com/bnema/purego-cef/internal/ports/in/cef_media_router_gen.go +2 -2 generated file: collapsed
M vendor/github.com/bnema/purego-cef/internal/ports/in/cef_shared_memory_region_gen.go +1 -5 generated file: collapsed
M vendor/github.com/bnema/purego-cef/internal/ports/in/cef_shared_process_message_builder_gen.go +1 -5 generated file: collapsed
A vendor/github.com/bnema/purego-cef/internal/ports/in/cef_types_component_gen.go +9 -0 generated file: collapsed
M vendor/github.com/bnema/purego-cef/internal/ports/in/cef_v8_gen.go +8 -1 generated file: collapsed
M vendor/github.com/bnema/purego-cef/internal/ports/in/cef_values_gen.go +1 -1 generated file: collapsed
M vendor/github.com/bnema/purego-cef/internal/ports/in/test_cef_api_version_test__gen.go +8 -63 generated file: collapsed
M vendor/github.com/bnema/purego-cef/internal/ports/in/test_cef_translator_test__gen.go +8 -4 generated file: collapsed
M vendor/github.com/bnema/purego-cef/internal/ports/in/views_cef_textfield_gen.go +0 -7 generated file: collapsed
A vendor/github.com/bnema/purego-cef/internal/ports/out/cef_component_updater_gen.go +29 -0 generated file: collapsed
M vendor/github.com/bnema/purego-cef/internal/ports/out/cef_parser_gen.go +3 -3 generated file: collapsed
M vendor/github.com/bnema/purego-cef/internal/ports/out/cef_preference_gen.go +2 -2 generated file: collapsed
M vendor/github.com/bnema/purego-cef/internal/ports/out/cef_shared_process_message_builder_gen.go +1 -1 generated file: collapsed
M vendor/github.com/bnema/purego-cef/internal/ports/out/cef_stream_gen.go +1 -1 generated file: collapsed
M vendor/github.com/bnema/purego-cef/internal/ports/out/cef_v8_gen.go +11 -2 generated file: collapsed
M vendor/github.com/bnema/purego-cef/internal/ports/out/cef_values_gen.go +1 -1 generated file: collapsed
M vendor/github.com/bnema/purego-cef/internal/ports/out/test_cef_api_version_test__gen.go +4 -51 generated file: collapsed
M vendor/github.com/bnema/purego-cef/internal/ports/out/test_cef_translator_test__gen.go +4 -4 generated file: collapsed
M vendor/github.com/bnema/purego-cef/internal/ports/out/views_cef_textfield_gen.go +0 -7 generated file: collapsed
M vendor/modules.txt +2 -1 generated file: collapsed

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 8

Tags 42

↑↓ moveenter openesc close