mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Add Servo_Property_IsShorthand to geckolib/glue.rs
This commit is contained in:
parent
794c0d445a
commit
b8185b4744
2 changed files with 23 additions and 0 deletions
|
@ -1645,6 +1645,12 @@ impl PropertyId {
|
|||
}
|
||||
}
|
||||
|
||||
/// Returns true if the property is a shorthand or shorthand alias.
|
||||
#[inline]
|
||||
pub fn is_shorthand(&self) -> bool {
|
||||
self.as_shorthand().is_ok()
|
||||
}
|
||||
|
||||
/// Given this property id, get it either as a shorthand or as a
|
||||
/// `PropertyDeclarationId`.
|
||||
pub fn as_shorthand(&self) -> Result<ShorthandId, PropertyDeclarationId> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue