feat: add transparent webpreference to webview (#40301)

* feat: add transparent option to WebContents

* feat: add transparent attribute to webview

* test: add tests for webview transparent attribute

* docs: add transparent attribute to webview docs

* fix: run tests on macOS only

* refactor: remove unneeded html tag

* fix: only apply transparent option to guests

* refactor: correct comment

* refactor: use opaque instead

Retains current webview behaviour by default.

* fix: correct variable name to guest_opaque_

* refactor: use transparent webpreference

* docs: remove unused web preference

* fix: uncomment condition for transparency test

* docs: converted to list format and linked to MDN

* fix: make webviews transparent by default again

* fix: rebase error

---------

Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
This commit is contained in:
Brandon Fowler 2024-01-04 23:00:27 -05:00 committed by GitHub
parent 8c71e2adc9
commit 5086071294
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 106 additions and 3 deletions

View file

@ -801,6 +801,9 @@ class WebContents : public ExclusiveAccessContext,
// The type of current WebContents.
Type type_ = Type::kBrowserWindow;
// Weather the guest view should be transparent
bool guest_transparent_ = true;
int32_t id_;
// Request id used for findInPage request.