#[repr(C)]pub struct ComputedJustifyItems {
pub specified: JustifyItems,
pub computed: JustifyItems,
}
Expand description
The computed value for the justify-items
property.
Need to carry around both the specified and computed value to handle the special legacy keyword without destroying style sharing.
In particular, justify-items
is a reset property, so we ought to be able
to share its computed representation across elements as long as they match
the same rules. Except that it’s not true if the specified value for
justify-items
is legacy
and the computed value of the parent has the
legacy
modifier.
So instead of computing legacy
“normally” looking at get_parent_position(),
marking it as uncacheable, we carry the specified value around and handle
the special case in StyleAdjuster
instead, only when the result of the
computation would vary.
Note that we also need to special-case this property in matching.rs, in order to properly handle changes to the legacy keyword… This all kinda sucks :(.
See the discussion in https://bugzil.la/1384542.
Fields§
§specified: JustifyItems
The specified value for the property. Can contain the bare legacy
keyword.
computed: JustifyItems
The computed value for the property. Cannot contain the bare legacy
keyword, but note that it could contain it in combination with other
keywords like left
, right
or center
.
Implementations§
source§impl JustifyItems
impl JustifyItems
Trait Implementations§
source§impl Clone for ComputedJustifyItems
impl Clone for ComputedJustifyItems
source§fn clone(&self) -> ComputedJustifyItems
fn clone(&self) -> ComputedJustifyItems
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ComputedJustifyItems
impl Debug for ComputedJustifyItems
source§impl MallocSizeOf for ComputedJustifyItems
impl MallocSizeOf for ComputedJustifyItems
source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
source§impl PartialEq for ComputedJustifyItems
impl PartialEq for ComputedJustifyItems
source§fn eq(&self, other: &ComputedJustifyItems) -> bool
fn eq(&self, other: &ComputedJustifyItems) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl ToCss for ComputedJustifyItems
impl ToCss for ComputedJustifyItems
source§impl ToResolvedValue for ComputedJustifyItems
impl ToResolvedValue for ComputedJustifyItems
§type ResolvedValue = ComputedJustifyItems
type ResolvedValue = ComputedJustifyItems
source§fn from_resolved_value(from: Self::ResolvedValue) -> Self
fn from_resolved_value(from: Self::ResolvedValue) -> Self
source§fn to_resolved_value(self, context: &Context<'_>) -> Self::ResolvedValue
fn to_resolved_value(self, context: &Context<'_>) -> Self::ResolvedValue
impl Copy for ComputedJustifyItems
impl Eq for ComputedJustifyItems
impl StructuralPartialEq for ComputedJustifyItems
Auto Trait Implementations§
impl Freeze for ComputedJustifyItems
impl RefUnwindSafe for ComputedJustifyItems
impl Send for ComputedJustifyItems
impl Sync for ComputedJustifyItems
impl Unpin for ComputedJustifyItems
impl UnwindSafe for ComputedJustifyItems
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
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.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>
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>
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 more