Skip to content

Commit

Permalink
Stop passing in url as string for parsing.
Browse files Browse the repository at this point in the history
  • Loading branch information
upsuper committed Apr 3, 2017
1 parent 2628ebe commit 806d73e
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 13 deletions.
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion ports/geckolib/Cargo.toml
Expand Up @@ -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"}

Expand Down
13 changes: 3 additions & 10 deletions ports/geckolib/glue.rs
Expand Up @@ -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;
Expand Down Expand Up @@ -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() };
Expand Down Expand Up @@ -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 {
Expand All @@ -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;
Expand Down Expand Up @@ -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) };
Expand All @@ -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) {
Expand Down
1 change: 0 additions & 1 deletion ports/geckolib/lib.rs
Expand Up @@ -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;

Expand Down

0 comments on commit 806d73e

Please sign in to comment.