mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
style: Better debugging for stylesheets and URLs.
Bug: 1470145 Reviewed-by: xidorn MozReview-Commit-ID: FIcz2K1ZYX0
This commit is contained in:
parent
46e572a497
commit
f564b32b75
6 changed files with 63 additions and 28 deletions
|
@ -6,7 +6,7 @@
|
|||
|
||||
use cssparser::Parser;
|
||||
use gecko_bindings::bindings;
|
||||
use gecko_bindings::structs::{ServoBundledURI, URLExtraData};
|
||||
use gecko_bindings::structs::ServoBundledURI;
|
||||
use gecko_bindings::structs::mozilla::css::URLValueData;
|
||||
use gecko_bindings::structs::root::{RustString, nsStyleImageRequest};
|
||||
use gecko_bindings::structs::root::mozilla::css::{ImageValue, URLValue};
|
||||
|
@ -17,6 +17,7 @@ use parser::{Parse, ParserContext};
|
|||
use servo_arc::{Arc, RawOffsetArc};
|
||||
use std::fmt::{self, Write};
|
||||
use std::mem;
|
||||
use stylesheets::UrlExtraData;
|
||||
use style_traits::{CssWriter, ParseError, ToCss};
|
||||
use values::computed::{Context, ToComputedValue};
|
||||
|
||||
|
@ -32,7 +33,7 @@ pub struct CssUrl {
|
|||
|
||||
/// The URL extra data.
|
||||
#[css(skip)]
|
||||
pub extra_data: RefPtr<URLExtraData>,
|
||||
pub extra_data: UrlExtraData,
|
||||
}
|
||||
|
||||
impl CssUrl {
|
||||
|
@ -58,7 +59,7 @@ impl CssUrl {
|
|||
&url.mString as *const _ as *const RawOffsetArc<String>;
|
||||
CssUrl {
|
||||
serialization: Arc::from_raw_offset((*arc_type).clone()),
|
||||
extra_data: url.mExtraData.to_safe(),
|
||||
extra_data: UrlExtraData(url.mExtraData.to_safe()),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -88,7 +89,7 @@ impl CssUrl {
|
|||
let arc_offset = Arc::into_raw_offset(self.serialization.clone());
|
||||
ServoBundledURI {
|
||||
mURLString: unsafe { mem::transmute::<_, RawOffsetArc<RustString>>(arc_offset) },
|
||||
mExtraData: self.extra_data.get(),
|
||||
mExtraData: self.extra_data.0.get(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue