Skip to content

Commit

Permalink
stylo: Handle SVG presentation attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
Manishearth committed Mar 9, 2017
1 parent 9e6fce4 commit 14d8eb9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions components/style/gecko_bindings/bindings.rs
Expand Up @@ -1464,15 +1464,16 @@ extern "C" {
RawServoDeclarationBlockBorrowed,
property:
*const nsACString_internal,
value: *mut nsACString_internal,
value:
*const nsACString_internal,
is_important: bool) -> bool;
}
extern "C" {
pub fn Servo_DeclarationBlock_SetPropertyById(declarations:
RawServoDeclarationBlockBorrowed,
property: nsCSSPropertyID,
value:
*mut nsACString_internal,
*const nsACString_internal,
is_important: bool) -> bool;
}
extern "C" {
Expand Down
6 changes: 3 additions & 3 deletions ports/geckolib/glue.rs
Expand Up @@ -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;
Expand All @@ -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)
}
Expand Down

0 comments on commit 14d8eb9

Please sign in to comment.