/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use std::cell::Cell; use std::default::Default; use base::id::BrowsingContextId; use constellation_traits::{IFrameSizeMsg, WindowSizeType}; use embedder_traits::ViewportDetails; use fnv::FnvHashMap; use script_layout_interface::IFrameSizes; use crate::dom::bindings::inheritance::Castable; use crate::dom::bindings::root::{Dom, DomRoot}; use crate::dom::htmliframeelement::HTMLIFrameElement; use crate::dom::node::{Node, ShadowIncluding}; use crate::dom::types::Document; use crate::script_thread::with_script_thread; #[derive(JSTraceable, MallocSizeOf)] #[cfg_attr(crown, crown::unrooted_must_root_lint::must_root)] pub(crate) struct IFrame { pub(crate) element: Dom, #[no_trace] pub(crate) size: Option, } #[derive(Default, JSTraceable, MallocSizeOf)] #[cfg_attr(crown, crown::unrooted_must_root_lint::must_root)] pub(crate) struct IFrameCollection { /// The version of the [`Document`] that this collection refers to. When the versions /// do not match, the collection will need to be rebuilt. document_version: Cell, /// The `