chromiumembedded / cef

Chromium Embedded Framework (CEF). A simple framework for embedding Chromium-based browsers in other applications.
https://bitbucket.org/chromiumembedded/cef/
Other
3.09k stars 450 forks source link

Make webkit-app-region support configurable and default-disabled (M122+) #3636

Open magreenblatt opened 5 months ago

magreenblatt commented 5 months ago

Is your feature request related to a problem? Please describe. Use of -webkit-app-region CSS to support draggable regions has performance consequences (see https://crbug.com/1447586). Chromium has made this support default-disabled but configurable starting with M122. Basically, we can call the following at any time on or after ContentRendererClient::RenderFrameCreated to toggle support:

render_frame->GetWebView()->SetSupportsAppRegion(bool);

Describe the solution you'd like Disable -webkit-app-region by default for the perf gain. Make it possible to enable for certain use cases, such as frameless windows. It's probably sufficient to make it configurable via CefBrowserSettings but we could also make it dynamically configurable if a use case exists for that.

Describe alternatives you've considered Leave -webkit-app-region default-enabled. This is the current state in CEF.

Additional context A related announcement was sent to embedder-dev in October 2023.

magreenblatt commented 5 months ago

One added complication is that we always want to enable draggable regions for frameless document PiP windows (see #3566).