mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
geckolib: Make Servo_DeclarationBlock_RemovePropertyById return whether it did remove a property.
This commit is contained in:
parent
89c1892b30
commit
01ed7fe4dd
2 changed files with 13 additions and 8 deletions
|
@ -2732,7 +2732,7 @@ extern "C" {
|
||||||
pub fn Servo_DeclarationBlock_RemovePropertyById(declarations:
|
pub fn Servo_DeclarationBlock_RemovePropertyById(declarations:
|
||||||
RawServoDeclarationBlockBorrowed,
|
RawServoDeclarationBlockBorrowed,
|
||||||
property:
|
property:
|
||||||
nsCSSPropertyID);
|
nsCSSPropertyID) -> bool;
|
||||||
}
|
}
|
||||||
extern "C" {
|
extern "C" {
|
||||||
pub fn Servo_DeclarationBlock_HasCSSWideKeyword(declarations:
|
pub fn Servo_DeclarationBlock_HasCSSWideKeyword(declarations:
|
||||||
|
|
|
@ -2606,10 +2606,13 @@ pub unsafe extern "C" fn Servo_DeclarationBlock_SetPropertyById(
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn remove_property(declarations: RawServoDeclarationBlockBorrowed, property_id: PropertyId) {
|
fn remove_property(
|
||||||
|
declarations: RawServoDeclarationBlockBorrowed,
|
||||||
|
property_id: PropertyId
|
||||||
|
) -> bool {
|
||||||
write_locked_arc(declarations, |decls: &mut PropertyDeclarationBlock| {
|
write_locked_arc(declarations, |decls: &mut PropertyDeclarationBlock| {
|
||||||
decls.remove_property(&property_id);
|
decls.remove_property(&property_id)
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
|
@ -2617,13 +2620,15 @@ pub unsafe extern "C" fn Servo_DeclarationBlock_RemoveProperty(
|
||||||
declarations: RawServoDeclarationBlockBorrowed,
|
declarations: RawServoDeclarationBlockBorrowed,
|
||||||
property: *const nsACString,
|
property: *const nsACString,
|
||||||
) {
|
) {
|
||||||
remove_property(declarations, get_property_id_from_property!(property, ()))
|
remove_property(declarations, get_property_id_from_property!(property, ()));
|
||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub extern "C" fn Servo_DeclarationBlock_RemovePropertyById(declarations: RawServoDeclarationBlockBorrowed,
|
pub extern "C" fn Servo_DeclarationBlock_RemovePropertyById(
|
||||||
property: nsCSSPropertyID) {
|
declarations: RawServoDeclarationBlockBorrowed,
|
||||||
remove_property(declarations, get_property_id_from_nscsspropertyid!(property, ()))
|
property: nsCSSPropertyID
|
||||||
|
) -> bool {
|
||||||
|
remove_property(declarations, get_property_id_from_nscsspropertyid!(property, false))
|
||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue