mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
Use parse_property for Servo_CSSSupports2() as well.
This commit is contained in:
parent
7ebdf95a3d
commit
51fb4456fc
1 changed files with 2 additions and 14 deletions
|
@ -1827,21 +1827,9 @@ pub extern "C" fn Servo_DeclarationBlock_SetTextDecorationColorOverride(declarat
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub extern "C" fn Servo_CSSSupports2(property: *const nsACString, value: *const nsACString) -> bool {
|
pub extern "C" fn Servo_CSSSupports2(property: *const nsACString, value: *const nsACString) -> bool {
|
||||||
let property = unsafe { property.as_ref().unwrap().as_str_unchecked() };
|
let id = get_property_id_from_property!(property, false);
|
||||||
let id = if let Ok(id) = PropertyId::parse(property.into()) {
|
|
||||||
id
|
|
||||||
} else {
|
|
||||||
return false
|
|
||||||
};
|
|
||||||
let value = unsafe { value.as_ref().unwrap().as_str_unchecked() };
|
|
||||||
|
|
||||||
let url_data = unsafe { dummy_url_data() };
|
parse_property(id, value, unsafe { DUMMY_URL_DATA }, structs::LengthParsingMode::Default).is_ok()
|
||||||
parse_one_declaration(id,
|
|
||||||
&value,
|
|
||||||
url_data,
|
|
||||||
&RustLogReporter,
|
|
||||||
LengthParsingMode::Default,
|
|
||||||
QuirksMode::NoQuirks).is_ok()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue