aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/node.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/script/dom/node.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/script/dom/node.rs')
-rw-r--r--components/script/dom/node.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/components/script/dom/node.rs b/components/script/dom/node.rs
index ea00f62f43d..8d009bc2f98 100644
--- a/components/script/dom/node.rs
+++ b/components/script/dom/node.rs
@@ -73,6 +73,7 @@ use script_traits::UntrustedNodeAddress;
use selectors::matching::{MatchingReason, matches};
use selectors::parser::Selector;
use selectors::parser::parse_author_origin_selector_list_from_str;
+use servo_url::ServoUrl;
use std::borrow::ToOwned;
use std::cell::{Cell, UnsafeCell};
use std::cmp::max;
@@ -85,7 +86,6 @@ use style::dom::OpaqueNode;
use style::selector_impl::ServoSelectorImpl;
use style::stylesheets::Stylesheet;
use style::thread_state;
-use url::Url;
use uuid::Uuid;
//
@@ -968,7 +968,7 @@ pub trait LayoutNodeHelpers {
fn text_content(&self) -> String;
fn selection(&self) -> Option<Range<usize>>;
- fn image_url(&self) -> Option<Url>;
+ fn image_url(&self) -> Option<ServoUrl>;
fn canvas_data(&self) -> Option<HTMLCanvasData>;
fn svg_data(&self) -> Option<SVGSVGData>;
fn iframe_pipeline_id(&self) -> PipelineId;
@@ -1103,7 +1103,7 @@ impl LayoutNodeHelpers for LayoutJS<Node> {
}
#[allow(unsafe_code)]
- fn image_url(&self) -> Option<Url> {
+ fn image_url(&self) -> Option<ServoUrl> {
unsafe {
self.downcast::<HTMLImageElement>()
.expect("not an image!")