diff --git a/components/compositing/compositor.rs b/components/compositing/compositor.rs index 897a9b55155..94130f0167c 100644 --- a/components/compositing/compositor.rs +++ b/components/compositing/compositor.rs @@ -150,7 +150,7 @@ pub struct IOCompositor { /// The webrender renderer. webrender: Option, - /// The surfman instance that webrender targets, which is the viewport. + /// The [`RenderingContext`] instance that webrender targets, which is the viewport. rendering_context: Rc, /// The number of frames pending to receive from WebRender. diff --git a/components/shared/compositing/rendering_context.rs b/components/shared/compositing/rendering_context.rs index 46d72917510..0596210430b 100644 --- a/components/shared/compositing/rendering_context.rs +++ b/components/shared/compositing/rendering_context.rs @@ -381,6 +381,7 @@ impl RenderingContext for SoftwareRenderingContext { /// If you would like to paint to only a portion of the window, consider using /// [`OffscreenRenderingContext`] by calling [`WindowRenderingContext::offscreen_context`]. pub struct WindowRenderingContext { + /// The inner size of the window in physical pixels which excludes OS decorations. size: Cell>, surfman_context: SurfmanRenderingContext, } diff --git a/ports/servoshell/desktop/headed_window.rs b/ports/servoshell/desktop/headed_window.rs index fd2ecc358a4..bbc4237a271 100644 --- a/ports/servoshell/desktop/headed_window.rs +++ b/ports/servoshell/desktop/headed_window.rs @@ -687,7 +687,8 @@ impl WindowPortsMethods for Window { }, WindowEvent::Resized(new_inner_size) => { if self.inner_size.get() != new_inner_size { - // This should always be set to inner size. + // This should always be set to inner size + // because we are resizing `SurfmanRenderingContext`. // See https://github.com/servo/servo/issues/38369#issuecomment-3138378527 self.window_rendering_context.resize(new_inner_size); }