style: Add FFI function to compare ComputedValues for custom property differences.

This commit is contained in:
Cameron McCormack 2017-07-13 16:50:22 +08:00
parent 18c5ba108d
commit e8ffd9dbba
2 changed files with 15 additions and 0 deletions

View file

@ -192,6 +192,11 @@ impl ComputedValues {
self.visited_style.clone()
}
/// Gets a reference to the custom properties map (if one exists).
pub fn get_custom_properties(&self) -> Option<<&::custom_properties::CustomPropertiesMap> {
self.custom_properties.as_ref().map(|x| &**x)
}
pub fn custom_properties(&self) -> Option<Arc<CustomPropertiesMap>> {
self.custom_properties.clone()
}