mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
style: [css-properties-values-api] Share PropertyRule instance when cloning CssRule::Property
Differential Revision: https://phabricator.services.mozilla.com/D178892
This commit is contained in:
parent
48f2f475c6
commit
5c0897c8eb
1 changed files with 3 additions and 2 deletions
|
@ -556,8 +556,9 @@ impl DeepCloneWithLock for CssRule {
|
|||
))
|
||||
},
|
||||
CssRule::Property(ref arc) => {
|
||||
let rule = arc.read_with(guard);
|
||||
CssRule::Property(Arc::new(lock.wrap(rule.clone())))
|
||||
// @property rules are immutable, so we don't need any of the `Locked`
|
||||
// shenanigans, actually, and can just share the rule.
|
||||
CssRule::Property(arc.clone())
|
||||
},
|
||||
CssRule::Document(ref arc) => {
|
||||
let rule = arc.read_with(guard);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue