mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +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
|
@ -251,7 +251,7 @@ impl FileReader {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> FileReaderMethods for &'a FileReader {
|
||||
impl FileReaderMethods for FileReader {
|
||||
event_handler!(loadstart, GetOnloadstart, SetOnloadstart);
|
||||
event_handler!(progress, GetOnprogress, SetOnprogress);
|
||||
event_handler!(load, GetOnload, SetOnload);
|
||||
|
@ -261,17 +261,17 @@ impl<'a> FileReaderMethods for &'a FileReader {
|
|||
|
||||
//TODO https://w3c.github.io/FileAPI/#dfn-readAsArrayBuffer
|
||||
// https://w3c.github.io/FileAPI/#dfn-readAsDataURL
|
||||
fn ReadAsDataURL(self, blob: &Blob) -> ErrorResult {
|
||||
fn ReadAsDataURL(&self, blob: &Blob) -> ErrorResult {
|
||||
self.read(FileReaderFunction::ReadAsDataUrl, blob, None)
|
||||
}
|
||||
|
||||
// https://w3c.github.io/FileAPI/#dfn-readAsText
|
||||
fn ReadAsText(self, blob: &Blob, label: Option<DOMString>) -> ErrorResult {
|
||||
fn ReadAsText(&self, blob: &Blob, label: Option<DOMString>) -> ErrorResult {
|
||||
self.read(FileReaderFunction::ReadAsText, blob, label)
|
||||
}
|
||||
|
||||
// https://w3c.github.io/FileAPI/#dfn-abort
|
||||
fn Abort(self) {
|
||||
fn Abort(&self) {
|
||||
// Step 2
|
||||
if self.ready_state.get() == FileReaderReadyState::Loading {
|
||||
self.change_ready_state(FileReaderReadyState::Done);
|
||||
|
@ -290,17 +290,17 @@ impl<'a> FileReaderMethods for &'a FileReader {
|
|||
}
|
||||
|
||||
// https://w3c.github.io/FileAPI/#dfn-error
|
||||
fn GetError(self) -> Option<Root<DOMException>> {
|
||||
fn GetError(&self) -> Option<Root<DOMException>> {
|
||||
self.error.get().map(|error| error.root())
|
||||
}
|
||||
|
||||
// https://w3c.github.io/FileAPI/#dfn-result
|
||||
fn GetResult(self) -> Option<DOMString> {
|
||||
fn GetResult(&self) -> Option<DOMString> {
|
||||
self.result.borrow().clone()
|
||||
}
|
||||
|
||||
// https://w3c.github.io/FileAPI/#dfn-readyState
|
||||
fn ReadyState(self) -> u16 {
|
||||
fn ReadyState(&self) -> u16 {
|
||||
self.ready_state.get() as u16
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue