stylo: Make URLs work in inline style

MozReview-Commit-ID: 6Tc0kBw4V8c
This commit is contained in:
Manish Goregaokar 2017-03-10 18:28:02 -08:00 committed by Manish Goregaokar
parent 06f99c13f2
commit 4deae33ab1
3 changed files with 13 additions and 10 deletions

View file

@ -718,9 +718,13 @@ pub extern "C" fn Servo_ParseProperty(property: *const nsACString, value: *const
}
#[no_mangle]
pub extern "C" fn Servo_ParseStyleAttribute(data: *const nsACString) -> RawServoDeclarationBlockStrong {
pub extern "C" fn Servo_ParseStyleAttribute(data: *const nsACString,
base: *const nsACString,
raw_extra_data: *const structs::GeckoParserExtraData)
-> RawServoDeclarationBlockStrong {
let value = unsafe { data.as_ref().unwrap().as_str_unchecked() };
Arc::new(RwLock::new(GeckoElement::parse_style_attribute(value))).into_strong()
make_context!((base, raw_extra_data) => (base_url, extra_data));
Arc::new(RwLock::new(GeckoElement::parse_style_attribute(value, &base_url, extra_data))).into_strong()
}
#[no_mangle]