From 14d8eb93ba2e95f0511056b84f04f008ec873882 Mon Sep 17 00:00:00 2001 From: Manish Goregaokar Date: Wed, 22 Feb 2017 17:19:04 -0800 Subject: [PATCH] stylo: Handle SVG presentation attributes --- components/style/gecko_bindings/bindings.rs | 5 +++-- ports/geckolib/glue.rs | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/components/style/gecko_bindings/bindings.rs b/components/style/gecko_bindings/bindings.rs index d82dfe727a97..763ad94e2195 100644 --- a/components/style/gecko_bindings/bindings.rs +++ b/components/style/gecko_bindings/bindings.rs @@ -1464,7 +1464,8 @@ extern "C" { RawServoDeclarationBlockBorrowed, property: *const nsACString_internal, - value: *mut nsACString_internal, + value: + *const nsACString_internal, is_important: bool) -> bool; } extern "C" { @@ -1472,7 +1473,7 @@ extern "C" { RawServoDeclarationBlockBorrowed, property: nsCSSPropertyID, value: - *mut nsACString_internal, + *const nsACString_internal, is_important: bool) -> bool; } extern "C" { diff --git a/ports/geckolib/glue.rs b/ports/geckolib/glue.rs index 06f3c0f3de8c..aab286b9ba89 100644 --- a/ports/geckolib/glue.rs +++ b/ports/geckolib/glue.rs @@ -819,7 +819,7 @@ pub extern "C" fn Servo_DeclarationBlock_GetPropertyIsImportant(declarations: Ra } fn set_property(declarations: RawServoDeclarationBlockBorrowed, property_id: PropertyId, - value: *mut nsACString, is_important: bool) -> bool { + value: *const nsACString, is_important: bool) -> bool { let value = unsafe { value.as_ref().unwrap().as_str_unchecked() }; // FIXME Needs real URL and ParserContextExtraData. let base_url = &*DUMMY_BASE_URL; @@ -840,14 +840,14 @@ fn set_property(declarations: RawServoDeclarationBlockBorrowed, property_id: Pro #[no_mangle] pub extern "C" fn Servo_DeclarationBlock_SetProperty(declarations: RawServoDeclarationBlockBorrowed, - property: *const nsACString, value: *mut nsACString, + property: *const nsACString, value: *const nsACString, is_important: bool) -> bool { set_property(declarations, get_property_id_from_property!(property, false), value, is_important) } #[no_mangle] pub extern "C" fn Servo_DeclarationBlock_SetPropertyById(declarations: RawServoDeclarationBlockBorrowed, - property: nsCSSPropertyID, value: *mut nsACString, + property: nsCSSPropertyID, value: *const nsACString, is_important: bool) -> bool { set_property(declarations, get_property_id_from_nscsspropertyid!(property, false), value, is_important) }