mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +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
|
@ -34,26 +34,26 @@ impl DOMStringMap {
|
|||
}
|
||||
|
||||
// https://html.spec.whatwg.org/#domstringmap
|
||||
impl<'a> DOMStringMapMethods for &'a DOMStringMap {
|
||||
impl DOMStringMapMethods for DOMStringMap {
|
||||
// https://html.spec.whatwg.org/multipage/#dom-domstringmap-additem
|
||||
fn NamedCreator(self, name: DOMString, value: DOMString) -> ErrorResult {
|
||||
fn NamedCreator(&self, name: DOMString, value: DOMString) -> ErrorResult {
|
||||
self.NamedSetter(name, value)
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-domstringmap-removeitem
|
||||
fn NamedDeleter(self, name: DOMString) {
|
||||
fn NamedDeleter(&self, name: DOMString) {
|
||||
let element = self.element.root();
|
||||
element.r().delete_custom_attr(name)
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-domstringmap-setitem
|
||||
fn NamedSetter(self, name: DOMString, value: DOMString) -> ErrorResult {
|
||||
fn NamedSetter(&self, name: DOMString, value: DOMString) -> ErrorResult {
|
||||
let element = self.element.root();
|
||||
element.r().set_custom_attr(name, value)
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-domstringmap-nameditem
|
||||
fn NamedGetter(self, name: DOMString, found: &mut bool) -> DOMString {
|
||||
fn NamedGetter(&self, name: DOMString, found: &mut bool) -> DOMString {
|
||||
let element = self.element.root();
|
||||
match element.r().get_custom_attr(name) {
|
||||
Some(value) => {
|
||||
|
@ -68,7 +68,7 @@ impl<'a> DOMStringMapMethods for &'a DOMStringMap {
|
|||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#domstringmap
|
||||
fn SupportedPropertyNames(self) -> Vec<DOMString> {
|
||||
fn SupportedPropertyNames(&self) -> Vec<DOMString> {
|
||||
// FIXME: unimplemented (https://github.com/servo/servo/issues/7273)
|
||||
vec![]
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue