зеркало из https://github.com/mozilla/gecko-dev.git
servo: Merge #11632 - Implement URL.domainToUnicode (from achals:master); r=KiChjang
Fixes #11629 --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #11629 (github issue number if applicable). <!-- Either: --> - [X] There are tests for these changes: Some expected test failures have been removed. <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> Source-Repo: https://github.com/servo/servo Source-Revision: 21687b0f30dc6ebcfe1b1a499e978bf356f4698b
This commit is contained in:
Родитель
e505d3bbfc
Коммит
b6b41cd183
|
@ -13,6 +13,7 @@ use dom::urlhelper::UrlHelper;
|
|||
use dom::urlsearchparams::URLSearchParams;
|
||||
use std::borrow::ToOwned;
|
||||
use std::default::Default;
|
||||
use url::quirks::domain_to_unicode;
|
||||
use url::{Host, Url};
|
||||
|
||||
// https://url.spec.whatwg.org/#url
|
||||
|
@ -100,6 +101,10 @@ impl URL {
|
|||
USVString("".to_owned())
|
||||
}
|
||||
}
|
||||
|
||||
pub fn DomainToUnicode(_: GlobalRef, origin: USVString) -> USVString {
|
||||
USVString(domain_to_unicode(&origin.0))
|
||||
}
|
||||
}
|
||||
|
||||
impl URLMethods for URL {
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
Exposed=(Window,Worker)*/]
|
||||
interface URL {
|
||||
static USVString domainToASCII(USVString domain);
|
||||
// static USVString domainToUnicode(USVString domain);
|
||||
static USVString domainToUnicode(USVString domain);
|
||||
|
||||
[SetterThrows]
|
||||
/*stringifier*/ attribute USVString href;
|
||||
|
|
Загрузка…
Ссылка в новой задаче