Bug 215119 - [GTK] webkit_web_view_set_background_color doesn't work as expected
Summary: [GTK] webkit_web_view_set_background_color doesn't work as expected
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: PC Linux
: P2 Critical
Assignee: Nobody
URL:
Keywords: Gtk
Depends on:
Blocks:
 
Reported: 2020-08-04 01:35 PDT by maxim11853
Modified: 2020-12-26 03:49 PST (History)
3 users (show)

See Also:


Attachments
The gtkmm example with screenshots (2.67 MB, application/zip)
2020-08-04 01:35 PDT, maxim11853
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description maxim11853 2020-08-04 01:35:22 PDT
Created attachment 405907 [details]
The gtkmm example with screenshots

Hello, while upgrading from 2.4.11 which is really old to 2.28.4 I've noticed some API changes related to the background color. In webkitgtk 2.4.11 there is a webkit_web_view_set_transparent function which is literally erasing the background color of HTML document. That's exactly what I needed in my application. In webkit2gtk that function was changed to a more generic webkit_web_view_set_background_color which seems like a minor change. However it doesn't behave the same as webkit_web_view_set_transparent.

Linux Distro: Ubuntu 18.04
Webkit2GTK version: 2.28.4
gtkmm version: 3.22.2

I've prepared a small gtkmm (C++ bindings for GTK+) example which works fine with 2.4.11 and doesn't work with webkit2gtk versions. The example consists of an GTK image and WebKitWebView on top of it. You need to build using CMake and adjust paths for image and .html document. I've also added the screenshots.

Am I missing something else or it's a regression?
Comment 1 maxim11853 2020-12-26 03:49:04 PST
Up!