chore(deps): bump purego-cef to v0.14.1
v0.14.0 pinned the CEF API 15000 contract and fixed the struct ABI corruption that made BrowserSettings.BackgroundColor land on chrome_status_bubble (transparent windowless canvas). v0.14.1 restores the global function bindings dropped by that regeneration (DictionaryValueCreate, V8ContextGetCurrentContext, all *Create factories) and fixes global factory ownership so created objects are adopted without a leaked reference. This makes the white-canvas fix in this branch effective: the opaque white BrowserSettings.BackgroundColor now actually reaches libcef.
- commit
- 902c404508da47722a324d2f14b2a4cfc04a2812
- author
- brice · · 2026-07-21 19:07 UTC
- parent
- 1dc7dd4
- signature
- GPG Verified
CD88F9E564E0102646FB6077A1A07C7C7C3E349D· arch-gpg Verified for the committer email
75 files · +1836 -1983
M go.mod +1 -1
| @@ -6,7 +6,7 @@ require ( | |||
| 6 | 6 | github.com/a-h/templ v0.3.1020 | |
| 7 | 7 | github.com/andybalholm/brotli v1.2.2 | |
| 8 | 8 | 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 | |
| 10 | 10 | github.com/bnema/purego-cef2gtk v0.8.5 | |
| 11 | 11 | github.com/bnema/purego-pipewire v0.1.5 | |
| 12 | 12 | github.com/bnema/purego-sqlite v0.1.4 | |
| @@ -6,7 +6,7 @@ require ( | |||||
| 6 | github.com/a-h/templ v0.3.1020 | 6 | github.com/a-h/templ v0.3.1020 | ||
| 7 | github.com/andybalholm/brotli v1.2.2 | 7 | github.com/andybalholm/brotli v1.2.2 | ||
| 8 | github.com/bnema/purego v0.11.0-bnema.4 | 8 | 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 |
| 10 | github.com/bnema/purego-cef2gtk v0.8.5 | 10 | github.com/bnema/purego-cef2gtk v0.8.5 | ||
| 11 | github.com/bnema/purego-pipewire v0.1.5 | 11 | github.com/bnema/purego-pipewire v0.1.5 | ||
| 12 | github.com/bnema/purego-sqlite v0.1.4 | 12 | github.com/bnema/purego-sqlite v0.1.4 | ||
M go.sum +2 -2 generated file: collapsed
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 generated file: collapsed
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
| @@ -156,57 +156,6 @@ func (obj *textfieldImpl) GetCursorPosition() int { | |||
| 156 | 156 | return int(ret) | |
| 157 | 157 | } | |
| 158 | 158 | ||
| 159 | - | func (obj *textfieldImpl) SetTextColor(color uintptr) { | |
| 160 | - | if obj == nil || obj.rawPtr == nil { | |
| 161 | - | return | |
| 162 | - | } | |
| 163 | - | rawPtr := obj.rawPtr | |
| 164 | - | rawPtr.CallSetTextColor(color) | |
| 165 | - | } | |
| 166 | - | ||
| 167 | - | func (obj *textfieldImpl) GetTextColor() uintptr { | |
| 168 | - | if obj == nil || obj.rawPtr == nil { | |
| 169 | - | return 0 | |
| 170 | - | } | |
| 171 | - | rawPtr := obj.rawPtr | |
| 172 | - | ret := rawPtr.CallGetTextColor() | |
| 173 | - | return uintptr(ret) | |
| 174 | - | } | |
| 175 | - | ||
| 176 | - | func (obj *textfieldImpl) SetSelectionTextColor(color uintptr) { | |
| 177 | - | if obj == nil || obj.rawPtr == nil { | |
| 178 | - | return | |
| 179 | - | } | |
| 180 | - | rawPtr := obj.rawPtr | |
| 181 | - | rawPtr.CallSetSelectionTextColor(color) | |
| 182 | - | } | |
| 183 | - | ||
| 184 | - | func (obj *textfieldImpl) GetSelectionTextColor() uintptr { | |
| 185 | - | if obj == nil || obj.rawPtr == nil { | |
| 186 | - | return 0 | |
| 187 | - | } | |
| 188 | - | rawPtr := obj.rawPtr | |
| 189 | - | ret := rawPtr.CallGetSelectionTextColor() | |
| 190 | - | return uintptr(ret) | |
| 191 | - | } | |
| 192 | - | ||
| 193 | - | func (obj *textfieldImpl) SetSelectionBackgroundColor(color uintptr) { | |
| 194 | - | if obj == nil || obj.rawPtr == nil { | |
| 195 | - | return | |
| 196 | - | } | |
| 197 | - | rawPtr := obj.rawPtr | |
| 198 | - | rawPtr.CallSetSelectionBackgroundColor(color) | |
| 199 | - | } | |
| 200 | - | ||
| 201 | - | func (obj *textfieldImpl) GetSelectionBackgroundColor() uintptr { | |
| 202 | - | if obj == nil || obj.rawPtr == nil { | |
| 203 | - | return 0 | |
| 204 | - | } | |
| 205 | - | rawPtr := obj.rawPtr | |
| 206 | - | ret := rawPtr.CallGetSelectionBackgroundColor() | |
| 207 | - | return uintptr(ret) | |
| 208 | - | } | |
| 209 | - | ||
| 210 | 159 | func (obj *textfieldImpl) SetFontList(fontList string) { | |
| 211 | 160 | if obj == nil || obj.rawPtr == nil { | |
| 212 | 161 | return | |
| @@ -277,14 +226,6 @@ func (obj *textfieldImpl) GetPlaceholderText() string { | |||
| 277 | 226 | return goStringUserfree(unsafe.Pointer(ret)) | |
| 278 | 227 | } | |
| 279 | 228 | ||
| 280 | - | func (obj *textfieldImpl) SetPlaceholderTextColor(color uintptr) { | |
| 281 | - | if obj == nil || obj.rawPtr == nil { | |
| 282 | - | return | |
| 283 | - | } | |
| 284 | - | rawPtr := obj.rawPtr | |
| 285 | - | rawPtr.CallSetPlaceholderTextColor(color) | |
| 286 | - | } | |
| 287 | - | ||
| 288 | 229 | func (obj *textfieldImpl) SetAccessibleName(name string) { | |
| 289 | 230 | if obj == nil || obj.rawPtr == nil { | |
| 290 | 231 | return | |
| @@ -331,8 +272,21 @@ func wrapTextfield(ptr unsafe.Pointer) Textfield { | |||
| 331 | 272 | return impl | |
| 332 | 273 | } | |
| 333 | 274 | ||
| 275 | + | // takeTextfield adopts a CEF Textfield pointer whose reference is already owned by | |
| 276 | + | // the caller (as returned by a global factory function). Unlike wrapTextfield it | |
| 277 | + | // does NOT call AddRef, because the C API already transferred one reference to us. | |
| 278 | + | func takeTextfield(ptr unsafe.Pointer) Textfield { | |
| 279 | + | if ptr == nil { | |
| 280 | + | return nil | |
| 281 | + | } | |
| 282 | + | r := (*capi.CEFTextfieldT)(ptr) | |
| 283 | + | impl := &textfieldImpl{rawPtr: r} | |
| 284 | + | runtime.SetFinalizer(impl, (*textfieldImpl).Release) | |
| 285 | + | return impl | |
| 286 | + | } | |
| 287 | + | ||
| 334 | 288 | // TextfieldCreate Create a new Textfield. | |
| 335 | 289 | func TextfieldCreate(delegate TextfieldDelegate) Textfield { | |
| 336 | 290 | ret := capi.CEFTextfieldCreate(extractOrWrapRawPointer(delegate, func() any { return NewTextfieldDelegate(delegate) })) | |
| 337 | - | return wrapTextfield(ret) | |
| 291 | + | return takeTextfield(ret) | |
| 338 | 292 | } | |
| @@ -156,57 +156,6 @@ func (obj *textfieldImpl) GetCursorPosition() int { | |||||
| 156 | return int(ret) | 156 | return int(ret) | ||
| 157 | } | 157 | } | ||
| 158 | 158 | ||||
| 159 | - | func (obj *textfieldImpl) SetTextColor(color uintptr) { | |||
| 160 | - | if obj == nil || obj.rawPtr == nil { | |||
| 161 | - | return | |||
| 162 | - | } | |||
| 163 | - | rawPtr := obj.rawPtr | |||
| 164 | - | rawPtr.CallSetTextColor(color) | |||
| 165 | - | } | |||
| 166 | - | ||||
| 167 | - | func (obj *textfieldImpl) GetTextColor() uintptr { | |||
| 168 | - | if obj == nil || obj.rawPtr == nil { | |||
| 169 | - | return 0 | |||
| 170 | - | } | |||
| 171 | - | rawPtr := obj.rawPtr | |||
| 172 | - | ret := rawPtr.CallGetTextColor() | |||
| 173 | - | return uintptr(ret) | |||
| 174 | - | } | |||
| 175 | - | ||||
| 176 | - | func (obj *textfieldImpl) SetSelectionTextColor(color uintptr) { | |||
| 177 | - | if obj == nil || obj.rawPtr == nil { | |||
| 178 | - | return | |||
| 179 | - | } | |||
| 180 | - | rawPtr := obj.rawPtr | |||
| 181 | - | rawPtr.CallSetSelectionTextColor(color) | |||
| 182 | - | } | |||
| 183 | - | ||||
| 184 | - | func (obj *textfieldImpl) GetSelectionTextColor() uintptr { | |||
| 185 | - | if obj == nil || obj.rawPtr == nil { | |||
| 186 | - | return 0 | |||
| 187 | - | } | |||
| 188 | - | rawPtr := obj.rawPtr | |||
| 189 | - | ret := rawPtr.CallGetSelectionTextColor() | |||
| 190 | - | return uintptr(ret) | |||
| 191 | - | } | |||
| 192 | - | ||||
| 193 | - | func (obj *textfieldImpl) SetSelectionBackgroundColor(color uintptr) { | |||
| 194 | - | if obj == nil || obj.rawPtr == nil { | |||
| 195 | - | return | |||
| 196 | - | } | |||
| 197 | - | rawPtr := obj.rawPtr | |||
| 198 | - | rawPtr.CallSetSelectionBackgroundColor(color) | |||
| 199 | - | } | |||
| 200 | - | ||||
| 201 | - | func (obj *textfieldImpl) GetSelectionBackgroundColor() uintptr { | |||
| 202 | - | if obj == nil || obj.rawPtr == nil { | |||
| 203 | - | return 0 | |||
| 204 | - | } | |||
| 205 | - | rawPtr := obj.rawPtr | |||
| 206 | - | ret := rawPtr.CallGetSelectionBackgroundColor() | |||
| 207 | - | return uintptr(ret) | |||
| 208 | - | } | |||
| 209 | - | ||||
| 210 | func (obj *textfieldImpl) SetFontList(fontList string) { | 159 | func (obj *textfieldImpl) SetFontList(fontList string) { | ||
| 211 | if obj == nil || obj.rawPtr == nil { | 160 | if obj == nil || obj.rawPtr == nil { | ||
| 212 | return | 161 | return | ||
| @@ -277,14 +226,6 @@ func (obj *textfieldImpl) GetPlaceholderText() string { | |||||
| 277 | return goStringUserfree(unsafe.Pointer(ret)) | 226 | return goStringUserfree(unsafe.Pointer(ret)) | ||
| 278 | } | 227 | } | ||
| 279 | 228 | ||||
| 280 | - | func (obj *textfieldImpl) SetPlaceholderTextColor(color uintptr) { | |||
| 281 | - | if obj == nil || obj.rawPtr == nil { | |||
| 282 | - | return | |||
| 283 | - | } | |||
| 284 | - | rawPtr := obj.rawPtr | |||
| 285 | - | rawPtr.CallSetPlaceholderTextColor(color) | |||
| 286 | - | } | |||
| 287 | - | ||||
| 288 | func (obj *textfieldImpl) SetAccessibleName(name string) { | 229 | func (obj *textfieldImpl) SetAccessibleName(name string) { | ||
| 289 | if obj == nil || obj.rawPtr == nil { | 230 | if obj == nil || obj.rawPtr == nil { | ||
| 290 | return | 231 | return | ||
| @@ -331,8 +272,21 @@ func wrapTextfield(ptr unsafe.Pointer) Textfield { | |||||
| 331 | return impl | 272 | return impl | ||
| 332 | } | 273 | } | ||
| 333 | 274 | ||||
| 275 | + | // takeTextfield adopts a CEF Textfield pointer whose reference is already owned by | |||
| 276 | + | // the caller (as returned by a global factory function). Unlike wrapTextfield it | |||
| 277 | + | // does NOT call AddRef, because the C API already transferred one reference to us. | |||
| 278 | + | func takeTextfield(ptr unsafe.Pointer) Textfield { | |||
| 279 | + | if ptr == nil { | |||
| 280 | + | return nil | |||
| 281 | + | } | |||
| 282 | + | r := (*capi.CEFTextfieldT)(ptr) | |||
| 283 | + | impl := &textfieldImpl{rawPtr: r} | |||
| 284 | + | runtime.SetFinalizer(impl, (*textfieldImpl).Release) | |||
| 285 | + | return impl | |||
| 286 | + | } | |||
| 287 | + | ||||
| 334 | // TextfieldCreate Create a new Textfield. | 288 | // TextfieldCreate Create a new Textfield. | ||
| 335 | func TextfieldCreate(delegate TextfieldDelegate) Textfield { | 289 | func TextfieldCreate(delegate TextfieldDelegate) Textfield { | ||
| 336 | ret := capi.CEFTextfieldCreate(extractOrWrapRawPointer(delegate, func() any { return NewTextfieldDelegate(delegate) })) | 290 | ret := capi.CEFTextfieldCreate(extractOrWrapRawPointer(delegate, func() any { return NewTextfieldDelegate(delegate) })) | ||
| 337 | - | return wrapTextfield(ret) | 291 | + | return takeTextfield(ret) |
| 338 | } | 292 | } | ||