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

@ -7,7 +7,7 @@ use std::collections::hash_map::{Entry, Values, ValuesMut};
use base::id::WebViewId;
use crate::webview::UnknownWebView;
use crate::webview_renderer::UnknownWebView;
#[derive(Debug)]
pub struct WebViewManager<WebView> {
@ -117,8 +117,8 @@ mod test {
BrowsingContextId, BrowsingContextIndex, PipelineNamespace, PipelineNamespaceId, WebViewId,
};
use crate::webview::UnknownWebView;
use crate::webview_manager::WebViewManager;
use crate::webview_renderer::UnknownWebView;
fn top_level_id(namespace_id: u32, index: u32) -> WebViewId {
WebViewId(BrowsingContextId {