Repository: servo/servo
File: components/servo/webview.rs (Rust)

Code before:
        self.inner().id.hash(state);
    }
}

pub(crate) struct WebViewInner {
    // TODO: ensure that WebView instances interact with the correct Servo instance
    pub(crate) id: WebViewId,
    pub(crate) constellation_proxy: ConstellationProxy,
    pub(crate) compositor: Rc<RefCell<IOCompositor>>,
    pub(crate) delegate: Rc<dyn WebViewDelegate>,
    pub(crate) clipboard_delegate: Rc<dyn ClipboardDelegate>,
    javascript_evaluator: Rc<RefCell<JavaScriptEvaluator>>,

    /// The rectangle of the [`WebView`] in device pixels, which is the viewport.
    rect: DeviceRect,
    hidpi_scale_factor: Scale<f32, DeviceIndependentPixel, DevicePixel>,
    load_status: LoadStatus,
    status_text: Option<String>,
    page_title: Option<String>,
    favicon: Option<Image>,
    focused: bool,
    animating: bool,
    cursor: Cursor,

    /// The back / forward list of this WebView.
    back_foward_list: Vec<Url>,

    /// The current index in the back / forward list.
    back_forward_list_index: usize,
}

impl Drop for WebViewInner {
    fn drop(&mut self) {
        self.constellation_proxy
            .send(EmbedderToConstellationMessage::CloseWebView(self.id));
    }
}

impl WebView {
    pub(crate) fn new(builder: WebViewBuilder) -> Self {
        let compositor = builder.servo.compositor.clone();
        let painter_id = compositor.borrow().painter_id();
        let id = WebViewId::new(painter_id);
        let servo = builder.servo;
        let size = builder.size.map_or_else(
            || {
                builder
                    .servo
                    .compositor
                    .borrow()
                    .rendering_context_size()

Review comment (suggestion):
```suggestion
    back_forward_list: Vec<Url>,
```

Code after:
        self.inner().id.hash(state);
    }
}

pub(crate) struct WebViewInner {
    // TODO: ensure that WebView instances interact with the correct Servo instance
    pub(crate) id: WebViewId,
    pub(crate) constellation_proxy: ConstellationProxy,
    pub(crate) compositor: Rc<RefCell<IOCompositor>>,
    pub(crate) delegate: Rc<dyn WebViewDelegate>,
    pub(crate) clipboard_delegate: Rc<dyn ClipboardDelegate>,
    javascript_evaluator: Rc<RefCell<JavaScriptEvaluator>>,

    /// The rectangle of the [`WebView`] in device pixels, which is the viewport.
    rect: DeviceRect,
    hidpi_scale_factor: Scale<f32, DeviceIndependentPixel, DevicePixel>,
    load_status: LoadStatus,
    status_text: Option<String>,
    page_title: Option<String>,
    favicon: Option<Image>,
    focused: bool,
    animating: bool,
    cursor: Cursor,

    /// The back / forward list of this WebView.
    back_forward_list: Vec<Url>,

    /// The current index in the back / forward list.
    back_forward_list_index: usize,
}

impl Drop for WebViewInner {
    fn drop(&mut self) {
        self.constellation_proxy
            .send(EmbedderToConstellationMessage::CloseWebView(self.id));
    }
}

impl WebView {
    pub(crate) fn new(builder: WebViewBuilder) -> Self {
        let compositor = builder.servo.compositor.clone();
        let painter_id = compositor.borrow().painter_id();
        let id = WebViewId::new(painter_id);
        let servo = builder.servo;
        let size = builder.size.map_or_else(
            || {
                builder
                    .servo
                    .compositor
                    .borrow()
                    .rendering_context_size()