mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
use Either type for UrlOrNone
fix test-tidy errors fix style unit test use the Parse trait instead of ParseWithContext fix stylo test and geckolib build move all specified url parse code to parse trait and remove refs to unused type
This commit is contained in:
parent
7be32770b1
commit
206f4ea5b8
9 changed files with 30 additions and 49 deletions
|
@ -1089,10 +1089,10 @@ fn static_assert() {
|
|||
|
||||
#[allow(non_snake_case)]
|
||||
pub fn set__moz_binding(&mut self, v: longhands::_moz_binding::computed_value::T) {
|
||||
use properties::longhands::_moz_binding::computed_value::T as BindingValue;
|
||||
use values::Either;
|
||||
match v {
|
||||
BindingValue::None => debug_assert!(self.gecko.mBinding.mRawPtr.is_null()),
|
||||
BindingValue::Url(ref url) => {
|
||||
Either::Second(_none) => debug_assert!(self.gecko.mBinding.mRawPtr.is_null()),
|
||||
Either::First(ref url) => {
|
||||
let extra_data = url.extra_data();
|
||||
let (ptr, len) = url.as_slice_components();
|
||||
unsafe {
|
||||
|
@ -1593,14 +1593,14 @@ fn static_assert() {
|
|||
skip_additionals="*">
|
||||
|
||||
pub fn set_list_style_image(&mut self, image: longhands::list_style_image::computed_value::T) {
|
||||
use values::computed::UrlOrNone;
|
||||
use values::Either;
|
||||
match image {
|
||||
UrlOrNone::None => {
|
||||
Either::Second(_none) => {
|
||||
unsafe {
|
||||
Gecko_SetListStyleImageNone(&mut self.gecko);
|
||||
}
|
||||
}
|
||||
UrlOrNone::Url(ref url) => {
|
||||
Either::First(ref url) => {
|
||||
let (ptr, len) = url.as_slice_components();
|
||||
let extra_data = url.extra_data();
|
||||
unsafe {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue