mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Stop passing in url as string for parsing.
This commit is contained in:
parent
2628ebe612
commit
806d73e696
4 changed files with 3 additions and 13 deletions
1
Cargo.lock
generated
1
Cargo.lock
generated
|
@ -945,7 +945,6 @@ dependencies = [
|
|||
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parking_lot 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"selectors 0.18.0",
|
||||
"servo_url 0.0.1",
|
||||
"style 0.0.1",
|
||||
"style_traits 0.0.1",
|
||||
"stylo_tests 0.0.1",
|
||||
|
|
|
@ -21,7 +21,6 @@ libc = "0.2"
|
|||
log = {version = "0.3.5", features = ["release_max_level_info"]}
|
||||
parking_lot = "0.3"
|
||||
selectors = {path = "../../components/selectors"}
|
||||
servo_url = {path = "../../components/url"}
|
||||
style = {path = "../../components/style", features = ["gecko"]}
|
||||
style_traits = {path = "../../components/style_traits"}
|
||||
|
||||
|
|
|
@ -327,7 +327,6 @@ pub extern "C" fn Servo_StyleSheet_FromUTF8Bytes(loader: *mut Loader,
|
|||
stylesheet: *mut ServoStyleSheet,
|
||||
data: *const nsACString,
|
||||
mode: SheetParsingMode,
|
||||
_base_url: *const nsACString,
|
||||
extra_data: *mut URLExtraData)
|
||||
-> RawServoStyleSheetStrong {
|
||||
let global_style_data = &*GLOBAL_STYLE_DATA;
|
||||
|
@ -775,7 +774,6 @@ pub extern "C" fn Servo_StyleSet_Drop(data: RawServoStyleSetOwned) {
|
|||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn Servo_ParseProperty(property: *const nsACString, value: *const nsACString,
|
||||
_base: *const nsACString,
|
||||
data: *mut URLExtraData)
|
||||
-> RawServoDeclarationBlockStrong {
|
||||
let name = unsafe { property.as_ref().unwrap().as_str_unchecked() };
|
||||
|
@ -803,7 +801,6 @@ pub extern "C" fn Servo_ParseProperty(property: *const nsACString, value: *const
|
|||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn Servo_ParseEasing(easing: *const nsAString,
|
||||
_base: *const nsACString,
|
||||
data: *mut URLExtraData,
|
||||
output: nsTimingFunctionBorrowedMut)
|
||||
-> bool {
|
||||
|
@ -824,7 +821,6 @@ pub extern "C" fn Servo_ParseEasing(easing: *const nsAString,
|
|||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn Servo_ParseStyleAttribute(data: *const nsACString,
|
||||
_base: *const nsACString,
|
||||
raw_extra_data: *mut URLExtraData)
|
||||
-> RawServoDeclarationBlockStrong {
|
||||
let global_style_data = &*GLOBAL_STYLE_DATA;
|
||||
|
@ -944,8 +940,7 @@ pub extern "C" fn Servo_DeclarationBlock_GetPropertyIsImportant(declarations: Ra
|
|||
}
|
||||
|
||||
fn set_property(declarations: RawServoDeclarationBlockBorrowed, property_id: PropertyId,
|
||||
value: *const nsACString, is_important: bool,
|
||||
_base: *const nsACString, data: *mut URLExtraData) -> bool {
|
||||
value: *const nsACString, is_important: bool, data: *mut URLExtraData) -> bool {
|
||||
let value = unsafe { value.as_ref().unwrap().as_str_unchecked() };
|
||||
|
||||
let url_data = unsafe { RefPtr::from_ptr_ref(&data) };
|
||||
|
@ -964,20 +959,18 @@ fn set_property(declarations: RawServoDeclarationBlockBorrowed, property_id: Pro
|
|||
pub extern "C" fn Servo_DeclarationBlock_SetProperty(declarations: RawServoDeclarationBlockBorrowed,
|
||||
property: *const nsACString, value: *const nsACString,
|
||||
is_important: bool,
|
||||
base: *const nsACString,
|
||||
data: *mut URLExtraData) -> bool {
|
||||
set_property(declarations, get_property_id_from_property!(property, false),
|
||||
value, is_important, base, data)
|
||||
value, is_important, data)
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn Servo_DeclarationBlock_SetPropertyById(declarations: RawServoDeclarationBlockBorrowed,
|
||||
property: nsCSSPropertyID, value: *const nsACString,
|
||||
is_important: bool,
|
||||
base: *const nsACString,
|
||||
data: *mut URLExtraData) -> bool {
|
||||
set_property(declarations, get_property_id_from_nscsspropertyid!(property, false),
|
||||
value, is_important, base, data)
|
||||
value, is_important, data)
|
||||
}
|
||||
|
||||
fn remove_property(declarations: RawServoDeclarationBlockBorrowed, property_id: PropertyId) {
|
||||
|
|
|
@ -11,7 +11,6 @@ extern crate libc;
|
|||
#[macro_use] extern crate log;
|
||||
extern crate parking_lot;
|
||||
extern crate selectors;
|
||||
extern crate servo_url;
|
||||
#[macro_use] extern crate style;
|
||||
extern crate style_traits;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue