Use Servo code to check whether a property is inherited.

This commit is contained in:
Xidorn Quan 2018-04-09 19:10:44 +10:00
parent e460b4ab8a
commit 22cf429c35
2 changed files with 21 additions and 1 deletions

View file

@ -826,7 +826,8 @@ impl LonghandId {
}
}
fn inherited(&self) -> bool {
/// Returns whether the longhand property is inherited by default.
pub fn inherited(&self) -> bool {
${static_longhand_id_set("INHERITED", lambda p: p.style_struct.inherited)}
INHERITED.contains(*self)
}