compositing: Rename WebView to WebViewRenderer (#36574)

There is a `WebView` in libservo (new) and a `WebView` in compositing
(old). Nowadays, the "real" `WebView` is the one in the libservo. The
`WebView` in `compositing` is really about rendering the contents of a
`WebView` from libservo. In addition there is also a trait exposed by
the compositor called `RendererWebView` which is a way for the
compositor to talk to libservo without a circular dependency.

This changes does some renames to make things clearer and so that there
is One Less WebView™:

- `compositing::WebView` -> `compositing::WebViewRenderer` (this is the
  same kind of naming as `ServoRenderer`).
- `compositing::RendererWebView` -> `compositing::WebViewTrait`

Testing: This is just a couple renames so should be covered by existing
tests.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
Martin Robinson 2025-04-21 10:47:39 +02:00 committed by GitHub
parent a0419faa85
commit 70f19c749f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 123 additions and 107 deletions

View file

@ -541,7 +541,7 @@ impl From<SerializableImageData> for ImageData {
/// A trait that exposes the embedding layer's `WebView` to the Servo renderer.
/// This is to prevent a dependency cycle between the renderer and the embedding
/// layer.
pub trait RendererWebView {
pub trait WebViewTrait {
fn id(&self) -> WebViewId;
fn screen_geometry(&self) -> Option<ScreenGeometry>;
fn set_animating(&self, new_value: bool);