Auto merge of #13912 - ddrmanxbxfr:remove-deprecated-url-methods, r=Ms2ger

Remove URL.domainToASCII and URL.domainToUnicode

Modifications

- Removed URL.domainToASCII method
- Removed URL.domainToUnicode method
- Added test in wpt to make sure both method are undefined.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #13835  (github issue number if applicable).
- [X] There are tests for these changes

<!-- 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/13912)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-10-25 19:46:54 -05:00 committed by GitHub
commit 4b28750b9a
7 changed files with 20 additions and 48 deletions

View file

@ -17,10 +17,8 @@ use ipc_channel::ipc;
use net_traits::{CoreResourceMsg, IpcSend};
use net_traits::blob_url_store::{get_blob_origin, parse_blob_url};
use net_traits::filemanager_thread::FileManagerThreadMsg;
use std::borrow::ToOwned;
use std::default::Default;
use url::{Host, Url};
use url::quirks::domain_to_unicode;
use url::Url;
use uuid::Uuid;
// https://url.spec.whatwg.org/#url
@ -96,23 +94,6 @@ impl URL {
Ok(result)
}
// https://url.spec.whatwg.org/#dom-url-domaintoasciidomain
pub fn DomainToASCII(_: &GlobalScope, origin: USVString) -> USVString {
// Step 1.
let ascii_domain = Host::parse(&origin.0);
if let Ok(Host::Domain(string)) = ascii_domain {
// Step 3.
USVString(string.to_owned())
} else {
// Step 2.
USVString("".to_owned())
}
}
pub fn DomainToUnicode(_: &GlobalScope, origin: USVString) -> USVString {
USVString(domain_to_unicode(&origin.0))
}
// https://w3c.github.io/FileAPI/#dfn-createObjectURL
pub fn CreateObjectURL(global: &GlobalScope, blob: &Blob) -> DOMString {
/// XXX: Second field is an unicode-serialized Origin, it is a temporary workaround

View file

@ -5,9 +5,6 @@
// https://url.spec.whatwg.org/#url
[Constructor(USVString url, optional USVString base), Exposed=(Window,Worker)]
interface URL {
static USVString domainToASCII(USVString domain);
static USVString domainToUnicode(USVString domain);
[SetterThrows]
/*stringifier*/ attribute USVString href;
readonly attribute USVString origin;