From 285da1b6218911cce682bef4ad6c66a2989e005c Mon Sep 17 00:00:00 2001 From: Hiroyuki Ikezoe Date: Fri, 12 May 2017 19:29:24 +0900 Subject: [PATCH] Add clear method for LonghandIdSet. --- components/style/properties/properties.mako.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/components/style/properties/properties.mako.rs b/components/style/properties/properties.mako.rs index 423a79be5dc..6818eb4ec4e 100644 --- a/components/style/properties/properties.mako.rs +++ b/components/style/properties/properties.mako.rs @@ -251,6 +251,14 @@ impl LonghandIdSet { self.storage[bit / 32] &= !(1 << (bit % 32)); } + /// Clear all bits + #[inline] + pub fn clear(&mut self) { + for cell in &mut self.storage { + *cell = 0 + } + } + /// Set the corresponding bit of TransitionProperty. /// This function will panic if TransitionProperty::All is given. pub fn set_transition_property_bit(&mut self, property: &TransitionProperty) {