diff options
Diffstat (limited to 'components/script/dom')
-rw-r--r-- | components/script/dom/bindings/codegen/CodegenRust.py | 3 | ||||
-rw-r--r-- | components/script/dom/document.rs | 12 | ||||
-rw-r--r-- | components/script/dom/element.rs | 1 | ||||
-rw-r--r-- | components/script/dom/eventtarget.rs | 5 | ||||
-rw-r--r-- | components/script/dom/htmlinputelement.rs | 5 | ||||
-rw-r--r-- | components/script/dom/node.rs | 10 | ||||
-rw-r--r-- | components/script/dom/webidls/Console.webidl | 2 | ||||
-rw-r--r-- | components/script/dom/webidls/TestBindingProxy.webidl | 2 | ||||
-rw-r--r-- | components/script/dom/webidls/Window.webidl | 2 | ||||
-rw-r--r-- | components/script/dom/window.rs | 4 |
10 files changed, 23 insertions, 23 deletions
diff --git a/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py index 5b81bcd46d1..830dcd51b3e 100644 --- a/components/script/dom/bindings/codegen/CodegenRust.py +++ b/components/script/dom/bindings/codegen/CodegenRust.py @@ -1645,6 +1645,9 @@ class CGImports(CGWrapper): if constructor: members += [constructor] + if d.proxy: + members += [o for o in d.operations.values() if o] + for m in members: if m.isMethod(): types += relatedTypesForSignatures(m) diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs index eaf68a380de..d63dcd017ff 100644 --- a/components/script/dom/document.rs +++ b/components/script/dom/document.rs @@ -270,11 +270,11 @@ pub trait DocumentHelpers<'a> { fn set_current_script(self, script: Option<&HTMLScriptElement>); fn trigger_mozbrowser_event(self, event: MozBrowserEvent); - /// http://w3c.github.io/animation-timing/#dom-windowanimationtiming-requestanimationframe + /// https://w3c.github.io/animation-timing/#dom-windowanimationtiming-requestanimationframe fn request_animation_frame(self, callback: Box<Fn(f64, )>) -> i32; - /// http://w3c.github.io/animation-timing/#dom-windowanimationtiming-cancelanimationframe + /// https://w3c.github.io/animation-timing/#dom-windowanimationtiming-cancelanimationframe fn cancel_animation_frame(self, ident: i32); - /// http://w3c.github.io/animation-timing/#dfn-invoke-callbacks-algorithm + /// https://w3c.github.io/animation-timing/#dfn-invoke-callbacks-algorithm fn invoke_animation_callbacks(self); fn prepare_async_load(self, load: LoadType) -> PendingAsyncLoad; fn load_async(self, load: LoadType, listener: Box<AsyncResponseTarget + Send>); @@ -878,7 +878,7 @@ impl<'a> DocumentHelpers<'a> for &'a Document { } } - /// http://w3c.github.io/animation-timing/#dom-windowanimationtiming-requestanimationframe + /// https://w3c.github.io/animation-timing/#dom-windowanimationtiming-requestanimationframe fn request_animation_frame(self, callback: Box<Fn(f64, )>) -> i32 { let window = self.window.root(); let window = window.r(); @@ -896,7 +896,7 @@ impl<'a> DocumentHelpers<'a> for &'a Document { ident } - /// http://w3c.github.io/animation-timing/#dom-windowanimationtiming-cancelanimationframe + /// https://w3c.github.io/animation-timing/#dom-windowanimationtiming-cancelanimationframe fn cancel_animation_frame(self, ident: i32) { self.animation_frame_list.borrow_mut().remove(&ident); if self.animation_frame_list.borrow().len() == 0 { @@ -909,7 +909,7 @@ impl<'a> DocumentHelpers<'a> for &'a Document { } } - /// http://w3c.github.io/animation-timing/#dfn-invoke-callbacks-algorithm + /// https://w3c.github.io/animation-timing/#dfn-invoke-callbacks-algorithm fn invoke_animation_callbacks(self) { let animation_frame_list; { diff --git a/components/script/dom/element.rs b/components/script/dom/element.rs index 445fd05bed3..269a0853654 100644 --- a/components/script/dom/element.rs +++ b/components/script/dom/element.rs @@ -60,7 +60,6 @@ use dom::virtualmethods::{VirtualMethods, vtable_for}; use devtools_traits::AttrInfo; use smallvec::VecLike; -use style; use style::legacy::{UnsignedIntegerAttribute, from_declaration}; use style::properties::{PropertyDeclarationBlock, PropertyDeclaration, parse_style_attribute}; use style::properties::DeclaredValue::SpecifiedValue; diff --git a/components/script/dom/eventtarget.rs b/components/script/dom/eventtarget.rs index bbb26623052..ab8da892376 100644 --- a/components/script/dom/eventtarget.rs +++ b/components/script/dom/eventtarget.rs @@ -310,7 +310,7 @@ impl<'a> EventTargetMethods for &'a EventTarget { phase: phase, listener: EventListenerType::Additive(listener) }; - if entry.position_elem(&new_entry).is_none() { + if !entry.contains(&new_entry) { entry.push(new_entry); } }, @@ -332,8 +332,7 @@ impl<'a> EventTargetMethods for &'a EventTarget { phase: phase, listener: EventListenerType::Additive(listener.clone()) }; - let position = entry.position_elem(&old_entry); - for &position in position.iter() { + if let Some(position) = entry.iter().position(|e| *e == old_entry) { entry.remove(position); } } diff --git a/components/script/dom/htmlinputelement.rs b/components/script/dom/htmlinputelement.rs index 21aaa4d8236..30a3bee03af 100644 --- a/components/script/dom/htmlinputelement.rs +++ b/components/script/dom/htmlinputelement.rs @@ -15,9 +15,7 @@ use dom::bindings::codegen::InheritTypes::{ElementCast, HTMLElementCast, HTMLInp use dom::bindings::codegen::InheritTypes::{HTMLInputElementDerived, HTMLFieldSetElementDerived, EventTargetCast}; use dom::bindings::codegen::InheritTypes::KeyboardEventCast; use dom::bindings::global::GlobalRef; -use dom::bindings::js::{JS, LayoutJS, MutNullableHeap}; -use dom::bindings::js::{Root}; -use dom::bindings::js::RootedReference; +use dom::bindings::js::{JS, LayoutJS, Root, RootedReference}; use dom::document::{Document, DocumentHelpers}; use dom::element::{AttributeHandlers, Element}; use dom::element::{RawLayoutElementHelpers, ActivationElementHelpers}; @@ -43,7 +41,6 @@ use string_cache::Atom; use std::ascii::OwnedAsciiExt; use std::borrow::ToOwned; use std::cell::Cell; -use std::default::Default; const DEFAULT_SUBMIT_VALUE: &'static str = "Submit"; const DEFAULT_RESET_VALUE: &'static str = "Reset"; diff --git a/components/script/dom/node.rs b/components/script/dom/node.rs index b8282ce1de0..35c07308a08 100644 --- a/components/script/dom/node.rs +++ b/components/script/dom/node.rs @@ -58,7 +58,6 @@ use selectors::parser::Selector; use selectors::parser::parse_author_origin_selector_list_from_str; use selectors::matching::matches; use style::properties::ComputedValues; -use style; use js::jsapi::{JSContext, JSObject, JSRuntime}; use core::nonzero::NonZero; @@ -1627,11 +1626,14 @@ impl Node { } // Step 7-8. + let reference_child_root; let reference_child = match child { - Some(child) if child == node => node.GetNextSibling(), - _ => None + Some(child) if child == node => { + reference_child_root = node.GetNextSibling(); + reference_child_root.r() + }, + _ => child }; - let reference_child = reference_child.r().or(child); // Step 9. let document = document_from_node(parent); diff --git a/components/script/dom/webidls/Console.webidl b/components/script/dom/webidls/Console.webidl index d6926aba80f..6a2b89f90de 100644 --- a/components/script/dom/webidls/Console.webidl +++ b/components/script/dom/webidls/Console.webidl @@ -5,7 +5,7 @@ * * References: * MDN Docs - https://developer.mozilla.org/en-US/docs/Web/API/console - * Draft Spec - http://sideshowbarker.github.io/console-spec/ + * Draft Spec - https://sideshowbarker.github.io/console-spec/ * * © Copyright 2014 Mozilla Foundation. */ diff --git a/components/script/dom/webidls/TestBindingProxy.webidl b/components/script/dom/webidls/TestBindingProxy.webidl index 4418b8849a7..ed578f50f0d 100644 --- a/components/script/dom/webidls/TestBindingProxy.webidl +++ b/components/script/dom/webidls/TestBindingProxy.webidl @@ -4,7 +4,7 @@ * You can obtain one at http://mozilla.org/MPL/2.0/. * * This IDL file was created to test the special operations (see - * http://heycam.github.io/webidl/#idl-special-operations) without converting + * https://heycam.github.io/webidl/#idl-special-operations) without converting * TestBinding.webidl into a proxy. * */ diff --git a/components/script/dom/webidls/Window.webidl b/components/script/dom/webidls/Window.webidl index ae8758e3c56..d9a87650413 100644 --- a/components/script/dom/webidls/Window.webidl +++ b/components/script/dom/webidls/Window.webidl @@ -149,7 +149,7 @@ interface WindowLocalStorage { }; Window implements WindowLocalStorage; -// http://w3c.github.io/animation-timing/#Window-interface-extensions +// https://w3c.github.io/animation-timing/#Window-interface-extensions partial interface Window { long requestAnimationFrame(FrameRequestCallback callback); void cancelAnimationFrame(long handle); diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs index 8256051d9a0..83cf3e9b4d5 100644 --- a/components/script/dom/window.rs +++ b/components/script/dom/window.rs @@ -475,7 +475,7 @@ impl<'a> WindowMethods for &'a Window { base64_atob(atob) } - /// http://w3c.github.io/animation-timing/#dom-windowanimationtiming-requestanimationframe + /// https://w3c.github.io/animation-timing/#dom-windowanimationtiming-requestanimationframe fn RequestAnimationFrame(self, callback: Rc<FrameRequestCallback>) -> i32 { let doc = self.Document(); @@ -487,7 +487,7 @@ impl<'a> WindowMethods for &'a Window { doc.r().request_animation_frame(Box::new(callback)) } - /// http://w3c.github.io/animation-timing/#dom-windowanimationtiming-cancelanimationframe + /// https://w3c.github.io/animation-timing/#dom-windowanimationtiming-cancelanimationframe fn CancelAnimationFrame(self, ident: i32) { let doc = self.Document(); doc.r().cancel_animation_frame(ident); |