From c57b24c4686810b3fd56d25e056a3e2f5a890148 Mon Sep 17 00:00:00 2001 From: Hiroyuki Ikezoe Date: Fri, 14 Apr 2017 23:36:04 +0900 Subject: [PATCH] Servo_ParseProperty() takes nsCSSPropertyID instead of nsACString. --- ports/geckolib/glue.rs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/ports/geckolib/glue.rs b/ports/geckolib/glue.rs index 58d4d8f7a4e..94d26386cd7 100644 --- a/ports/geckolib/glue.rs +++ b/ports/geckolib/glue.rs @@ -990,15 +990,11 @@ pub extern "C" fn Servo_StyleSet_Drop(data: RawServoStyleSetOwned) { } #[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) -> RawServoDeclarationBlockStrong { - let name = unsafe { property.as_ref().unwrap().as_str_unchecked() }; - let id = if let Ok(id) = PropertyId::parse(name.into()) { - id - } else { - return RawServoDeclarationBlockStrong::null() - }; + let id = get_property_id_from_nscsspropertyid!(property, + RawServoDeclarationBlockStrong::null()); let value = unsafe { value.as_ref().unwrap().as_str_unchecked() }; let url_data = unsafe { RefPtr::from_ptr_ref(&data) };