mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Servo_ParseProperty() takes nsCSSPropertyID instead of nsACString.
This commit is contained in:
parent
7ae9c96467
commit
c57b24c468
1 changed files with 3 additions and 7 deletions
|
@ -990,15 +990,11 @@ pub extern "C" fn Servo_StyleSet_Drop(data: RawServoStyleSetOwned) {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub extern "C" fn Servo_ParseProperty(property: *const nsACString, value: *const nsACString,
|
pub extern "C" fn Servo_ParseProperty(property: nsCSSPropertyID, value: *const nsACString,
|
||||||
data: *mut URLExtraData)
|
data: *mut URLExtraData)
|
||||||
-> RawServoDeclarationBlockStrong {
|
-> RawServoDeclarationBlockStrong {
|
||||||
let name = unsafe { property.as_ref().unwrap().as_str_unchecked() };
|
let id = get_property_id_from_nscsspropertyid!(property,
|
||||||
let id = if let Ok(id) = PropertyId::parse(name.into()) {
|
RawServoDeclarationBlockStrong::null());
|
||||||
id
|
|
||||||
} else {
|
|
||||||
return RawServoDeclarationBlockStrong::null()
|
|
||||||
};
|
|
||||||
let value = unsafe { value.as_ref().unwrap().as_str_unchecked() };
|
let value = unsafe { value.as_ref().unwrap().as_str_unchecked() };
|
||||||
|
|
||||||
let url_data = unsafe { RefPtr::from_ptr_ref(&data) };
|
let url_data = unsafe { RefPtr::from_ptr_ref(&data) };
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue