Struct style::invalidation::element::restyle_hints::RestyleHint
[−]
pub struct RestyleHint { /* fields omitted */ }
The kind of restyle we need to do for a given element.
Methods
impl RestyleHint
pub const RESTYLE_SELF: RestyleHint
RESTYLE_SELF: RestyleHint = RestyleHint{bits: 1 << 0,}
Do a selector match of the element.
pub const RESTYLE_DESCENDANTS: RestyleHint
RESTYLE_DESCENDANTS: RestyleHint = RestyleHint{bits: 1 << 1,}
Do a selector match of the element's descendants.
pub const RECASCADE_SELF: RestyleHint
RECASCADE_SELF: RestyleHint = RestyleHint{bits: 1 << 2,}
Recascade the current element.
pub const RECASCADE_DESCENDANTS: RestyleHint
RECASCADE_DESCENDANTS: RestyleHint = RestyleHint{bits: 1 << 3,}
Recascade all descendant elements.
pub const RESTYLE_CSS_TRANSITIONS: RestyleHint
RESTYLE_CSS_TRANSITIONS: RestyleHint = RestyleHint{bits: 1 << 4,}
Replace the style data coming from CSS transitions without updating any other style data. This hint is only processed in animation-only traversal which is prior to normal traversal.
pub const RESTYLE_CSS_ANIMATIONS: RestyleHint
RESTYLE_CSS_ANIMATIONS: RestyleHint = RestyleHint{bits: 1 << 5,}
Replace the style data coming from CSS animations without updating any other style data. This hint is only processed in animation-only traversal which is prior to normal traversal.
pub const RESTYLE_STYLE_ATTRIBUTE: RestyleHint
RESTYLE_STYLE_ATTRIBUTE: RestyleHint = RestyleHint{bits: 1 << 6,}
Don't re-run selector-matching on the element, only the style attribute has changed, and this change didn't have any other dependencies.
pub const RESTYLE_SMIL: RestyleHint
RESTYLE_SMIL: RestyleHint = RestyleHint{bits: 1 << 7,}
Replace the style data coming from SMIL animations without updating any other style data. This hint is only processed in animation-only traversal which is prior to normal traversal.
pub fn empty() -> RestyleHint
Returns an empty set of flags.
pub fn all() -> RestyleHint
Returns the set containing all flags.
pub fn bits(&self) -> u8
Returns the raw value of the flags currently stored.
pub fn from_bits(bits: u8) -> Option<RestyleHint>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
pub fn from_bits_truncate(bits: u8) -> RestyleHint
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
pub fn is_empty(&self) -> bool
Returns true
if no flags are currently stored.
pub fn is_all(&self) -> bool
Returns true
if all flags are currently set.
pub fn intersects(&self, other: RestyleHint) -> bool
Returns true
if there are flags common to both self
and other
.
pub fn contains(&self, other: RestyleHint) -> bool
Returns true
all of the flags in other
are contained within self
.
pub fn insert(&mut self, other: RestyleHint)
Inserts the specified flags in-place.
pub fn remove(&mut self, other: RestyleHint)
Removes the specified flags in-place.
pub fn toggle(&mut self, other: RestyleHint)
Toggles the specified flags in-place.
pub fn set(&mut self, other: RestyleHint, value: bool)
Inserts or removes the specified flags depending on the passed value.
impl RestyleHint
[src]
pub fn restyle_subtree() -> Self
[src]
Creates a new RestyleHint
indicating that the current element and all
its descendants must be fully restyled.
pub fn recascade_subtree() -> Self
[src]
Creates a new RestyleHint
indicating that the current element and all
its descendants must be recascaded.
pub fn contains_subtree(&self) -> bool
[src]
Returns whether this hint invalidates the element and all its descendants.
pub fn has_non_animation_invalidations(&self) -> bool
[src]
Returns whether we need to restyle this element.
pub fn propagate(&mut self, traversal_flags: &TraversalFlags) -> Self
[src]
Propagates this restyle hint to a child element.
pub fn recascade_self() -> Self
[src]
Creates a new RestyleHint
that indicates the element must be
recascaded.
pub fn replacements() -> Self
[src]
Returns a hint that contains all the replacement hints.
pub fn for_animations() -> Self
[src]
The replacements for the animation cascade levels.
pub fn has_recascade_self(&self) -> bool
[src]
Returns whether the hint specifies that the currently element must be recascaded.
pub fn has_animation_hint(&self) -> bool
[src]
Returns whether the hint specifies that an animation cascade level must be replaced.
pub fn has_animation_hint_or_recascade(&self) -> bool
[src]
Returns whether the hint specifies that an animation cascade level must be replaced.
pub fn has_non_animation_hint(&self) -> bool
[src]
Returns whether the hint specifies some restyle work other than an animation cascade level replacement.
pub fn match_self(&self) -> bool
[src]
Returns whether the hint specifies that selector matching must be re-run for the element.
pub fn has_replacements(&self) -> bool
[src]
Returns whether the hint specifies that some cascade levels must be replaced.
pub fn remove_animation_hints(&mut self)
[src]
Removes all of the animation-related hints.
Trait Implementations
impl Copy for RestyleHint
impl PartialEq for RestyleHint
fn eq(&self, __arg_0: &RestyleHint) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &RestyleHint) -> bool
This method tests for !=
.
impl Eq for RestyleHint
impl Clone for RestyleHint
fn clone(&self) -> RestyleHint
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialOrd for RestyleHint
fn partial_cmp(&self, __arg_0: &RestyleHint) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &RestyleHint) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &RestyleHint) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, __arg_0: &RestyleHint) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &RestyleHint) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Ord for RestyleHint
fn cmp(&self, __arg_0: &RestyleHint) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
impl Hash for RestyleHint
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Debug for RestyleHint
impl Binary for RestyleHint
impl Octal for RestyleHint
impl LowerHex for RestyleHint
impl UpperHex for RestyleHint
impl BitOr for RestyleHint
type Output = RestyleHint
The resulting type after applying the |
operator.
fn bitor(self, other: RestyleHint) -> RestyleHint
Returns the union of the two sets of flags.
impl BitOrAssign for RestyleHint
fn bitor_assign(&mut self, other: RestyleHint)
Adds the set of flags.
impl BitXor for RestyleHint
type Output = RestyleHint
The resulting type after applying the ^
operator.
fn bitxor(self, other: RestyleHint) -> RestyleHint
Returns the left flags, but with all the right flags toggled.
impl BitXorAssign for RestyleHint
fn bitxor_assign(&mut self, other: RestyleHint)
Toggles the set of flags.
impl BitAnd for RestyleHint
type Output = RestyleHint
The resulting type after applying the &
operator.
fn bitand(self, other: RestyleHint) -> RestyleHint
Returns the intersection between the two sets of flags.
impl BitAndAssign for RestyleHint
fn bitand_assign(&mut self, other: RestyleHint)
Disables all flags disabled in the set.
impl Sub for RestyleHint
type Output = RestyleHint
The resulting type after applying the -
operator.
fn sub(self, other: RestyleHint) -> RestyleHint
Returns the set difference of the two sets of flags.
impl SubAssign for RestyleHint
fn sub_assign(&mut self, other: RestyleHint)
Disables all flags enabled in the set.
impl Not for RestyleHint
type Output = RestyleHint
The resulting type after applying the !
operator.
fn not(self) -> RestyleHint
Returns the complement of this set of flags.
impl Extend<RestyleHint> for RestyleHint
fn extend<T: IntoIterator<Item = RestyleHint>>(&mut self, iterator: T)
Extends a collection with the contents of an iterator. Read more
impl FromIterator<RestyleHint> for RestyleHint
fn from_iter<T: IntoIterator<Item = RestyleHint>>(iterator: T) -> RestyleHint
Creates a value from an iterator. Read more
impl Default for RestyleHint
[src]
impl MallocSizeOf for RestyleHint
fn size_of(&self, _: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but not the space taken up by the value itself. Read more