Enum script::dom::window::LayoutBlocker
source · enum LayoutBlocker {
WaitingForParse,
Parsing(Instant),
FiredLoadEventOrParsingTimerExpired,
}
Expand description
During loading and parsing, layouts are suppressed to avoid flashing incomplete page contents.
Exceptions:
- Parsing the body takes so long, that layouts are no longer suppressed in order to show the user that the page is loading.
- Script triggers a layout query or scroll event in which case, we want to layout but not display the contents.
For more information see: https://github.com/servo/servo/pull/6028.
Variants§
WaitingForParse
The first load event hasn’t been fired and we have not started to parse the <body>
yet.
Parsing(Instant)
The body is being parsed the <body>
starting at the Instant
specified.
FiredLoadEventOrParsingTimerExpired
The body finished parsing and the load
event has been fired or parsing took so
long, that we are going to do layout anyway. Note that subsequent changes to the body
can trigger parsing again, but the Window
stays in this state.
Implementations§
source§impl LayoutBlocker
impl LayoutBlocker
fn layout_blocked(&self) -> bool
Trait Implementations§
source§impl Clone for LayoutBlocker
impl Clone for LayoutBlocker
source§fn clone(&self) -> LayoutBlocker
fn clone(&self) -> LayoutBlocker
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl MallocSizeOf for LayoutBlocker
impl MallocSizeOf for LayoutBlocker
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.
impl Copy for LayoutBlocker
Auto Trait Implementations§
impl Freeze for LayoutBlocker
impl RefUnwindSafe for LayoutBlocker
impl Send for LayoutBlocker
impl Sync for LayoutBlocker
impl Unpin for LayoutBlocker
impl UnwindSafe for LayoutBlocker
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> Filterable for T
impl<T> Filterable for T
source§fn filterable(
self,
filter_name: &'static str,
) -> RequestFilterDataProvider<T, fn(_: DataRequest<'_>) -> bool>
fn filterable( self, filter_name: &'static str, ) -> RequestFilterDataProvider<T, fn(_: DataRequest<'_>) -> bool>
Creates a filterable data provider with the given name for debugging. Read more
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