/* 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::Ref; use std::default::Default; use std::iter; use embedder_traits::ViewportDetails; use js::context::{JSContext, NoGC}; use layout_api::IFrameSizes; use paint_api::PinchZoomInfos; use script_bindings::cell::DomRefCell; use servo_base::id::BrowsingContextId; use servo_constellation_traits::{IFrameSizeMsg, ScriptToConstellationMessage, WindowSizeType}; use crate::dom::NodeTraits; use crate::dom::bindings::inheritance::Castable; use crate::dom::bindings::root::{Dom, DomRoot}; use crate::dom::html::htmliframeelement::HTMLIFrameElement; use crate::dom::iterators::ShadowIncluding; use crate::dom::node::Node; use crate::dom::types::Window; use crate::event_loop::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 `