mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +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)",
|
"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)",
|
"parking_lot 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"selectors 0.18.0",
|
"selectors 0.18.0",
|
||||||
"servo_url 0.0.1",
|
|
||||||
"style 0.0.1",
|
"style 0.0.1",
|
||||||
"style_traits 0.0.1",
|
"style_traits 0.0.1",
|
||||||
"stylo_tests 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"]}
|
log = {version = "0.3.5", features = ["release_max_level_info"]}
|
||||||
parking_lot = "0.3"
|
parking_lot = "0.3"
|
||||||
selectors = {path = "../../components/selectors"}
|
selectors = {path = "../../components/selectors"}
|
||||||
servo_url = {path = "../../components/url"}
|
|
||||||
style = {path = "../../components/style", features = ["gecko"]}
|
style = {path = "../../components/style", features = ["gecko"]}
|
||||||
style_traits = {path = "../../components/style_traits"}
|
style_traits = {path = "../../components/style_traits"}
|
||||||
|
|
||||||
|
|
|
@ -327,7 +327,6 @@ pub extern "C" fn Servo_StyleSheet_FromUTF8Bytes(loader: *mut Loader,
|
||||||
stylesheet: *mut ServoStyleSheet,
|
stylesheet: *mut ServoStyleSheet,
|
||||||
data: *const nsACString,
|
data: *const nsACString,
|
||||||
mode: SheetParsingMode,
|
mode: SheetParsingMode,
|
||||||
_base_url: *const nsACString,
|
|
||||||
extra_data: *mut URLExtraData)
|
extra_data: *mut URLExtraData)
|
||||||
-> RawServoStyleSheetStrong {
|
-> RawServoStyleSheetStrong {
|
||||||
let global_style_data = &*GLOBAL_STYLE_DATA;
|
let global_style_data = &*GLOBAL_STYLE_DATA;
|
||||||
|
@ -775,7 +774,6 @@ pub extern "C" fn Servo_StyleSet_Drop(data: RawServoStyleSetOwned) {
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub extern "C" fn Servo_ParseProperty(property: *const nsACString, value: *const nsACString,
|
pub extern "C" fn Servo_ParseProperty(property: *const nsACString, value: *const nsACString,
|
||||||
_base: *const nsACString,
|
|
||||||
data: *mut URLExtraData)
|
data: *mut URLExtraData)
|
||||||
-> RawServoDeclarationBlockStrong {
|
-> RawServoDeclarationBlockStrong {
|
||||||
let name = unsafe { property.as_ref().unwrap().as_str_unchecked() };
|
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]
|
#[no_mangle]
|
||||||
pub extern "C" fn Servo_ParseEasing(easing: *const nsAString,
|
pub extern "C" fn Servo_ParseEasing(easing: *const nsAString,
|
||||||
_base: *const nsACString,
|
|
||||||
data: *mut URLExtraData,
|
data: *mut URLExtraData,
|
||||||
output: nsTimingFunctionBorrowedMut)
|
output: nsTimingFunctionBorrowedMut)
|
||||||
-> bool {
|
-> bool {
|
||||||
|
@ -824,7 +821,6 @@ pub extern "C" fn Servo_ParseEasing(easing: *const nsAString,
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub extern "C" fn Servo_ParseStyleAttribute(data: *const nsACString,
|
pub extern "C" fn Servo_ParseStyleAttribute(data: *const nsACString,
|
||||||
_base: *const nsACString,
|
|
||||||
raw_extra_data: *mut URLExtraData)
|
raw_extra_data: *mut URLExtraData)
|
||||||
-> RawServoDeclarationBlockStrong {
|
-> RawServoDeclarationBlockStrong {
|
||||||
let global_style_data = &*GLOBAL_STYLE_DATA;
|
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,
|
fn set_property(declarations: RawServoDeclarationBlockBorrowed, property_id: PropertyId,
|
||||||
value: *const nsACString, is_important: bool,
|
value: *const nsACString, is_important: bool, data: *mut URLExtraData) -> bool {
|
||||||
_base: *const nsACString, data: *mut URLExtraData) -> bool {
|
|
||||||
let value = unsafe { value.as_ref().unwrap().as_str_unchecked() };
|
let value = unsafe { value.as_ref().unwrap().as_str_unchecked() };
|
||||||
|
|
||||||
let url_data = unsafe { RefPtr::from_ptr_ref(&data) };
|
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,
|
pub extern "C" fn Servo_DeclarationBlock_SetProperty(declarations: RawServoDeclarationBlockBorrowed,
|
||||||
property: *const nsACString, value: *const nsACString,
|
property: *const nsACString, value: *const nsACString,
|
||||||
is_important: bool,
|
is_important: bool,
|
||||||
base: *const nsACString,
|
|
||||||
data: *mut URLExtraData) -> bool {
|
data: *mut URLExtraData) -> bool {
|
||||||
set_property(declarations, get_property_id_from_property!(property, false),
|
set_property(declarations, get_property_id_from_property!(property, false),
|
||||||
value, is_important, base, data)
|
value, is_important, data)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub extern "C" fn Servo_DeclarationBlock_SetPropertyById(declarations: RawServoDeclarationBlockBorrowed,
|
pub extern "C" fn Servo_DeclarationBlock_SetPropertyById(declarations: RawServoDeclarationBlockBorrowed,
|
||||||
property: nsCSSPropertyID, value: *const nsACString,
|
property: nsCSSPropertyID, value: *const nsACString,
|
||||||
is_important: bool,
|
is_important: bool,
|
||||||
base: *const nsACString,
|
|
||||||
data: *mut URLExtraData) -> bool {
|
data: *mut URLExtraData) -> bool {
|
||||||
set_property(declarations, get_property_id_from_nscsspropertyid!(property, false),
|
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) {
|
fn remove_property(declarations: RawServoDeclarationBlockBorrowed, property_id: PropertyId) {
|
||||||
|
|
|
@ -11,7 +11,6 @@ extern crate libc;
|
||||||
#[macro_use] extern crate log;
|
#[macro_use] extern crate log;
|
||||||
extern crate parking_lot;
|
extern crate parking_lot;
|
||||||
extern crate selectors;
|
extern crate selectors;
|
||||||
extern crate servo_url;
|
|
||||||
#[macro_use] extern crate style;
|
#[macro_use] extern crate style;
|
||||||
extern crate style_traits;
|
extern crate style_traits;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue