Use Servo data to back @counter-style rule.

This commit is contained in:
Xidorn Quan 2018-04-05 08:43:55 +10:00
parent 32cd0b4ea0
commit 80ab893e3a
12 changed files with 18158 additions and 18132 deletions

View file

@ -1611,8 +1611,6 @@ pub struct ExtraStyleData {
pub pages: Vec<Arc<Locked<PageRule>>>,
}
// FIXME(emilio): This is kind of a lie, and relies on us not cloning
// nsCSSCounterStyleRules OMT (which we don't).
#[cfg(feature = "gecko")]
unsafe impl Sync for ExtraStyleData {}
#[cfg(feature = "gecko")]
@ -1636,7 +1634,7 @@ impl ExtraStyleData {
guard: &SharedRwLockReadGuard,
rule: &Arc<Locked<CounterStyleRule>>,
) {
let name = unsafe { Atom::from_raw(rule.read_with(guard).mName.mRawPtr) };
let name = rule.read_with(guard).name().0.clone();
self.counter_styles.insert(name, rule.clone());
}