mirror of
https://github.com/servo/servo.git
synced 2025-07-05 14:33:38 +01:00
Auto merge of #20620 - emilio:imagevalue, r=heycam
style: Simplify ImageValue. Bug: 1452987 Reviewed-by: heycam MozReview-Commit-ID: 5LRaaEPSSdY <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20620) <!-- Reviewable:end -->
This commit is contained in:
commit
5182c81c11
2 changed files with 529 additions and 716 deletions
File diff suppressed because it is too large
Load diff
|
@ -56,14 +56,10 @@ impl CssUrl {
|
||||||
|
|
||||||
/// Convert from URLValueData to SpecifiedUrl.
|
/// Convert from URLValueData to SpecifiedUrl.
|
||||||
unsafe fn from_url_value_data(url: &URLValueData) -> Result<Self, ()> {
|
unsafe fn from_url_value_data(url: &URLValueData) -> Result<Self, ()> {
|
||||||
Ok(CssUrl {
|
|
||||||
serialization: if url.mUsingRustString {
|
|
||||||
let arc_type =
|
let arc_type =
|
||||||
url.mStrings.mRustString.as_ref() as *const _ as *const RawOffsetArc<String>;
|
&url.mString as *const _ as *const RawOffsetArc<String>;
|
||||||
Arc::from_raw_offset((*arc_type).clone())
|
Ok(CssUrl {
|
||||||
} else {
|
serialization: Arc::from_raw_offset((*arc_type).clone()),
|
||||||
Arc::new(url.mStrings.mString.as_ref().to_string())
|
|
||||||
},
|
|
||||||
extra_data: url.mExtraData.to_safe(),
|
extra_data: url.mExtraData.to_safe(),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue