Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions style/properties/cascade.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1155,6 +1155,11 @@ impl<'a> Cascade<'a> {
};

self.seen.longhands.insert(longhand_id);
if longhand_id == LonghandId::Visibility && !can_skip_apply {
context
.builder
.add_flags(ComputedValueFlags::HAS_OWN_VISIBILITY);
}
if origin.is_author_origin() {
self.author_specified.insert(longhand_id);
}
Expand Down
9 changes: 9 additions & 0 deletions style/properties/computed_value_flags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,15 @@ bitflags! {

/// Whether this style uses `sibling-index()`.
const USES_SIBLING_INDEX = 1 << 27;

/// Whether the winning `visibility` declaration establishes a value
/// on this element instead of inheriting from its parent.
///
/// This is set after variable substitution and cascade rollback have
/// selected the declaration, so consumers do not need to replay the
/// cascade to distinguish an inherited hidden value from an explicit
/// hidden boundary.
const HAS_OWN_VISIBILITY = 1 << 28;
}
}

Expand Down