mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
style: Simplify ImageValue.
Bug: 1452987 Reviewed-by: heycam MozReview-Commit-ID: 5LRaaEPSSdY
This commit is contained in:
parent
9a900ef019
commit
1d8e64c8ee
1 changed files with 3 additions and 7 deletions
|
@ -56,14 +56,10 @@ impl CssUrl {
|
|||
|
||||
/// Convert from URLValueData to SpecifiedUrl.
|
||||
unsafe fn from_url_value_data(url: &URLValueData) -> Result<Self, ()> {
|
||||
let arc_type =
|
||||
&url.mString as *const _ as *const RawOffsetArc<String>;
|
||||
Ok(CssUrl {
|
||||
serialization: if url.mUsingRustString {
|
||||
let arc_type =
|
||||
url.mStrings.mRustString.as_ref() as *const _ as *const RawOffsetArc<String>;
|
||||
Arc::from_raw_offset((*arc_type).clone())
|
||||
} else {
|
||||
Arc::new(url.mStrings.mString.as_ref().to_string())
|
||||
},
|
||||
serialization: Arc::from_raw_offset((*arc_type).clone()),
|
||||
extra_data: url.mExtraData.to_safe(),
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue