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.
|
||||
unsafe fn from_url_value_data(url: &URLValueData) -> Result<Self, ()> {
|
||||
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())
|
||||
},
|
||||
&url.mString as *const _ as *const RawOffsetArc<String>;
|
||||
Ok(CssUrl {
|
||||
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