mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Add binding function to create empty DeclarationBlock
This commit is contained in:
parent
70641a777a
commit
0b0ff2b152
2 changed files with 9 additions and 0 deletions
|
@ -922,6 +922,10 @@ extern "C" {
|
|||
pub fn Servo_ParseStyleAttribute(data: *const nsACString_internal)
|
||||
-> RawServoDeclarationBlockStrong;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Servo_DeclarationBlock_CreateEmpty()
|
||||
-> RawServoDeclarationBlockStrong;
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Servo_DeclarationBlock_Equals(a: RawServoDeclarationBlockBorrowed,
|
||||
b: RawServoDeclarationBlockBorrowed)
|
||||
|
|
|
@ -420,6 +420,11 @@ pub extern "C" fn Servo_ParseStyleAttribute(data: *const nsACString) -> RawServo
|
|||
Arc::new(RwLock::new(GeckoElement::parse_style_attribute(value))).into_strong()
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn Servo_DeclarationBlock_CreateEmpty() -> RawServoDeclarationBlockStrong {
|
||||
Arc::new(RwLock::new(PropertyDeclarationBlock { declarations: vec![], important_count: 0 })).into_strong()
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn Servo_DeclarationBlock_AddRef(declarations: RawServoDeclarationBlockBorrowed) {
|
||||
unsafe { RwLock::<PropertyDeclarationBlock>::addref(declarations) };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue