style: [css-properties-values-api] Remove Locked<> from CssRule::Property arc

Depends on D179038

Differential Revision: https://phabricator.services.mozilla.com/D179039
This commit is contained in:
Zach Hoffman 2023-05-25 15:13:06 +00:00 committed by Martin Robinson
parent cd67a09ac1
commit 0aed54f636
3 changed files with 9 additions and 9 deletions

View file

@ -114,9 +114,8 @@ impl_locked_arc_ffi!(
Servo_PageRule_AddRef,
Servo_PageRule_Release
);
impl_locked_arc_ffi!(
impl_simple_arc_ffi!(
PropertyRule,
LockedPropertyRule,
Servo_PropertyRule_AddRef,
Servo_PropertyRule_Release
);

View file

@ -263,7 +263,7 @@ pub enum CssRule {
Keyframes(Arc<Locked<KeyframesRule>>),
Supports(Arc<Locked<SupportsRule>>),
Page(Arc<Locked<PageRule>>),
Property(Arc<Locked<PropertyRule>>),
Property(Arc<PropertyRule>),
Document(Arc<Locked<DocumentRule>>),
LayerBlock(Arc<Locked<LayerBlockRule>>),
LayerStatement(Arc<Locked<LayerStatementRule>>),
@ -309,9 +309,7 @@ impl CssRule {
lock.unconditional_shallow_size_of(ops) + lock.read_with(guard).size_of(guard, ops)
},
CssRule::Property(ref lock) => {
lock.unconditional_shallow_size_of(ops) + lock.read_with(guard).size_of(guard, ops)
},
CssRule::Property(ref rule) => rule.size_of(guard, ops),
CssRule::Document(ref lock) => {
lock.unconditional_shallow_size_of(ops) + lock.read_with(guard).size_of(guard, ops)
@ -598,7 +596,7 @@ impl ToCssWithGuard for CssRule {
CssRule::Media(ref lock) => lock.read_with(guard).to_css(guard, dest),
CssRule::Supports(ref lock) => lock.read_with(guard).to_css(guard, dest),
CssRule::Page(ref lock) => lock.read_with(guard).to_css(guard, dest),
CssRule::Property(ref lock) => lock.read_with(guard).to_css(guard, dest),
CssRule::Property(ref rule) => rule.to_css(guard, dest),
CssRule::Document(ref lock) => lock.read_with(guard).to_css(guard, dest),
CssRule::LayerBlock(ref lock) => lock.read_with(guard).to_css(guard, dest),
CssRule::LayerStatement(ref lock) => lock.read_with(guard).to_css(guard, dest),

View file

@ -720,8 +720,11 @@ impl<'a, 'b, 'i> AtRuleParser<'i> for NestedRuleParser<'a, 'b, 'i> {
})))
},
AtRulePrelude::Property(name) => self.nest_for_rule(CssRuleType::Property, |p| {
CssRule::Property(Arc::new(p.shared_lock.wrap(
parse_property_block(&p.context, input, name, start.source_location()),
CssRule::Property(Arc::new(parse_property_block(
&p.context,
input,
name,
start.source_location(),
)))
}),
AtRulePrelude::Document(condition) => {