pub(crate) struct DocumentOverlayHandler {
document: Dom<Document>,
fullscreen_element: MutNullableDom<Element>,
top_layer: DomRefCell<Vec<Dom<Element>>>,
pending_top_layer_removals: DomRefCell<Vec<Dom<Element>>>,
topmost_modal: MutNullableDom<Element>,
open_dialogs_list: DomRefCell<Vec<Dom<HTMLDialogElement>>>,
dialog_pointerdown_target: MutNullableDom<HTMLDialogElement>,
}Expand description
The DocumentOverlayHandler is a structure responsible for overlays for
the [crate::Document] and storing data related to overlays. It exists to
decrease the size of the [crate::Document] structure.
Fields§
§document: Dom<Document>The Document this DocumentOverlayHandler belongs to.
fullscreen_element: MutNullableDom<Element>Entry node for fullscreen.
top_layer: DomRefCell<Vec<Dom<Element>>>§pending_top_layer_removals: DomRefCell<Vec<Dom<Element>>>§topmost_modal: MutNullableDom<Element>§open_dialogs_list: DomRefCell<Vec<Dom<HTMLDialogElement>>>§dialog_pointerdown_target: MutNullableDom<HTMLDialogElement>Implementations§
Source§impl DocumentOverlayHandler
impl DocumentOverlayHandler
pub(crate) fn new(document: &Document) -> Self
pub(crate) fn fullscreen_element(&self) -> Option<DomRoot<Element>>
pub(crate) fn set_fullscreen_element(&self, element: Option<&Element>)
Sourcepub(crate) fn fully_exit_fullscreen(&self, cx: &mut JSContext)
pub(crate) fn fully_exit_fullscreen(&self, cx: &mut JSContext)
Sourcepub(crate) fn enter_fullscreen(
&self,
cx: &mut CurrentRealm<'_>,
pending: &Element,
) -> RootedPromise
pub(crate) fn enter_fullscreen( &self, cx: &mut CurrentRealm<'_>, pending: &Element, ) -> RootedPromise
Sourcepub(crate) fn exit_fullscreen(&self, cx: &mut JSContext) -> RootedPromise
pub(crate) fn exit_fullscreen(&self, cx: &mut JSContext) -> RootedPromise
Sourcepub(crate) fn get_allow_fullscreen(&self) -> bool
pub(crate) fn get_allow_fullscreen(&self) -> bool
pub(crate) fn open_dialogs_list_contains( &self, dialog: &HTMLDialogElement, ) -> bool
pub(crate) fn add_to_open_dialogs_list( &self, dialog: &HTMLDialogElement, no_gc: &NoGC, )
pub(crate) fn remove_from_open_dialogs_list( &self, dialog: &HTMLDialogElement, no_gc: &NoGC, )
pub(crate) fn topmost_open_dialog(&self) -> Option<DomRoot<HTMLDialogElement>>
pub(crate) fn dialog_pointerdown_target( &self, ) -> Option<DomRoot<HTMLDialogElement>>
pub(crate) fn set_dialog_pointerdown_target( &self, dialog: Option<&HTMLDialogElement>, )
pub(crate) fn top_layer_contains(&self, element: &Element) -> bool
fn pending_top_layer_removals_contains(&self, element: &Element) -> bool
Sourcepub(crate) fn is_in_the_top_layer(&self, element: &Element) -> bool
pub(crate) fn is_in_the_top_layer(&self, element: &Element) -> bool
Sourcepub(crate) fn add_an_element_to_the_top_layer(
&self,
element: &Element,
no_gc: &NoGC,
)
pub(crate) fn add_an_element_to_the_top_layer( &self, element: &Element, no_gc: &NoGC, )
Sourcepub(crate) fn request_an_element_to_be_removed_from_the_top_layer(
&self,
element: &Element,
no_gc: &NoGC,
)
pub(crate) fn request_an_element_to_be_removed_from_the_top_layer( &self, element: &Element, no_gc: &NoGC, )
Sourcepub(crate) fn remove_an_element_from_the_top_layer_immediately(
&self,
element: &Element,
no_gc: &NoGC,
)
pub(crate) fn remove_an_element_from_the_top_layer_immediately( &self, element: &Element, no_gc: &NoGC, )
Sourcepub(crate) fn process_top_layer_removals(&self, cx: &mut JSContext)
pub(crate) fn process_top_layer_removals(&self, cx: &mut JSContext)
Sourcepub fn update_topmost_modal(&self, no_gc: &NoGC)
pub fn update_topmost_modal(&self, no_gc: &NoGC)
Trait Implementations§
Source§impl MallocSizeOf for DocumentOverlayHandler
impl MallocSizeOf for DocumentOverlayHandler
Source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
Auto Trait Implementations§
impl !Freeze for DocumentOverlayHandler
impl !RefUnwindSafe for DocumentOverlayHandler
impl !Send for DocumentOverlayHandler
impl !Sync for DocumentOverlayHandler
impl !UnwindSafe for DocumentOverlayHandler
impl Unpin for DocumentOverlayHandler
impl UnsafeUnpin for DocumentOverlayHandler
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
Source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
Source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
Source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert