mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
Make the traits for the IDL interfaces take &self
This commit is contained in:
parent
856fda7f2e
commit
709d347872
99 changed files with 1192 additions and 1192 deletions
|
@ -35,9 +35,9 @@ impl Location {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> LocationMethods for &'a Location {
|
||||
impl LocationMethods for Location {
|
||||
// https://html.spec.whatwg.org/multipage/#dom-location-assign
|
||||
fn Assign(self, url: DOMString) {
|
||||
fn Assign(&self, url: DOMString) {
|
||||
let window = self.window.root();
|
||||
// TODO: per spec, we should use the _API base URL_ specified by the
|
||||
// _entry settings object_.
|
||||
|
@ -48,57 +48,57 @@ impl<'a> LocationMethods for &'a Location {
|
|||
}
|
||||
|
||||
// https://url.spec.whatwg.org/#dom-urlutils-hash
|
||||
fn Hash(self) -> USVString {
|
||||
fn Hash(&self) -> USVString {
|
||||
UrlHelper::Hash(&self.get_url())
|
||||
}
|
||||
|
||||
// https://url.spec.whatwg.org/#dom-urlutils-href
|
||||
fn Href(self) -> USVString {
|
||||
fn Href(&self) -> USVString {
|
||||
UrlHelper::Href(&self.get_url())
|
||||
}
|
||||
|
||||
// https://url.spec.whatwg.org/#dom-urlutils-host
|
||||
fn Host(self) -> USVString {
|
||||
fn Host(&self) -> USVString {
|
||||
UrlHelper::Host(&self.get_url())
|
||||
}
|
||||
|
||||
// https://url.spec.whatwg.org/#dom-urlutils-hostname
|
||||
fn Hostname(self) -> USVString {
|
||||
fn Hostname(&self) -> USVString {
|
||||
UrlHelper::Hostname(&self.get_url())
|
||||
}
|
||||
|
||||
// https://url.spec.whatwg.org/#dom-urlutils-password
|
||||
fn Password(self) -> USVString {
|
||||
fn Password(&self) -> USVString {
|
||||
UrlHelper::Password(&self.get_url())
|
||||
}
|
||||
|
||||
// https://url.spec.whatwg.org/#dom-urlutils-pathname
|
||||
fn Pathname(self) -> USVString {
|
||||
fn Pathname(&self) -> USVString {
|
||||
UrlHelper::Pathname(&self.get_url())
|
||||
}
|
||||
|
||||
// https://url.spec.whatwg.org/#dom-urlutils-port
|
||||
fn Port(self) -> USVString {
|
||||
fn Port(&self) -> USVString {
|
||||
UrlHelper::Port(&self.get_url())
|
||||
}
|
||||
|
||||
// https://url.spec.whatwg.org/#dom-urlutils-protocol
|
||||
fn Protocol(self) -> USVString {
|
||||
fn Protocol(&self) -> USVString {
|
||||
UrlHelper::Protocol(&self.get_url())
|
||||
}
|
||||
|
||||
// https://url.spec.whatwg.org/#URLUtils-stringification-behavior
|
||||
fn Stringifier(self) -> DOMString {
|
||||
fn Stringifier(&self) -> DOMString {
|
||||
self.Href().0
|
||||
}
|
||||
|
||||
// https://url.spec.whatwg.org/#dom-urlutils-search
|
||||
fn Search(self) -> USVString {
|
||||
fn Search(&self) -> USVString {
|
||||
UrlHelper::Search(&self.get_url())
|
||||
}
|
||||
|
||||
// https://url.spec.whatwg.org/#dom-urlutils-username
|
||||
fn Username(self) -> USVString {
|
||||
fn Username(&self) -> USVString {
|
||||
UrlHelper::Username(&self.get_url())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue