mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Modify script
to prevent further violations of snake_case
This commit is contained in:
parent
2a594821ba
commit
f7db4b7f80
135 changed files with 205 additions and 54 deletions
4
Cargo.lock
generated
4
Cargo.lock
generated
|
@ -604,9 +604,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cfg-if"
|
name = "cfg-if"
|
||||||
version = "0.1.6"
|
version = "0.1.10"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "082bb9b28e00d3c9d39cc03e64ce4cea0f1bb9b3fde493f0cbc008472d22bdf4"
|
checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cgl"
|
name = "cgl"
|
||||||
|
|
|
@ -119,6 +119,7 @@ impl AnalyserNode {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// https://webaudio.github.io/web-audio-api/#dom-analysernode-analysernode
|
/// https://webaudio.github.io/web-audio-api/#dom-analysernode-analysernode
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn Constructor(
|
pub fn Constructor(
|
||||||
window: &Window,
|
window: &Window,
|
||||||
context: &BaseAudioContext,
|
context: &BaseAudioContext,
|
||||||
|
|
|
@ -90,6 +90,7 @@ impl AudioBuffer {
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://webaudio.github.io/web-audio-api/#dom-audiobuffer-audiobuffer
|
// https://webaudio.github.io/web-audio-api/#dom-audiobuffer-audiobuffer
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn Constructor(
|
pub fn Constructor(
|
||||||
window: &Window,
|
window: &Window,
|
||||||
options: &AudioBufferOptions,
|
options: &AudioBufferOptions,
|
||||||
|
|
|
@ -107,6 +107,7 @@ impl AudioBufferSourceNode {
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn Constructor(
|
pub fn Constructor(
|
||||||
window: &Window,
|
window: &Window,
|
||||||
context: &BaseAudioContext,
|
context: &BaseAudioContext,
|
||||||
|
|
|
@ -85,6 +85,7 @@ impl AudioContext {
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://webaudio.github.io/web-audio-api/#AudioContext-constructors
|
// https://webaudio.github.io/web-audio-api/#AudioContext-constructors
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn Constructor(
|
pub fn Constructor(
|
||||||
window: &Window,
|
window: &Window,
|
||||||
options: &AudioContextOptions,
|
options: &AudioContextOptions,
|
||||||
|
|
|
@ -147,6 +147,7 @@ impl AudioListener {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
impl AudioListenerMethods for AudioListener {
|
impl AudioListenerMethods for AudioListener {
|
||||||
// https://webaudio.github.io/web-audio-api/#dom-audiolistener-positionx
|
// https://webaudio.github.io/web-audio-api/#dom-audiolistener-positionx
|
||||||
fn PositionX(&self) -> DomRoot<AudioParam> {
|
fn PositionX(&self) -> DomRoot<AudioParam> {
|
||||||
|
|
|
@ -120,6 +120,7 @@ impl BiquadFilterNode {
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn Constructor(
|
pub fn Constructor(
|
||||||
window: &Window,
|
window: &Window,
|
||||||
context: &BaseAudioContext,
|
context: &BaseAudioContext,
|
||||||
|
|
|
@ -50,6 +50,7 @@ impl Blob {
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://w3c.github.io/FileAPI/#constructorBlob
|
// https://w3c.github.io/FileAPI/#constructorBlob
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn Constructor(
|
pub fn Constructor(
|
||||||
global: &GlobalScope,
|
global: &GlobalScope,
|
||||||
blobParts: Option<Vec<ArrayBufferOrArrayBufferViewOrBlobOrString>>,
|
blobParts: Option<Vec<ArrayBufferOrArrayBufferViewOrBlobOrString>>,
|
||||||
|
|
|
@ -66,6 +66,7 @@ const BT_DESC_CONVERSION_ERROR: &'static str =
|
||||||
"Can't convert to an IDL value of type BluetoothPermissionDescriptor";
|
"Can't convert to an IDL value of type BluetoothPermissionDescriptor";
|
||||||
|
|
||||||
#[derive(JSTraceable, MallocSizeOf)]
|
#[derive(JSTraceable, MallocSizeOf)]
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub struct AllowedBluetoothDevice {
|
pub struct AllowedBluetoothDevice {
|
||||||
pub deviceId: DOMString,
|
pub deviceId: DOMString,
|
||||||
pub mayUseGATT: bool,
|
pub mayUseGATT: bool,
|
||||||
|
|
|
@ -30,6 +30,7 @@ pub struct BluetoothAdvertisingEvent {
|
||||||
rssi: Option<i8>,
|
rssi: Option<i8>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
impl BluetoothAdvertisingEvent {
|
impl BluetoothAdvertisingEvent {
|
||||||
pub fn new_inherited(
|
pub fn new_inherited(
|
||||||
device: &BluetoothDevice,
|
device: &BluetoothDevice,
|
||||||
|
|
|
@ -24,6 +24,7 @@ pub struct BluetoothCharacteristicProperties {
|
||||||
writable_auxiliaries: bool,
|
writable_auxiliaries: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
impl BluetoothCharacteristicProperties {
|
impl BluetoothCharacteristicProperties {
|
||||||
pub fn new_inherited(
|
pub fn new_inherited(
|
||||||
broadcast: bool,
|
broadcast: bool,
|
||||||
|
|
|
@ -67,11 +67,14 @@ impl BluetoothRemoteGATTCharacteristic {
|
||||||
service: &BluetoothRemoteGATTService,
|
service: &BluetoothRemoteGATTService,
|
||||||
uuid: DOMString,
|
uuid: DOMString,
|
||||||
properties: &BluetoothCharacteristicProperties,
|
properties: &BluetoothCharacteristicProperties,
|
||||||
instanceID: String,
|
instance_id: String,
|
||||||
) -> DomRoot<BluetoothRemoteGATTCharacteristic> {
|
) -> DomRoot<BluetoothRemoteGATTCharacteristic> {
|
||||||
reflect_dom_object(
|
reflect_dom_object(
|
||||||
Box::new(BluetoothRemoteGATTCharacteristic::new_inherited(
|
Box::new(BluetoothRemoteGATTCharacteristic::new_inherited(
|
||||||
service, uuid, properties, instanceID,
|
service,
|
||||||
|
uuid,
|
||||||
|
properties,
|
||||||
|
instance_id,
|
||||||
)),
|
)),
|
||||||
global,
|
global,
|
||||||
BluetoothRemoteGATTCharacteristicBinding::Wrap,
|
BluetoothRemoteGATTCharacteristicBinding::Wrap,
|
||||||
|
|
|
@ -55,13 +55,13 @@ impl BluetoothRemoteGATTDescriptor {
|
||||||
global: &GlobalScope,
|
global: &GlobalScope,
|
||||||
characteristic: &BluetoothRemoteGATTCharacteristic,
|
characteristic: &BluetoothRemoteGATTCharacteristic,
|
||||||
uuid: DOMString,
|
uuid: DOMString,
|
||||||
instanceID: String,
|
instance_id: String,
|
||||||
) -> DomRoot<BluetoothRemoteGATTDescriptor> {
|
) -> DomRoot<BluetoothRemoteGATTDescriptor> {
|
||||||
reflect_dom_object(
|
reflect_dom_object(
|
||||||
Box::new(BluetoothRemoteGATTDescriptor::new_inherited(
|
Box::new(BluetoothRemoteGATTDescriptor::new_inherited(
|
||||||
characteristic,
|
characteristic,
|
||||||
uuid,
|
uuid,
|
||||||
instanceID,
|
instance_id,
|
||||||
)),
|
)),
|
||||||
global,
|
global,
|
||||||
BluetoothRemoteGATTDescriptorBinding::Wrap,
|
BluetoothRemoteGATTDescriptorBinding::Wrap,
|
||||||
|
|
|
@ -45,6 +45,7 @@ impl BluetoothRemoteGATTService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn new(
|
pub fn new(
|
||||||
global: &GlobalScope,
|
global: &GlobalScope,
|
||||||
device: &BluetoothDevice,
|
device: &BluetoothDevice,
|
||||||
|
|
|
@ -583,6 +583,7 @@ const DESCRIPTOR_ERROR_MESSAGE: &'static str =
|
||||||
"https://developer.bluetooth.org/gatt/descriptors/Pages/\
|
"https://developer.bluetooth.org/gatt/descriptors/Pages/\
|
||||||
DescriptorsHomePage.aspx\ne.g. 'gatt.characteristic_presentation_format'.";
|
DescriptorsHomePage.aspx\ne.g. 'gatt.characteristic_presentation_format'.";
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
impl BluetoothUUID {
|
impl BluetoothUUID {
|
||||||
// https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothuuid-canonicaluuid
|
// https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothuuid-canonicaluuid
|
||||||
pub fn CanonicalUUID(_: &Window, alias: u32) -> UUID {
|
pub fn CanonicalUUID(_: &Window, alias: u32) -> UUID {
|
||||||
|
|
|
@ -68,6 +68,7 @@ impl ChannelMergerNode {
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn Constructor(
|
pub fn Constructor(
|
||||||
window: &Window,
|
window: &Window,
|
||||||
context: &BaseAudioContext,
|
context: &BaseAudioContext,
|
||||||
|
|
|
@ -70,6 +70,7 @@ impl ChannelSplitterNode {
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn Constructor(
|
pub fn Constructor(
|
||||||
window: &Window,
|
window: &Window,
|
||||||
context: &BaseAudioContext,
|
context: &BaseAudioContext,
|
||||||
|
|
|
@ -23,6 +23,7 @@ pub struct CloseEvent {
|
||||||
reason: DOMString,
|
reason: DOMString,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
impl CloseEvent {
|
impl CloseEvent {
|
||||||
pub fn new_inherited(was_clean: bool, code: u16, reason: DOMString) -> CloseEvent {
|
pub fn new_inherited(was_clean: bool, code: u16, reason: DOMString) -> CloseEvent {
|
||||||
CloseEvent {
|
CloseEvent {
|
||||||
|
|
|
@ -34,6 +34,7 @@ impl Comment {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn Constructor(window: &Window, data: DOMString) -> Fallible<DomRoot<Comment>> {
|
pub fn Constructor(window: &Window, data: DOMString) -> Fallible<DomRoot<Comment>> {
|
||||||
let document = window.Document();
|
let document = window.Document();
|
||||||
Ok(Comment::new(data, &document))
|
Ok(Comment::new(data, &document))
|
||||||
|
|
|
@ -58,6 +58,7 @@ impl CompositionEvent {
|
||||||
ev
|
ev
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn Constructor(
|
pub fn Constructor(
|
||||||
window: &Window,
|
window: &Window,
|
||||||
type_: DOMString,
|
type_: DOMString,
|
||||||
|
|
|
@ -43,6 +43,7 @@ where
|
||||||
f()
|
f()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
impl Console {
|
impl Console {
|
||||||
// https://developer.mozilla.org/en-US/docs/Web/API/Console/log
|
// https://developer.mozilla.org/en-US/docs/Web/API/Console/log
|
||||||
pub fn Log(global: &GlobalScope, messages: Vec<DOMString>) {
|
pub fn Log(global: &GlobalScope, messages: Vec<DOMString>) {
|
||||||
|
|
|
@ -73,6 +73,7 @@ impl ConstantSourceNode {
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn Constructor(
|
pub fn Constructor(
|
||||||
window: &Window,
|
window: &Window,
|
||||||
context: &BaseAudioContext,
|
context: &BaseAudioContext,
|
||||||
|
|
|
@ -22,6 +22,7 @@ pub struct CSS {
|
||||||
reflector_: Reflector,
|
reflector_: Reflector,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
impl CSS {
|
impl CSS {
|
||||||
/// <http://dev.w3.org/csswg/cssom/#serialize-an-identifier>
|
/// <http://dev.w3.org/csswg/cssom/#serialize-an-identifier>
|
||||||
pub fn Escape(_: &Window, ident: DOMString) -> Fallible<DOMString> {
|
pub fn Escape(_: &Window, ident: DOMString) -> Fallible<DOMString> {
|
||||||
|
|
|
@ -55,7 +55,7 @@ impl CustomEvent {
|
||||||
ev
|
ev
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unsafe_code)]
|
#[allow(unsafe_code, non_snake_case)]
|
||||||
pub fn Constructor(
|
pub fn Constructor(
|
||||||
global: &GlobalScope,
|
global: &GlobalScope,
|
||||||
type_: DOMString,
|
type_: DOMString,
|
||||||
|
|
|
@ -450,6 +450,7 @@ impl CollectionFilter for AnchorsFilter {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
impl Document {
|
impl Document {
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn loader(&self) -> Ref<DocumentLoader> {
|
pub fn loader(&self) -> Ref<DocumentLoader> {
|
||||||
|
@ -2899,6 +2900,7 @@ impl Document {
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://dom.spec.whatwg.org/#dom-document-document
|
// https://dom.spec.whatwg.org/#dom-document-document
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn Constructor(window: &Window) -> Fallible<DomRoot<Document>> {
|
pub fn Constructor(window: &Window) -> Fallible<DomRoot<Document>> {
|
||||||
let doc = window.Document();
|
let doc = window.Document();
|
||||||
let docloader = DocumentLoader::new(&*doc.loader());
|
let docloader = DocumentLoader::new(&*doc.loader());
|
||||||
|
|
|
@ -46,6 +46,7 @@ impl DocumentFragment {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn Constructor(window: &Window) -> Fallible<DomRoot<DocumentFragment>> {
|
pub fn Constructor(window: &Window) -> Fallible<DomRoot<DocumentFragment>> {
|
||||||
let document = window.Document();
|
let document = window.Document();
|
||||||
|
|
||||||
|
|
|
@ -138,6 +138,7 @@ impl DOMException {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn Constructor(
|
pub fn Constructor(
|
||||||
global: &GlobalScope,
|
global: &GlobalScope,
|
||||||
message: DOMString,
|
message: DOMString,
|
||||||
|
|
|
@ -27,6 +27,7 @@ pub struct DOMMatrix {
|
||||||
parent: DOMMatrixReadOnly,
|
parent: DOMMatrixReadOnly,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
impl DOMMatrix {
|
impl DOMMatrix {
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(global: &GlobalScope, is2D: bool, matrix: Transform3D<f64>) -> DomRoot<Self> {
|
pub fn new(global: &GlobalScope, is2D: bool, matrix: Transform3D<f64>) -> DomRoot<Self> {
|
||||||
|
@ -74,7 +75,7 @@ impl DOMMatrix {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn from_readonly(global: &GlobalScope, ro: &DOMMatrixReadOnly) -> DomRoot<Self> {
|
pub fn from_readonly(global: &GlobalScope, ro: &DOMMatrixReadOnly) -> DomRoot<Self> {
|
||||||
Self::new(global, ro.is_2d(), ro.matrix().clone())
|
Self::new(global, ro.is2D(), ro.matrix().clone())
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://drafts.fxtf.org/geometry-1/#dom-dommatrix-fromfloat32array
|
// https://drafts.fxtf.org/geometry-1/#dom-dommatrix-fromfloat32array
|
||||||
|
@ -102,6 +103,7 @@ impl DOMMatrix {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
impl DOMMatrixMethods for DOMMatrix {
|
impl DOMMatrixMethods for DOMMatrix {
|
||||||
// https://drafts.fxtf.org/geometry-1/#dom-dommatrixreadonly-m11
|
// https://drafts.fxtf.org/geometry-1/#dom-dommatrixreadonly-m11
|
||||||
fn M11(&self) -> f64 {
|
fn M11(&self) -> f64 {
|
||||||
|
|
|
@ -33,12 +33,14 @@ use std::ptr::NonNull;
|
||||||
use style::parser::ParserContext;
|
use style::parser::ParserContext;
|
||||||
|
|
||||||
#[dom_struct]
|
#[dom_struct]
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub struct DOMMatrixReadOnly {
|
pub struct DOMMatrixReadOnly {
|
||||||
reflector_: Reflector,
|
reflector_: Reflector,
|
||||||
matrix: DomRefCell<Transform3D<f64>>,
|
matrix: DomRefCell<Transform3D<f64>>,
|
||||||
is2D: Cell<bool>,
|
is2D: Cell<bool>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
impl DOMMatrixReadOnly {
|
impl DOMMatrixReadOnly {
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
pub fn new(global: &GlobalScope, is2D: bool, matrix: Transform3D<f64>) -> DomRoot<Self> {
|
pub fn new(global: &GlobalScope, is2D: bool, matrix: Transform3D<f64>) -> DomRoot<Self> {
|
||||||
|
@ -91,7 +93,7 @@ impl DOMMatrixReadOnly {
|
||||||
self.matrix.borrow()
|
self.matrix.borrow()
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn is_2d(&self) -> bool {
|
pub fn is2D(&self) -> bool {
|
||||||
self.is2D.get()
|
self.is2D.get()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -421,6 +423,7 @@ impl DOMMatrixReadOnly {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
impl DOMMatrixReadOnlyMethods for DOMMatrixReadOnly {
|
impl DOMMatrixReadOnlyMethods for DOMMatrixReadOnly {
|
||||||
// https://drafts.fxtf.org/geometry-1/#dom-dommatrixreadonly-m11
|
// https://drafts.fxtf.org/geometry-1/#dom-dommatrixreadonly-m11
|
||||||
fn M11(&self) -> f64 {
|
fn M11(&self) -> f64 {
|
||||||
|
@ -761,7 +764,7 @@ pub fn dommatrixinit_to_matrix(dict: &DOMMatrixInit) -> Fallible<(bool, Transfor
|
||||||
{
|
{
|
||||||
Err(error::Error::Type("Invalid matrix initializer.".to_owned()))
|
Err(error::Error::Type("Invalid matrix initializer.".to_owned()))
|
||||||
} else {
|
} else {
|
||||||
let mut is2D = dict.is2D;
|
let mut is_2d = dict.is2D;
|
||||||
// Step 2.
|
// Step 2.
|
||||||
let m11 = dict.m11.unwrap_or(dict.a.unwrap_or(1.0));
|
let m11 = dict.m11.unwrap_or(dict.a.unwrap_or(1.0));
|
||||||
// Step 3.
|
// Step 3.
|
||||||
|
@ -775,7 +778,7 @@ pub fn dommatrixinit_to_matrix(dict: &DOMMatrixInit) -> Fallible<(bool, Transfor
|
||||||
// Step 7.
|
// Step 7.
|
||||||
let m42 = dict.m42.unwrap_or(dict.f.unwrap_or(0.0));
|
let m42 = dict.m42.unwrap_or(dict.f.unwrap_or(0.0));
|
||||||
// Step 8.
|
// Step 8.
|
||||||
if is2D.is_none() &&
|
if is_2d.is_none() &&
|
||||||
(dict.m31 != 0.0 ||
|
(dict.m31 != 0.0 ||
|
||||||
dict.m32 != 0.0 ||
|
dict.m32 != 0.0 ||
|
||||||
dict.m13 != 0.0 ||
|
dict.m13 != 0.0 ||
|
||||||
|
@ -787,17 +790,17 @@ pub fn dommatrixinit_to_matrix(dict: &DOMMatrixInit) -> Fallible<(bool, Transfor
|
||||||
dict.m33 != 1.0 ||
|
dict.m33 != 1.0 ||
|
||||||
dict.m44 != 1.0)
|
dict.m44 != 1.0)
|
||||||
{
|
{
|
||||||
is2D = Some(false);
|
is_2d = Some(false);
|
||||||
}
|
}
|
||||||
// Step 9.
|
// Step 9.
|
||||||
if is2D.is_none() {
|
if is_2d.is_none() {
|
||||||
is2D = Some(true);
|
is_2d = Some(true);
|
||||||
}
|
}
|
||||||
let matrix = Transform3D::row_major(
|
let matrix = Transform3D::row_major(
|
||||||
m11, m12, dict.m13, dict.m14, m21, m22, dict.m23, dict.m24, dict.m31, dict.m32,
|
m11, m12, dict.m13, dict.m14, m21, m22, dict.m23, dict.m24, dict.m31, dict.m32,
|
||||||
dict.m33, dict.m34, m41, m42, dict.m43, dict.m44,
|
dict.m33, dict.m34, m41, m42, dict.m43, dict.m44,
|
||||||
);
|
);
|
||||||
Ok((is2D.unwrap(), matrix))
|
Ok((is_2d.unwrap(), matrix))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,6 +44,7 @@ impl DOMParser {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn Constructor(window: &Window) -> Fallible<DomRoot<DOMParser>> {
|
pub fn Constructor(window: &Window) -> Fallible<DomRoot<DOMParser>> {
|
||||||
Ok(DOMParser::new(window))
|
Ok(DOMParser::new(window))
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,7 @@ pub struct DOMPoint {
|
||||||
point: DOMPointReadOnly,
|
point: DOMPointReadOnly,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
impl DOMPoint {
|
impl DOMPoint {
|
||||||
fn new_inherited(x: f64, y: f64, z: f64, w: f64) -> DOMPoint {
|
fn new_inherited(x: f64, y: f64, z: f64, w: f64) -> DOMPoint {
|
||||||
DOMPoint {
|
DOMPoint {
|
||||||
|
|
|
@ -23,6 +23,7 @@ pub struct DOMPointReadOnly {
|
||||||
w: Cell<f64>,
|
w: Cell<f64>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
impl DOMPointReadOnly {
|
impl DOMPointReadOnly {
|
||||||
pub fn new_inherited(x: f64, y: f64, z: f64, w: f64) -> DOMPointReadOnly {
|
pub fn new_inherited(x: f64, y: f64, z: f64, w: f64) -> DOMPointReadOnly {
|
||||||
DOMPointReadOnly {
|
DOMPointReadOnly {
|
||||||
|
@ -58,6 +59,7 @@ impl DOMPointReadOnly {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
impl DOMPointReadOnlyMethods for DOMPointReadOnly {
|
impl DOMPointReadOnlyMethods for DOMPointReadOnly {
|
||||||
// https://dev.w3.org/fxtf/geometry/Overview.html#dom-dompointreadonly-x
|
// https://dev.w3.org/fxtf/geometry/Overview.html#dom-dompointreadonly-x
|
||||||
fn X(&self) -> f64 {
|
fn X(&self) -> f64 {
|
||||||
|
@ -80,6 +82,7 @@ impl DOMPointReadOnlyMethods for DOMPointReadOnly {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub trait DOMPointWriteMethods {
|
pub trait DOMPointWriteMethods {
|
||||||
fn SetX(&self, value: f64);
|
fn SetX(&self, value: f64);
|
||||||
fn SetY(&self, value: f64);
|
fn SetY(&self, value: f64);
|
||||||
|
|
|
@ -23,6 +23,7 @@ pub struct DOMQuad {
|
||||||
p4: Dom<DOMPoint>,
|
p4: Dom<DOMPoint>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
impl DOMQuad {
|
impl DOMQuad {
|
||||||
fn new_inherited(p1: &DOMPoint, p2: &DOMPoint, p3: &DOMPoint, p4: &DOMPoint) -> DOMQuad {
|
fn new_inherited(p1: &DOMPoint, p2: &DOMPoint, p3: &DOMPoint, p4: &DOMPoint) -> DOMQuad {
|
||||||
DOMQuad {
|
DOMQuad {
|
||||||
|
|
|
@ -32,6 +32,7 @@ impl DOMRect {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn Constructor(
|
pub fn Constructor(
|
||||||
global: &GlobalScope,
|
global: &GlobalScope,
|
||||||
x: f64,
|
x: f64,
|
||||||
|
|
|
@ -46,6 +46,7 @@ impl DOMRectReadOnly {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn Constructor(
|
pub fn Constructor(
|
||||||
global: &GlobalScope,
|
global: &GlobalScope,
|
||||||
x: f64,
|
x: f64,
|
||||||
|
|
|
@ -1202,6 +1202,7 @@ impl Element {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn xmlSerialize(&self, traversal_scope: XmlTraversalScope) -> Fallible<DOMString> {
|
pub fn xmlSerialize(&self, traversal_scope: XmlTraversalScope) -> Fallible<DOMString> {
|
||||||
let mut writer = vec![];
|
let mut writer = vec![];
|
||||||
match xmlSerialize::serialize(
|
match xmlSerialize::serialize(
|
||||||
|
|
|
@ -77,6 +77,7 @@ impl ErrorEvent {
|
||||||
ev
|
ev
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn Constructor(
|
pub fn Constructor(
|
||||||
global: &GlobalScope,
|
global: &GlobalScope,
|
||||||
type_: DOMString,
|
type_: DOMString,
|
||||||
|
|
|
@ -82,6 +82,7 @@ impl Event {
|
||||||
event
|
event
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn Constructor(
|
pub fn Constructor(
|
||||||
global: &GlobalScope,
|
global: &GlobalScope,
|
||||||
type_: DOMString,
|
type_: DOMString,
|
||||||
|
|
|
@ -18,7 +18,7 @@ use crate::dom::eventtarget::EventTarget;
|
||||||
use crate::dom::globalscope::GlobalScope;
|
use crate::dom::globalscope::GlobalScope;
|
||||||
use crate::dom::messageevent::MessageEvent;
|
use crate::dom::messageevent::MessageEvent;
|
||||||
use crate::dom::performanceresourcetiming::InitiatorType;
|
use crate::dom::performanceresourcetiming::InitiatorType;
|
||||||
use crate::fetch::{create_a_potential_CORS_request, FetchCanceller};
|
use crate::fetch::{create_a_potential_cors_request, FetchCanceller};
|
||||||
use crate::network_listener::{self, NetworkListener, PreInvoke, ResourceTimingListener};
|
use crate::network_listener::{self, NetworkListener, PreInvoke, ResourceTimingListener};
|
||||||
use crate::task_source::{TaskSource, TaskSourceName};
|
use crate::task_source::{TaskSource, TaskSourceName};
|
||||||
use crate::timers::OneshotTimerCallback;
|
use crate::timers::OneshotTimerCallback;
|
||||||
|
@ -488,6 +488,7 @@ impl EventSource {
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#dom-eventsource
|
// https://html.spec.whatwg.org/multipage/#dom-eventsource
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn Constructor(
|
pub fn Constructor(
|
||||||
global: &GlobalScope,
|
global: &GlobalScope,
|
||||||
url: DOMString,
|
url: DOMString,
|
||||||
|
@ -516,7 +517,7 @@ impl EventSource {
|
||||||
};
|
};
|
||||||
// Step 8
|
// Step 8
|
||||||
// TODO: Step 9 set request's client settings
|
// TODO: Step 9 set request's client settings
|
||||||
let mut request = create_a_potential_CORS_request(
|
let mut request = create_a_potential_cors_request(
|
||||||
url_record,
|
url_record,
|
||||||
Destination::None,
|
Destination::None,
|
||||||
Some(cors_attribute_state),
|
Some(cors_attribute_state),
|
||||||
|
|
|
@ -339,6 +339,7 @@ impl EventTarget {
|
||||||
reflect_dom_object(Box::new(EventTarget::new_inherited()), global, Wrap)
|
reflect_dom_object(Box::new(EventTarget::new_inherited()), global, Wrap)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn Constructor(global: &GlobalScope) -> Fallible<DomRoot<EventTarget>> {
|
pub fn Constructor(global: &GlobalScope) -> Fallible<DomRoot<EventTarget>> {
|
||||||
Ok(EventTarget::new(global))
|
Ok(EventTarget::new(global))
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,6 +23,7 @@ pub struct ExtendableEvent {
|
||||||
extensions_allowed: bool,
|
extensions_allowed: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
impl ExtendableEvent {
|
impl ExtendableEvent {
|
||||||
pub fn new_inherited() -> ExtendableEvent {
|
pub fn new_inherited() -> ExtendableEvent {
|
||||||
ExtendableEvent {
|
ExtendableEvent {
|
||||||
|
|
|
@ -26,6 +26,7 @@ use js::rust::HandleValue;
|
||||||
use servo_atoms::Atom;
|
use servo_atoms::Atom;
|
||||||
|
|
||||||
#[dom_struct]
|
#[dom_struct]
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub struct ExtendableMessageEvent {
|
pub struct ExtendableMessageEvent {
|
||||||
event: ExtendableEvent,
|
event: ExtendableEvent,
|
||||||
#[ignore_malloc_size_of = "mozjs"]
|
#[ignore_malloc_size_of = "mozjs"]
|
||||||
|
@ -37,6 +38,7 @@ pub struct ExtendableMessageEvent {
|
||||||
frozen_ports: DomRefCell<Option<Heap<JSVal>>>,
|
frozen_ports: DomRefCell<Option<Heap<JSVal>>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
impl ExtendableMessageEvent {
|
impl ExtendableMessageEvent {
|
||||||
pub fn new_inherited(
|
pub fn new_inherited(
|
||||||
origin: DOMString,
|
origin: DOMString,
|
||||||
|
@ -101,6 +103,7 @@ impl ExtendableMessageEvent {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
impl ExtendableMessageEvent {
|
impl ExtendableMessageEvent {
|
||||||
pub fn dispatch_jsval(
|
pub fn dispatch_jsval(
|
||||||
target: &EventTarget,
|
target: &EventTarget,
|
||||||
|
|
|
@ -80,6 +80,7 @@ impl File {
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://w3c.github.io/FileAPI/#file-constructor
|
// https://w3c.github.io/FileAPI/#file-constructor
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn Constructor(
|
pub fn Constructor(
|
||||||
global: &GlobalScope,
|
global: &GlobalScope,
|
||||||
fileBits: Vec<ArrayBufferOrArrayBufferViewOrBlobOrString>,
|
fileBits: Vec<ArrayBufferOrArrayBufferViewOrBlobOrString>,
|
||||||
|
|
|
@ -159,6 +159,7 @@ impl FileReader {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn Constructor(global: &GlobalScope) -> Fallible<DomRoot<FileReader>> {
|
pub fn Constructor(global: &GlobalScope) -> Fallible<DomRoot<FileReader>> {
|
||||||
Ok(FileReader::new(global))
|
Ok(FileReader::new(global))
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,6 +40,7 @@ impl FileReaderSync {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn Constructor(global: &GlobalScope) -> Fallible<DomRoot<FileReaderSync>> {
|
pub fn Constructor(global: &GlobalScope) -> Fallible<DomRoot<FileReaderSync>> {
|
||||||
Ok(FileReaderSync::new(global))
|
Ok(FileReaderSync::new(global))
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,6 +60,7 @@ impl FocusEvent {
|
||||||
ev
|
ev
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn Constructor(
|
pub fn Constructor(
|
||||||
window: &Window,
|
window: &Window,
|
||||||
type_: DOMString,
|
type_: DOMString,
|
||||||
|
|
|
@ -51,6 +51,7 @@ impl FormData {
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://xhr.spec.whatwg.org/#dom-formdata
|
// https://xhr.spec.whatwg.org/#dom-formdata
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn Constructor(
|
pub fn Constructor(
|
||||||
global: &GlobalScope,
|
global: &GlobalScope,
|
||||||
form: Option<&HTMLFormElement>,
|
form: Option<&HTMLFormElement>,
|
||||||
|
|
|
@ -48,6 +48,7 @@ impl FormDataEvent {
|
||||||
ev
|
ev
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn Constructor(
|
pub fn Constructor(
|
||||||
window: &Window,
|
window: &Window,
|
||||||
type_: DOMString,
|
type_: DOMString,
|
||||||
|
|
|
@ -76,6 +76,7 @@ impl GainNode {
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn Constructor(
|
pub fn Constructor(
|
||||||
window: &Window,
|
window: &Window,
|
||||||
context: &BaseAudioContext,
|
context: &BaseAudioContext,
|
||||||
|
|
|
@ -69,6 +69,7 @@ impl GamepadEvent {
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://w3c.github.io/gamepad/#gamepadevent-interface
|
// https://w3c.github.io/gamepad/#gamepadevent-interface
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn Constructor(
|
pub fn Constructor(
|
||||||
window: &Window,
|
window: &Window,
|
||||||
type_: DOMString,
|
type_: DOMString,
|
||||||
|
|
|
@ -238,6 +238,7 @@ impl GPUDeviceMethods for GPUDevice {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// https://gpuweb.github.io/gpuweb/#GPUDevice-createBindGroupLayout
|
/// https://gpuweb.github.io/gpuweb/#GPUDevice-createBindGroupLayout
|
||||||
|
#[allow(non_snake_case)]
|
||||||
fn CreateBindGroupLayout(
|
fn CreateBindGroupLayout(
|
||||||
&self,
|
&self,
|
||||||
descriptor: &GPUBindGroupLayoutDescriptor,
|
descriptor: &GPUBindGroupLayoutDescriptor,
|
||||||
|
|
|
@ -60,6 +60,7 @@ impl HashChangeEvent {
|
||||||
ev
|
ev
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn Constructor(
|
pub fn Constructor(
|
||||||
window: &Window,
|
window: &Window,
|
||||||
type_: DOMString,
|
type_: DOMString,
|
||||||
|
|
|
@ -50,6 +50,7 @@ impl Headers {
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://fetch.spec.whatwg.org/#dom-headers
|
// https://fetch.spec.whatwg.org/#dom-headers
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn Constructor(
|
pub fn Constructor(
|
||||||
global: &GlobalScope,
|
global: &GlobalScope,
|
||||||
init: Option<HeadersInit>,
|
init: Option<HeadersInit>,
|
||||||
|
@ -393,13 +394,13 @@ pub fn normalize_value(value: ByteString) -> ByteString {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn is_HTTP_whitespace(byte: u8) -> bool {
|
fn is_http_whitespace(byte: u8) -> bool {
|
||||||
byte == b'\t' || byte == b'\n' || byte == b'\r' || byte == b' '
|
byte == b'\t' || byte == b'\n' || byte == b'\r' || byte == b' '
|
||||||
}
|
}
|
||||||
|
|
||||||
fn index_of_first_non_whitespace(value: &ByteString) -> Option<usize> {
|
fn index_of_first_non_whitespace(value: &ByteString) -> Option<usize> {
|
||||||
for (index, &byte) in value.iter().enumerate() {
|
for (index, &byte) in value.iter().enumerate() {
|
||||||
if !is_HTTP_whitespace(byte) {
|
if !is_http_whitespace(byte) {
|
||||||
return Some(index);
|
return Some(index);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -408,7 +409,7 @@ fn index_of_first_non_whitespace(value: &ByteString) -> Option<usize> {
|
||||||
|
|
||||||
fn index_of_last_non_whitespace(value: &ByteString) -> Option<usize> {
|
fn index_of_last_non_whitespace(value: &ByteString) -> Option<usize> {
|
||||||
for (index, &byte) in value.iter().enumerate().rev() {
|
for (index, &byte) in value.iter().enumerate().rev() {
|
||||||
if !is_HTTP_whitespace(byte) {
|
if !is_http_whitespace(byte) {
|
||||||
return Some(index);
|
return Some(index);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,6 +49,7 @@ impl HTMLAudioElement {
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#dom-audio
|
// https://html.spec.whatwg.org/multipage/#dom-audio
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn Audio(window: &Window, src: Option<DOMString>) -> Fallible<DomRoot<HTMLAudioElement>> {
|
pub fn Audio(window: &Window, src: Option<DOMString>) -> Fallible<DomRoot<HTMLAudioElement>> {
|
||||||
let document = window.Document();
|
let document = window.Document();
|
||||||
let audio = HTMLAudioElement::new(local_name!("audio"), None, &document);
|
let audio = HTMLAudioElement::new(local_name!("audio"), None, &document);
|
||||||
|
|
|
@ -47,6 +47,7 @@ impl HTMLFormControlsCollection {
|
||||||
|
|
||||||
// FIXME: This shouldn't need to be implemented here since HTMLCollection (the parent of
|
// FIXME: This shouldn't need to be implemented here since HTMLCollection (the parent of
|
||||||
// HTMLFormControlsCollection) implements Length
|
// HTMLFormControlsCollection) implements Length
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn Length(&self) -> u32 {
|
pub fn Length(&self) -> u32 {
|
||||||
self.collection.Length()
|
self.collection.Length()
|
||||||
}
|
}
|
||||||
|
|
|
@ -378,6 +378,7 @@ impl HTMLFormElementMethods for HTMLFormElement {
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#the-form-element:supported-property-names
|
// https://html.spec.whatwg.org/multipage/#the-form-element:supported-property-names
|
||||||
|
#[allow(non_snake_case)]
|
||||||
fn SupportedPropertyNames(&self) -> Vec<DOMString> {
|
fn SupportedPropertyNames(&self) -> Vec<DOMString> {
|
||||||
// Step 1
|
// Step 1
|
||||||
#[derive(Debug, Eq, Ord, PartialEq, PartialOrd)]
|
#[derive(Debug, Eq, Ord, PartialEq, PartialOrd)]
|
||||||
|
|
|
@ -15,6 +15,7 @@ pub struct HTMLHtmlElement {
|
||||||
htmlelement: HTMLElement,
|
htmlelement: HTMLElement,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
impl HTMLHtmlElement {
|
impl HTMLHtmlElement {
|
||||||
fn new_inherited(
|
fn new_inherited(
|
||||||
localName: LocalName,
|
localName: LocalName,
|
||||||
|
|
|
@ -41,7 +41,7 @@ use crate::dom::performanceresourcetiming::InitiatorType;
|
||||||
use crate::dom::values::UNSIGNED_LONG_MAX;
|
use crate::dom::values::UNSIGNED_LONG_MAX;
|
||||||
use crate::dom::virtualmethods::VirtualMethods;
|
use crate::dom::virtualmethods::VirtualMethods;
|
||||||
use crate::dom::window::Window;
|
use crate::dom::window::Window;
|
||||||
use crate::fetch::create_a_potential_CORS_request;
|
use crate::fetch::create_a_potential_cors_request;
|
||||||
use crate::image_listener::{add_cache_listener_for_element, ImageCacheListener};
|
use crate::image_listener::{add_cache_listener_for_element, ImageCacheListener};
|
||||||
use crate::microtask::{Microtask, MicrotaskRunnable};
|
use crate::microtask::{Microtask, MicrotaskRunnable};
|
||||||
use crate::network_listener::{self, NetworkListener, PreInvoke, ResourceTimingListener};
|
use crate::network_listener::{self, NetworkListener, PreInvoke, ResourceTimingListener};
|
||||||
|
@ -283,7 +283,7 @@ pub(crate) fn image_fetch_request(
|
||||||
from_picture_or_srcset: FromPictureOrSrcSet,
|
from_picture_or_srcset: FromPictureOrSrcSet,
|
||||||
) -> RequestBuilder {
|
) -> RequestBuilder {
|
||||||
let mut request =
|
let mut request =
|
||||||
create_a_potential_CORS_request(img_url, Destination::Image, cors_setting, None)
|
create_a_potential_cors_request(img_url, Destination::Image, cors_setting, None)
|
||||||
.origin(origin)
|
.origin(origin)
|
||||||
.pipeline_id(Some(pipeline_id))
|
.pipeline_id(Some(pipeline_id))
|
||||||
.referrer_policy(referrer_policy);
|
.referrer_policy(referrer_policy);
|
||||||
|
@ -293,6 +293,7 @@ pub(crate) fn image_fetch_request(
|
||||||
request
|
request
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
impl HTMLImageElement {
|
impl HTMLImageElement {
|
||||||
/// Update the current image with a valid URL.
|
/// Update the current image with a valid URL.
|
||||||
fn fetch_image(&self, img_url: &ServoUrl) {
|
fn fetch_image(&self, img_url: &ServoUrl) {
|
||||||
|
|
|
@ -290,6 +290,7 @@ static DEFAULT_INPUT_SIZE: u32 = 20;
|
||||||
static DEFAULT_MAX_LENGTH: i32 = -1;
|
static DEFAULT_MAX_LENGTH: i32 = -1;
|
||||||
static DEFAULT_MIN_LENGTH: i32 = -1;
|
static DEFAULT_MIN_LENGTH: i32 = -1;
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
impl HTMLInputElement {
|
impl HTMLInputElement {
|
||||||
fn new_inherited(
|
fn new_inherited(
|
||||||
local_name: LocalName,
|
local_name: LocalName,
|
||||||
|
@ -1038,7 +1039,7 @@ impl HTMLInputElementMethods for HTMLInputElement {
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#dom-input-valueasdate
|
// https://html.spec.whatwg.org/multipage/#dom-input-valueasdate
|
||||||
#[allow(unsafe_code)]
|
#[allow(unsafe_code, non_snake_case)]
|
||||||
fn SetValueAsDate(&self, cx: SafeJSContext, value: *mut JSObject) -> ErrorResult {
|
fn SetValueAsDate(&self, cx: SafeJSContext, value: *mut JSObject) -> ErrorResult {
|
||||||
rooted!(in(*cx) let value = value);
|
rooted!(in(*cx) let value = value);
|
||||||
if !self.does_value_as_date_apply() {
|
if !self.does_value_as_date_apply() {
|
||||||
|
|
|
@ -60,7 +60,7 @@ use crate::dom::url::URL;
|
||||||
use crate::dom::videotrack::VideoTrack;
|
use crate::dom::videotrack::VideoTrack;
|
||||||
use crate::dom::videotracklist::VideoTrackList;
|
use crate::dom::videotracklist::VideoTrackList;
|
||||||
use crate::dom::virtualmethods::VirtualMethods;
|
use crate::dom::virtualmethods::VirtualMethods;
|
||||||
use crate::fetch::{create_a_potential_CORS_request, FetchCanceller};
|
use crate::fetch::{create_a_potential_cors_request, FetchCanceller};
|
||||||
use crate::microtask::{Microtask, MicrotaskRunnable};
|
use crate::microtask::{Microtask, MicrotaskRunnable};
|
||||||
use crate::network_listener::{self, NetworkListener, PreInvoke, ResourceTimingListener};
|
use crate::network_listener::{self, NetworkListener, PreInvoke, ResourceTimingListener};
|
||||||
use crate::script_thread::ScriptThread;
|
use crate::script_thread::ScriptThread;
|
||||||
|
@ -292,6 +292,7 @@ impl From<MediaStreamOrBlob> for SrcObject {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[dom_struct]
|
#[dom_struct]
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub struct HTMLMediaElement {
|
pub struct HTMLMediaElement {
|
||||||
htmlelement: HTMLElement,
|
htmlelement: HTMLElement,
|
||||||
/// <https://html.spec.whatwg.org/multipage/#dom-media-networkstate>
|
/// <https://html.spec.whatwg.org/multipage/#dom-media-networkstate>
|
||||||
|
@ -837,7 +838,7 @@ impl HTMLMediaElement {
|
||||||
};
|
};
|
||||||
|
|
||||||
let cors_setting = cors_setting_for_element(self.upcast());
|
let cors_setting = cors_setting_for_element(self.upcast());
|
||||||
let request = create_a_potential_CORS_request(url.clone(), destination, cors_setting, None)
|
let request = create_a_potential_cors_request(url.clone(), destination, cors_setting, None)
|
||||||
.headers(headers)
|
.headers(headers)
|
||||||
.origin(document.origin().immutable().clone())
|
.origin(document.origin().immutable().clone())
|
||||||
.pipeline_id(Some(self.global().pipeline_id()))
|
.pipeline_id(Some(self.global().pipeline_id()))
|
||||||
|
|
|
@ -77,6 +77,7 @@ impl HTMLOptionElement {
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#dom-option
|
// https://html.spec.whatwg.org/multipage/#dom-option
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn Option(
|
pub fn Option(
|
||||||
window: &Window,
|
window: &Window,
|
||||||
text: DOMString,
|
text: DOMString,
|
||||||
|
|
|
@ -26,7 +26,7 @@ use crate::dom::node::{document_from_node, window_from_node};
|
||||||
use crate::dom::node::{BindContext, ChildrenMutation, CloneChildrenFlag, Node};
|
use crate::dom::node::{BindContext, ChildrenMutation, CloneChildrenFlag, Node};
|
||||||
use crate::dom::performanceresourcetiming::InitiatorType;
|
use crate::dom::performanceresourcetiming::InitiatorType;
|
||||||
use crate::dom::virtualmethods::VirtualMethods;
|
use crate::dom::virtualmethods::VirtualMethods;
|
||||||
use crate::fetch::create_a_potential_CORS_request;
|
use crate::fetch::create_a_potential_cors_request;
|
||||||
use crate::network_listener::{self, NetworkListener, PreInvoke, ResourceTimingListener};
|
use crate::network_listener::{self, NetworkListener, PreInvoke, ResourceTimingListener};
|
||||||
use crate::script_module::fetch_inline_module_script;
|
use crate::script_module::fetch_inline_module_script;
|
||||||
use crate::script_module::{fetch_external_module_script, ModuleOwner};
|
use crate::script_module::{fetch_external_module_script, ModuleOwner};
|
||||||
|
@ -326,7 +326,7 @@ pub(crate) fn script_fetch_request(
|
||||||
referrer_policy: Option<ReferrerPolicy>,
|
referrer_policy: Option<ReferrerPolicy>,
|
||||||
integrity_metadata: String,
|
integrity_metadata: String,
|
||||||
) -> RequestBuilder {
|
) -> RequestBuilder {
|
||||||
create_a_potential_CORS_request(url, Destination::Script, cors_setting, None)
|
create_a_potential_cors_request(url, Destination::Script, cors_setting, None)
|
||||||
.origin(origin)
|
.origin(origin)
|
||||||
.pipeline_id(Some(pipeline_id))
|
.pipeline_id(Some(pipeline_id))
|
||||||
.referrer(Some(referrer))
|
.referrer(Some(referrer))
|
||||||
|
|
|
@ -128,14 +128,13 @@ impl ImageData {
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
// https://html.spec.whatwg.org/multipage/#pixel-manipulation:dom-imagedata-3
|
// https://html.spec.whatwg.org/multipage/#pixel-manipulation:dom-imagedata-3
|
||||||
#[allow(unsafe_code)]
|
#[allow(unsafe_code, non_snake_case)]
|
||||||
pub fn Constructor(global: &GlobalScope, width: u32, height: u32) -> Fallible<DomRoot<Self>> {
|
pub fn Constructor(global: &GlobalScope, width: u32, height: u32) -> Fallible<DomRoot<Self>> {
|
||||||
unsafe { Self::new_without_jsobject(global, width, height) }
|
unsafe { Self::new_without_jsobject(global, width, height) }
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#pixel-manipulation:dom-imagedata-4
|
// https://html.spec.whatwg.org/multipage/#pixel-manipulation:dom-imagedata-4
|
||||||
#[allow(unsafe_code)]
|
#[allow(unsafe_code, unused_variables, non_snake_case)]
|
||||||
#[allow(unused_variables)]
|
|
||||||
pub unsafe fn Constructor_(
|
pub unsafe fn Constructor_(
|
||||||
cx: JSContext,
|
cx: JSContext,
|
||||||
global: &GlobalScope,
|
global: &GlobalScope,
|
||||||
|
|
|
@ -44,6 +44,7 @@ impl InputEvent {
|
||||||
ev
|
ev
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn Constructor(
|
pub fn Constructor(
|
||||||
window: &Window,
|
window: &Window,
|
||||||
type_: DOMString,
|
type_: DOMString,
|
||||||
|
|
|
@ -96,6 +96,7 @@ impl KeyboardEvent {
|
||||||
ev
|
ev
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn Constructor(
|
pub fn Constructor(
|
||||||
window: &Window,
|
window: &Window,
|
||||||
type_: DOMString,
|
type_: DOMString,
|
||||||
|
|
|
@ -63,6 +63,7 @@ impl MediaElementAudioSourceNode {
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn Constructor(
|
pub fn Constructor(
|
||||||
window: &Window,
|
window: &Window,
|
||||||
context: &AudioContext,
|
context: &AudioContext,
|
||||||
|
|
|
@ -43,6 +43,7 @@ impl MediaMetadata {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// https://w3c.github.io/mediasession/#dom-mediametadata-mediametadata
|
/// https://w3c.github.io/mediasession/#dom-mediametadata-mediametadata
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn Constructor(
|
pub fn Constructor(
|
||||||
window: &Window,
|
window: &Window,
|
||||||
init: &MediaMetadataInit,
|
init: &MediaMetadataInit,
|
||||||
|
|
|
@ -56,6 +56,7 @@ impl MediaQueryListEvent {
|
||||||
ev
|
ev
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn Constructor(
|
pub fn Constructor(
|
||||||
window: &Window,
|
window: &Window,
|
||||||
type_: DOMString,
|
type_: DOMString,
|
||||||
|
|
|
@ -21,6 +21,7 @@ pub struct MediaStream {
|
||||||
tracks: DomRefCell<Vec<Dom<MediaStreamTrack>>>,
|
tracks: DomRefCell<Vec<Dom<MediaStreamTrack>>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
impl MediaStream {
|
impl MediaStream {
|
||||||
pub fn new_inherited() -> MediaStream {
|
pub fn new_inherited() -> MediaStream {
|
||||||
MediaStream {
|
MediaStream {
|
||||||
|
|
|
@ -19,6 +19,7 @@ pub struct MessageChannel {
|
||||||
|
|
||||||
impl MessageChannel {
|
impl MessageChannel {
|
||||||
/// <https://html.spec.whatwg.org/multipage/#dom-messagechannel>
|
/// <https://html.spec.whatwg.org/multipage/#dom-messagechannel>
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn Constructor(global: &GlobalScope) -> Fallible<DomRoot<MessageChannel>> {
|
pub fn Constructor(global: &GlobalScope) -> Fallible<DomRoot<MessageChannel>> {
|
||||||
let incumbent = GlobalScope::incumbent().ok_or(Error::InvalidState)?;
|
let incumbent = GlobalScope::incumbent().ok_or(Error::InvalidState)?;
|
||||||
|
|
||||||
|
|
|
@ -53,6 +53,7 @@ impl From<&WindowProxyOrMessagePortOrServiceWorker> for SrcObject {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[dom_struct]
|
#[dom_struct]
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub struct MessageEvent {
|
pub struct MessageEvent {
|
||||||
event: Event,
|
event: Event,
|
||||||
#[ignore_malloc_size_of = "mozjs"]
|
#[ignore_malloc_size_of = "mozjs"]
|
||||||
|
@ -65,6 +66,7 @@ pub struct MessageEvent {
|
||||||
frozen_ports: DomRefCell<Option<Heap<JSVal>>>,
|
frozen_ports: DomRefCell<Option<Heap<JSVal>>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
impl MessageEvent {
|
impl MessageEvent {
|
||||||
pub fn new_inherited(
|
pub fn new_inherited(
|
||||||
origin: DOMString,
|
origin: DOMString,
|
||||||
|
@ -262,6 +264,7 @@ impl MessageEventMethods for MessageEvent {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <https://html.spec.whatwg.org/multipage/#dom-messageevent-initmessageevent>
|
/// <https://html.spec.whatwg.org/multipage/#dom-messageevent-initmessageevent>
|
||||||
|
#[allow(non_snake_case)]
|
||||||
fn InitMessageEvent(
|
fn InitMessageEvent(
|
||||||
&self,
|
&self,
|
||||||
_cx: JSContext,
|
_cx: JSContext,
|
||||||
|
|
|
@ -124,6 +124,7 @@ impl MouseEvent {
|
||||||
ev
|
ev
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn Constructor(
|
pub fn Constructor(
|
||||||
window: &Window,
|
window: &Window,
|
||||||
type_: DOMString,
|
type_: DOMString,
|
||||||
|
|
|
@ -79,6 +79,7 @@ impl MutationObserver {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn Constructor(
|
pub fn Constructor(
|
||||||
global: &Window,
|
global: &Window,
|
||||||
callback: Rc<MutationCallback>,
|
callback: Rc<MutationCallback>,
|
||||||
|
|
|
@ -5,62 +5,76 @@
|
||||||
use crate::dom::bindings::str::DOMString;
|
use crate::dom::bindings::str::DOMString;
|
||||||
use std::borrow::Cow;
|
use std::borrow::Cow;
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn Product() -> DOMString {
|
pub fn Product() -> DOMString {
|
||||||
DOMString::from("Gecko")
|
DOMString::from("Gecko")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn ProductSub() -> DOMString {
|
pub fn ProductSub() -> DOMString {
|
||||||
DOMString::from("20100101")
|
DOMString::from("20100101")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn Vendor() -> DOMString {
|
pub fn Vendor() -> DOMString {
|
||||||
DOMString::from("")
|
DOMString::from("")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn VendorSub() -> DOMString {
|
pub fn VendorSub() -> DOMString {
|
||||||
DOMString::from("")
|
DOMString::from("")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn TaintEnabled() -> bool {
|
pub fn TaintEnabled() -> bool {
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn AppName() -> DOMString {
|
pub fn AppName() -> DOMString {
|
||||||
DOMString::from("Netscape") // Like Gecko/Webkit
|
DOMString::from("Netscape") // Like Gecko/Webkit
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn AppCodeName() -> DOMString {
|
pub fn AppCodeName() -> DOMString {
|
||||||
DOMString::from("Mozilla")
|
DOMString::from("Mozilla")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
#[cfg(target_os = "windows")]
|
#[cfg(target_os = "windows")]
|
||||||
pub fn Platform() -> DOMString {
|
pub fn Platform() -> DOMString {
|
||||||
DOMString::from("Win32")
|
DOMString::from("Win32")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
#[cfg(any(target_os = "android", target_os = "linux"))]
|
#[cfg(any(target_os = "android", target_os = "linux"))]
|
||||||
pub fn Platform() -> DOMString {
|
pub fn Platform() -> DOMString {
|
||||||
DOMString::from("Linux")
|
DOMString::from("Linux")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
#[cfg(target_os = "macos")]
|
#[cfg(target_os = "macos")]
|
||||||
pub fn Platform() -> DOMString {
|
pub fn Platform() -> DOMString {
|
||||||
DOMString::from("Mac")
|
DOMString::from("Mac")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
#[cfg(target_os = "ios")]
|
#[cfg(target_os = "ios")]
|
||||||
pub fn Platform() -> DOMString {
|
pub fn Platform() -> DOMString {
|
||||||
DOMString::from("iOS")
|
DOMString::from("iOS")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn UserAgent(user_agent: Cow<'static, str>) -> DOMString {
|
pub fn UserAgent(user_agent: Cow<'static, str>) -> DOMString {
|
||||||
DOMString::from(&*user_agent)
|
DOMString::from(&*user_agent)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn AppVersion() -> DOMString {
|
pub fn AppVersion() -> DOMString {
|
||||||
DOMString::from("4.0")
|
DOMString::from("4.0")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn Language() -> DOMString {
|
pub fn Language() -> DOMString {
|
||||||
DOMString::from("en-US")
|
DOMString::from("en-US")
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,6 +47,7 @@ impl OfflineAudioCompletionEvent {
|
||||||
ev
|
ev
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn Constructor(
|
pub fn Constructor(
|
||||||
window: &Window,
|
window: &Window,
|
||||||
type_: DOMString,
|
type_: DOMString,
|
||||||
|
|
|
@ -41,6 +41,7 @@ pub struct OfflineAudioContext {
|
||||||
pending_rendering_promise: DomRefCell<Option<Rc<Promise>>>,
|
pending_rendering_promise: DomRefCell<Option<Rc<Promise>>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
impl OfflineAudioContext {
|
impl OfflineAudioContext {
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root)]
|
||||||
fn new_inherited(
|
fn new_inherited(
|
||||||
|
|
|
@ -69,6 +69,7 @@ impl OffscreenCanvas {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn Constructor(
|
pub fn Constructor(
|
||||||
global: &GlobalScope,
|
global: &GlobalScope,
|
||||||
width: u64,
|
width: u64,
|
||||||
|
|
|
@ -95,6 +95,7 @@ impl OscillatorNode {
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn Constructor(
|
pub fn Constructor(
|
||||||
window: &Window,
|
window: &Window,
|
||||||
context: &BaseAudioContext,
|
context: &BaseAudioContext,
|
||||||
|
|
|
@ -55,6 +55,7 @@ impl PageTransitionEvent {
|
||||||
ev
|
ev
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn Constructor(
|
pub fn Constructor(
|
||||||
window: &Window,
|
window: &Window,
|
||||||
type_: DOMString,
|
type_: DOMString,
|
||||||
|
|
|
@ -184,6 +184,7 @@ impl PannerNode {
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn Constructor(
|
pub fn Constructor(
|
||||||
window: &Window,
|
window: &Window,
|
||||||
context: &BaseAudioContext,
|
context: &BaseAudioContext,
|
||||||
|
|
|
@ -61,6 +61,7 @@ impl PerformanceObserver {
|
||||||
reflect_dom_object(Box::new(observer), global, PerformanceObserverBinding::Wrap)
|
reflect_dom_object(Box::new(observer), global, PerformanceObserverBinding::Wrap)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn Constructor(
|
pub fn Constructor(
|
||||||
global: &GlobalScope,
|
global: &GlobalScope,
|
||||||
callback: Rc<PerformanceObserverCallback>,
|
callback: Rc<PerformanceObserverCallback>,
|
||||||
|
|
|
@ -85,6 +85,7 @@ impl Permissions {
|
||||||
// https://w3c.github.io/permissions/#dom-permissions-query
|
// https://w3c.github.io/permissions/#dom-permissions-query
|
||||||
// https://w3c.github.io/permissions/#dom-permissions-request
|
// https://w3c.github.io/permissions/#dom-permissions-request
|
||||||
// https://w3c.github.io/permissions/#dom-permissions-revoke
|
// https://w3c.github.io/permissions/#dom-permissions-revoke
|
||||||
|
#[allow(non_snake_case)]
|
||||||
fn manipulate(
|
fn manipulate(
|
||||||
&self,
|
&self,
|
||||||
op: Operation,
|
op: Operation,
|
||||||
|
@ -199,6 +200,7 @@ impl Permissions {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
impl PermissionsMethods for Permissions {
|
impl PermissionsMethods for Permissions {
|
||||||
// https://w3c.github.io/permissions/#dom-permissions-query
|
// https://w3c.github.io/permissions/#dom-permissions-query
|
||||||
fn Query(&self, cx: JSContext, permissionDesc: *mut JSObject) -> Rc<Promise> {
|
fn Query(&self, cx: JSContext, permissionDesc: *mut JSObject) -> Rc<Promise> {
|
||||||
|
|
|
@ -61,6 +61,7 @@ impl PopStateEvent {
|
||||||
ev
|
ev
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn Constructor(
|
pub fn Constructor(
|
||||||
window: &Window,
|
window: &Window,
|
||||||
type_: DOMString,
|
type_: DOMString,
|
||||||
|
|
|
@ -56,6 +56,8 @@ impl ProgressEvent {
|
||||||
}
|
}
|
||||||
ev
|
ev
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn Constructor(
|
pub fn Constructor(
|
||||||
global: &GlobalScope,
|
global: &GlobalScope,
|
||||||
type_: DOMString,
|
type_: DOMString,
|
||||||
|
|
|
@ -65,7 +65,7 @@ impl PromiseRejectionEvent {
|
||||||
ev
|
ev
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unrooted_must_root)]
|
#[allow(unrooted_must_root, non_snake_case)]
|
||||||
pub fn Constructor(
|
pub fn Constructor(
|
||||||
global: &GlobalScope,
|
global: &GlobalScope,
|
||||||
type_: DOMString,
|
type_: DOMString,
|
||||||
|
|
|
@ -67,6 +67,7 @@ impl RadioNodeList {
|
||||||
|
|
||||||
// https://dom.spec.whatwg.org/#dom-nodelist-length
|
// https://dom.spec.whatwg.org/#dom-nodelist-length
|
||||||
// https://github.com/servo/servo/issues/5875
|
// https://github.com/servo/servo/issues/5875
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn Length(&self) -> u32 {
|
pub fn Length(&self) -> u32 {
|
||||||
self.node_list.Length()
|
self.node_list.Length()
|
||||||
}
|
}
|
||||||
|
|
|
@ -83,6 +83,7 @@ impl Range {
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://dom.spec.whatwg.org/#dom-range
|
// https://dom.spec.whatwg.org/#dom-range
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn Constructor(window: &Window) -> Fallible<DomRoot<Range>> {
|
pub fn Constructor(window: &Window) -> Fallible<DomRoot<Range>> {
|
||||||
let document = window.Document();
|
let document = window.Document();
|
||||||
Ok(Range::new_with_doc(&document))
|
Ok(Range::new_with_doc(&document))
|
||||||
|
|
|
@ -74,6 +74,7 @@ impl Request {
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://fetch.spec.whatwg.org/#dom-request
|
// https://fetch.spec.whatwg.org/#dom-request
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn Constructor(
|
pub fn Constructor(
|
||||||
global: &GlobalScope,
|
global: &GlobalScope,
|
||||||
input: RequestInfo,
|
input: RequestInfo,
|
||||||
|
|
|
@ -53,6 +53,7 @@ pub struct Response {
|
||||||
stream_consumer: DomRefCell<Option<StreamConsumer>>,
|
stream_consumer: DomRefCell<Option<StreamConsumer>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
impl Response {
|
impl Response {
|
||||||
pub fn new_inherited() -> Response {
|
pub fn new_inherited() -> Response {
|
||||||
Response {
|
Response {
|
||||||
|
|
|
@ -59,6 +59,7 @@ impl RTCIceCandidate {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn Constructor(
|
pub fn Constructor(
|
||||||
window: &Window,
|
window: &Window,
|
||||||
config: &RTCIceCandidateInit,
|
config: &RTCIceCandidateInit,
|
||||||
|
|
|
@ -196,6 +196,7 @@ impl RTCPeerConnection {
|
||||||
this
|
this
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn Constructor(
|
pub fn Constructor(
|
||||||
window: &Window,
|
window: &Window,
|
||||||
config: &RTCConfiguration,
|
config: &RTCConfiguration,
|
||||||
|
|
|
@ -56,6 +56,7 @@ impl RTCPeerConnectionIceEvent {
|
||||||
e
|
e
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn Constructor(
|
pub fn Constructor(
|
||||||
window: &Window,
|
window: &Window,
|
||||||
ty: DOMString,
|
ty: DOMString,
|
||||||
|
|
|
@ -44,6 +44,7 @@ impl RTCSessionDescription {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn Constructor(
|
pub fn Constructor(
|
||||||
window: &Window,
|
window: &Window,
|
||||||
config: &RTCSessionDescriptionInit,
|
config: &RTCSessionDescriptionInit,
|
||||||
|
|
|
@ -50,6 +50,7 @@ impl RTCTrackEvent {
|
||||||
trackevent
|
trackevent
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn Constructor(
|
pub fn Constructor(
|
||||||
window: &Window,
|
window: &Window,
|
||||||
type_: DOMString,
|
type_: DOMString,
|
||||||
|
|
|
@ -83,6 +83,7 @@ impl StereoPannerNode {
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn Constructor(
|
pub fn Constructor(
|
||||||
window: &Window,
|
window: &Window,
|
||||||
context: &BaseAudioContext,
|
context: &BaseAudioContext,
|
||||||
|
|
|
@ -27,6 +27,7 @@ pub struct StorageEvent {
|
||||||
storage_area: MutNullableDom<Storage>,
|
storage_area: MutNullableDom<Storage>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
impl StorageEvent {
|
impl StorageEvent {
|
||||||
pub fn new_inherited(
|
pub fn new_inherited(
|
||||||
key: Option<DOMString>,
|
key: Option<DOMString>,
|
||||||
|
@ -109,6 +110,7 @@ impl StorageEvent {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
impl StorageEventMethods for StorageEvent {
|
impl StorageEventMethods for StorageEvent {
|
||||||
// https://html.spec.whatwg.org/multipage/#dom-storageevent-key
|
// https://html.spec.whatwg.org/multipage/#dom-storageevent-key
|
||||||
fn GetKey(&self) -> Option<DOMString> {
|
fn GetKey(&self) -> Option<DOMString> {
|
||||||
|
|
|
@ -55,7 +55,7 @@ pub trait LayoutSVGSVGElementHelpers {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl LayoutSVGSVGElementHelpers for LayoutDom<SVGSVGElement> {
|
impl LayoutSVGSVGElementHelpers for LayoutDom<SVGSVGElement> {
|
||||||
#[allow(unsafe_code)]
|
#[allow(unsafe_code, non_snake_case)]
|
||||||
fn data(&self) -> SVGSVGData {
|
fn data(&self) -> SVGSVGData {
|
||||||
unsafe {
|
unsafe {
|
||||||
let SVG = &*self.unsafe_get();
|
let SVG = &*self.unsafe_get();
|
||||||
|
|
|
@ -72,6 +72,7 @@ pub struct TestBinding {
|
||||||
url: MutableWeakRef<URL>,
|
url: MutableWeakRef<URL>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
impl TestBinding {
|
impl TestBinding {
|
||||||
fn new_inherited() -> TestBinding {
|
fn new_inherited() -> TestBinding {
|
||||||
TestBinding {
|
TestBinding {
|
||||||
|
@ -1076,6 +1077,7 @@ impl TestBindingMethods for TestBinding {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
impl TestBinding {
|
impl TestBinding {
|
||||||
pub fn BooleanAttributeStatic(_: &GlobalScope) -> bool {
|
pub fn BooleanAttributeStatic(_: &GlobalScope) -> bool {
|
||||||
false
|
false
|
||||||
|
|
|
@ -33,6 +33,7 @@ impl TestBindingIterable {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn Constructor(global: &GlobalScope) -> Fallible<DomRoot<TestBindingIterable>> {
|
pub fn Constructor(global: &GlobalScope) -> Fallible<DomRoot<TestBindingIterable>> {
|
||||||
Ok(TestBindingIterable::new(global))
|
Ok(TestBindingIterable::new(global))
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,6 +59,7 @@ impl TestBindingPairIterable {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
pub fn Constructor(global: &GlobalScope) -> Fallible<DomRoot<TestBindingPairIterable>> {
|
pub fn Constructor(global: &GlobalScope) -> Fallible<DomRoot<TestBindingPairIterable>> {
|
||||||
Ok(TestBindingPairIterable::new(global))
|
Ok(TestBindingPairIterable::new(global))
|
||||||
}
|
}
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue