mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Tidy fixes.
This commit is contained in:
parent
f78d88acbe
commit
99f6fb34fc
3 changed files with 6 additions and 3 deletions
|
@ -7,8 +7,8 @@ use dom::attr::Attr;
|
|||
use dom::bindings::cell::DOMRefCell;
|
||||
use dom::bindings::codegen::Bindings::AttrBinding::AttrMethods;
|
||||
use dom::bindings::codegen::Bindings::HTMLMediaElementBinding::CanPlayTypeResult;
|
||||
use dom::bindings::codegen::Bindings::HTMLMediaElementBinding::HTMLMediaElementMethods;
|
||||
use dom::bindings::codegen::Bindings::HTMLMediaElementBinding::HTMLMediaElementConstants::*;
|
||||
use dom::bindings::codegen::Bindings::HTMLMediaElementBinding::HTMLMediaElementMethods;
|
||||
use dom::bindings::codegen::Bindings::MediaErrorBinding::MediaErrorConstants::*;
|
||||
use dom::bindings::global::GlobalRef;
|
||||
use dom::bindings::inheritance::Castable;
|
||||
|
@ -388,7 +388,7 @@ impl HTMLMediaElement {
|
|||
// Step 4
|
||||
if let Resource::Url(url) = resource {
|
||||
// 4.1
|
||||
if self.Preload() == "none" && !self.autoplaying.get(){
|
||||
if self.Preload() == "none" && !self.autoplaying.get() {
|
||||
// 4.1.1
|
||||
self.network_state.set(NETWORK_IDLE);
|
||||
|
||||
|
@ -503,10 +503,12 @@ impl HTMLMediaElement {
|
|||
}
|
||||
|
||||
impl HTMLMediaElementMethods for HTMLMediaElement {
|
||||
// https://html.spec.whatwg.org/multipage/#dom-media-networkstate
|
||||
fn NetworkState(&self) -> u16 {
|
||||
self.network_state.get()
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-media-readystate
|
||||
fn ReadyState(&self) -> u16 {
|
||||
self.ready_state.get()
|
||||
}
|
||||
|
|
|
@ -30,6 +30,7 @@ impl MediaError {
|
|||
}
|
||||
|
||||
impl MediaErrorMethods for MediaError {
|
||||
// https://html.spec.whatwg.org/multipage/#dom-mediaerror-code
|
||||
fn Code(&self) -> u16 {
|
||||
self.code
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/embedded-content.html#mediaerror
|
||||
// https://html.spec.whatwg.org/multipage/#mediaerror
|
||||
|
||||
interface MediaError {
|
||||
const unsigned short MEDIA_ERR_ABORTED = 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue