aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/fragment.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2016-11-17 15:34:47 -0600
committerGitHub <noreply@github.com>2016-11-17 15:34:47 -0600
commit22aebdf5d41a3509cd6515ccf5edcdf33715a76d (patch)
tree824af410d147404d0a6dc0908cec85cc71df5bfd /components/layout/fragment.rs
parentb3ad71353bf264770bf0b3a87b32d86928eb09d4 (diff)
parent913c874cb55fd0fdc9e8f3a4c34624cd015fac8a (diff)
downloadservo-22aebdf5d41a3509cd6515ccf5edcdf33715a76d.tar.gz
servo-22aebdf5d41a3509cd6515ccf5edcdf33715a76d.zip
Auto merge of #14246 - emilio:servo-url, r=SimonSapin
Urlmageddon <!-- Please describe your changes on the following line: --> Still needs a bunch of code in net to be converted in order to get more advantage of this for images and stuff, but meanwhile this should help quite a bit with #13778. Still wanted to get this in. r? @SimonSapin <!-- 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/14246) <!-- Reviewable:end -->
Diffstat (limited to 'components/layout/fragment.rs')
-rw-r--r--components/layout/fragment.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/layout/fragment.rs b/components/layout/fragment.rs
index f947c4f9493..9b4ee750a45 100644
--- a/components/layout/fragment.rs
+++ b/components/layout/fragment.rs
@@ -32,6 +32,7 @@ use script_layout_interface::HTMLCanvasData;
use script_layout_interface::SVGSVGData;
use script_layout_interface::wrapper_traits::{PseudoElementType, ThreadSafeLayoutElement, ThreadSafeLayoutNode};
use serde::{Serialize, Serializer};
+use servo_url::ServoUrl;
use std::borrow::ToOwned;
use std::cmp::{max, min};
use std::collections::LinkedList;
@@ -54,7 +55,6 @@ use style::values::computed::{LengthOrPercentage, LengthOrPercentageOrAuto};
use style::values::computed::LengthOrPercentageOrNone;
use text;
use text::TextRunScanner;
-use url::Url;
// From gfxFontConstants.h in Firefox.
static FONT_SUBSCRIPT_OFFSET_RATIO: f32 = 0.20;
@@ -419,7 +419,7 @@ impl ImageFragmentInfo {
///
/// FIXME(pcwalton): The fact that image fragments store the cache in the fragment makes little
/// sense to me.
- pub fn new<N: ThreadSafeLayoutNode>(node: &N, url: Option<Url>,
+ pub fn new<N: ThreadSafeLayoutNode>(node: &N, url: Option<ServoUrl>,
shared_layout_context: &SharedLayoutContext)
-> ImageFragmentInfo {
let image_or_metadata = url.and_then(|url| {