mirror of
https://github.com/servo/servo.git
synced 2025-08-09 07:25:35 +01:00
style: Centralize specified url value handling, and refcount urls.
This commit is contained in:
parent
89c46369a2
commit
5f2e7af864
22 changed files with 267 additions and 187 deletions
|
@ -120,11 +120,13 @@ impl nsStyleImage {
|
|||
Image::Gradient(gradient) => {
|
||||
self.set_gradient(gradient)
|
||||
},
|
||||
Image::Url(ref url, ref extra_data) if with_url => {
|
||||
Image::Url(ref url) if with_url => {
|
||||
let (ptr, len) = url.as_slice_components();
|
||||
let extra_data = url.extra_data();
|
||||
unsafe {
|
||||
Gecko_SetUrlImageValue(self,
|
||||
url.as_str().as_ptr(),
|
||||
url.as_str().len() as u32,
|
||||
ptr,
|
||||
len as u32,
|
||||
extra_data.base.get(),
|
||||
extra_data.referrer.get(),
|
||||
extra_data.principal.get());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue