diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2016-11-17 15:34:47 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-17 15:34:47 -0600 |
commit | 22aebdf5d41a3509cd6515ccf5edcdf33715a76d (patch) | |
tree | 824af410d147404d0a6dc0908cec85cc71df5bfd /components/script/origin.rs | |
parent | b3ad71353bf264770bf0b3a87b32d86928eb09d4 (diff) | |
parent | 913c874cb55fd0fdc9e8f3a4c34624cd015fac8a (diff) | |
download | servo-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/origin.rs')
-rw-r--r-- | components/script/origin.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/components/script/origin.rs b/components/script/origin.rs index 21204980e26..067eb77dcda 100644 --- a/components/script/origin.rs +++ b/components/script/origin.rs @@ -2,8 +2,9 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +use servo_url::ServoUrl; use std::sync::Arc; -use url::{Host, Url}; +use url::Host; use url::Origin as UrlOrigin; /// A representation of an [origin](https://html.spec.whatwg.org/multipage/#origin-2). @@ -22,7 +23,7 @@ impl Origin { } /// Create a new origin for the given URL. - pub fn new(url: &Url) -> Origin { + pub fn new(url: &ServoUrl) -> Origin { Origin { inner: Arc::new(url.origin()), } |