mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Urlmageddon: Use refcounted urls more often.
This commit is contained in:
parent
f14e7339b5
commit
913c874cb5
161 changed files with 1044 additions and 718 deletions
|
@ -36,6 +36,7 @@ use model::{self, MaybeAuto, ToGfxMatrix};
|
|||
use net_traits::image::base::PixelFormat;
|
||||
use net_traits::image_cache_thread::UsePlaceholder;
|
||||
use range::Range;
|
||||
use servo_url::ServoUrl;
|
||||
use std::{cmp, f32};
|
||||
use std::collections::HashMap;
|
||||
use std::default::Default;
|
||||
|
@ -57,7 +58,6 @@ use style::values::computed::{Gradient, GradientKind, LengthOrPercentage, Length
|
|||
use style::values::specified::{AngleOrCorner, HorizontalDirection, VerticalDirection};
|
||||
use style_traits::cursor::Cursor;
|
||||
use table_cell::CollapsedBordersForCell;
|
||||
use url::Url;
|
||||
use util::opts;
|
||||
use webrender_traits::{ColorF, GradientStop};
|
||||
|
||||
|
@ -360,7 +360,7 @@ pub trait FragmentDisplayListBuilding {
|
|||
display_list_section: DisplayListSection,
|
||||
absolute_bounds: &Rect<Au>,
|
||||
clip: &ClippingRegion,
|
||||
image_url: &Url,
|
||||
image_url: &ServoUrl,
|
||||
background_index: usize);
|
||||
|
||||
/// Adds the display items necessary to paint the background linear gradient of this fragment
|
||||
|
@ -692,11 +692,11 @@ impl FragmentDisplayListBuilding for Fragment {
|
|||
display_list_section: DisplayListSection,
|
||||
absolute_bounds: &Rect<Au>,
|
||||
clip: &ClippingRegion,
|
||||
image_url: &Url,
|
||||
image_url: &ServoUrl,
|
||||
index: usize) {
|
||||
let background = style.get_background();
|
||||
let webrender_image = state.shared_layout_context
|
||||
.get_webrender_image_for_url(image_url,
|
||||
.get_webrender_image_for_url(image_url.clone(),
|
||||
UsePlaceholder::No);
|
||||
|
||||
if let Some(webrender_image) = webrender_image {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue