mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Changed all prefixes from DOMString to the atomic Prefix from html5ever
This commit is contained in:
parent
225b505d22
commit
875e422fe6
76 changed files with 230 additions and 271 deletions
|
@ -3,7 +3,6 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use dom::bindings::js::Root;
|
||||
use dom::bindings::str::DOMString;
|
||||
use dom::document::Document;
|
||||
use dom::element::Element;
|
||||
use dom::element::ElementCreator;
|
||||
|
@ -81,7 +80,7 @@ use html5ever_atoms::{Prefix, QualName};
|
|||
use servo_config::prefs::PREFS;
|
||||
|
||||
fn create_svg_element(name: QualName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document)
|
||||
-> Root<Element> {
|
||||
assert!(name.ns == ns!(svg));
|
||||
|
@ -108,7 +107,7 @@ fn create_svg_element(name: QualName,
|
|||
}
|
||||
|
||||
fn create_html_element(name: QualName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document,
|
||||
creator: ElementCreator)
|
||||
-> Root<Element> {
|
||||
|
@ -280,7 +279,7 @@ pub fn create_element(name: QualName,
|
|||
-> Root<Element> {
|
||||
// FIXME(ajeffrey): Convert directly from Prefix to DOMString.
|
||||
|
||||
let prefix = prefix.map(|p| DOMString::from(&*p));
|
||||
// let prefix = prefix.map(|p| DOMString::from(&*p));
|
||||
|
||||
match name.ns {
|
||||
ns!(html) => create_html_element(name, prefix, document, creator),
|
||||
|
|
|
@ -123,7 +123,7 @@ pub struct Element {
|
|||
local_name: LocalName,
|
||||
tag_name: TagName,
|
||||
namespace: Namespace,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
attrs: DOMRefCell<Vec<JS<Attr>>>,
|
||||
id_attribute: DOMRefCell<Option<Atom>>,
|
||||
#[ignore_heap_size_of = "Arc"]
|
||||
|
@ -202,14 +202,14 @@ impl Element {
|
|||
}
|
||||
|
||||
pub fn new_inherited(local_name: LocalName,
|
||||
namespace: Namespace, prefix: Option<DOMString>,
|
||||
namespace: Namespace, prefix: Option<Prefix>,
|
||||
document: &Document) -> Element {
|
||||
Element::new_inherited_with_state(ElementState::empty(), local_name,
|
||||
namespace, prefix, document)
|
||||
}
|
||||
|
||||
pub fn new_inherited_with_state(state: ElementState, local_name: LocalName,
|
||||
namespace: Namespace, prefix: Option<DOMString>,
|
||||
namespace: Namespace, prefix: Option<Prefix>,
|
||||
document: &Document)
|
||||
-> Element {
|
||||
Element {
|
||||
|
@ -230,7 +230,7 @@ impl Element {
|
|||
|
||||
pub fn new(local_name: LocalName,
|
||||
namespace: Namespace,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> Root<Element> {
|
||||
Node::reflect_node(
|
||||
box Element::new_inherited(local_name, namespace, prefix, document),
|
||||
|
@ -815,7 +815,7 @@ impl Element {
|
|||
&self.namespace
|
||||
}
|
||||
|
||||
pub fn prefix(&self) -> Option<&DOMString> {
|
||||
pub fn prefix(&self) -> Option<&Prefix> {
|
||||
self.prefix.as_ref()
|
||||
}
|
||||
|
||||
|
@ -1408,7 +1408,7 @@ impl ElementMethods for Element {
|
|||
|
||||
// https://dom.spec.whatwg.org/#dom-element-prefix
|
||||
fn GetPrefix(&self) -> Option<DOMString> {
|
||||
self.prefix.clone()
|
||||
self.prefix.as_ref().map(|p| DOMString::from(&**p))
|
||||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#dom-element-tagname
|
||||
|
|
|
@ -25,7 +25,7 @@ use dom::node::{Node, document_from_node};
|
|||
use dom::urlhelper::UrlHelper;
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
use net_traits::ReferrerPolicy;
|
||||
use num_traits::ToPrimitive;
|
||||
use script_traits::MozBrowserEvent;
|
||||
|
@ -43,7 +43,7 @@ pub struct HTMLAnchorElement {
|
|||
|
||||
impl HTMLAnchorElement {
|
||||
fn new_inherited(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> HTMLAnchorElement {
|
||||
HTMLAnchorElement {
|
||||
htmlelement:
|
||||
|
@ -55,7 +55,7 @@ impl HTMLAnchorElement {
|
|||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> Root<HTMLAnchorElement> {
|
||||
Node::reflect_node(box HTMLAnchorElement::new_inherited(local_name, prefix, document),
|
||||
document,
|
||||
|
|
|
@ -12,7 +12,7 @@ use dom::htmlelement::HTMLElement;
|
|||
use dom::node::Node;
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
use style::attr::AttrValue;
|
||||
|
||||
#[dom_struct]
|
||||
|
@ -22,7 +22,7 @@ pub struct HTMLAppletElement {
|
|||
|
||||
impl HTMLAppletElement {
|
||||
fn new_inherited(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> HTMLAppletElement {
|
||||
HTMLAppletElement {
|
||||
htmlelement:
|
||||
|
@ -32,7 +32,7 @@ impl HTMLAppletElement {
|
|||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> Root<HTMLAppletElement> {
|
||||
Node::reflect_node(box HTMLAppletElement::new_inherited(local_name, prefix, document),
|
||||
document,
|
||||
|
|
|
@ -20,7 +20,7 @@ use dom::node::{Node, document_from_node};
|
|||
use dom::virtualmethods::VirtualMethods;
|
||||
use dom_struct::dom_struct;
|
||||
use euclid::point::Point2D;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
use net_traits::ReferrerPolicy;
|
||||
use std::default::Default;
|
||||
use std::f32;
|
||||
|
@ -221,7 +221,7 @@ pub struct HTMLAreaElement {
|
|||
}
|
||||
|
||||
impl HTMLAreaElement {
|
||||
fn new_inherited(local_name: LocalName, prefix: Option<DOMString>, document: &Document) -> HTMLAreaElement {
|
||||
fn new_inherited(local_name: LocalName, prefix: Option<Prefix>, document: &Document) -> HTMLAreaElement {
|
||||
HTMLAreaElement {
|
||||
htmlelement: HTMLElement::new_inherited(local_name, prefix, document),
|
||||
rel_list: Default::default(),
|
||||
|
@ -230,7 +230,7 @@ impl HTMLAreaElement {
|
|||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> Root<HTMLAreaElement> {
|
||||
Node::reflect_node(box HTMLAreaElement::new_inherited(local_name, prefix, document),
|
||||
document,
|
||||
|
|
|
@ -4,12 +4,11 @@
|
|||
|
||||
use dom::bindings::codegen::Bindings::HTMLAudioElementBinding;
|
||||
use dom::bindings::js::Root;
|
||||
use dom::bindings::str::DOMString;
|
||||
use dom::document::Document;
|
||||
use dom::htmlmediaelement::HTMLMediaElement;
|
||||
use dom::node::Node;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
|
||||
#[dom_struct]
|
||||
pub struct HTMLAudioElement {
|
||||
|
@ -18,7 +17,7 @@ pub struct HTMLAudioElement {
|
|||
|
||||
impl HTMLAudioElement {
|
||||
fn new_inherited(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> HTMLAudioElement {
|
||||
HTMLAudioElement {
|
||||
htmlmediaelement:
|
||||
|
@ -28,7 +27,7 @@ impl HTMLAudioElement {
|
|||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> Root<HTMLAudioElement> {
|
||||
Node::reflect_node(box HTMLAudioElement::new_inherited(local_name, prefix, document),
|
||||
document,
|
||||
|
|
|
@ -14,7 +14,7 @@ use dom::htmlelement::HTMLElement;
|
|||
use dom::node::{Node, UnbindContext, document_from_node};
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
use servo_url::ServoUrl;
|
||||
use style::attr::AttrValue;
|
||||
|
||||
|
@ -24,7 +24,7 @@ pub struct HTMLBaseElement {
|
|||
}
|
||||
|
||||
impl HTMLBaseElement {
|
||||
fn new_inherited(local_name: LocalName, prefix: Option<DOMString>, document: &Document) -> HTMLBaseElement {
|
||||
fn new_inherited(local_name: LocalName, prefix: Option<Prefix>, document: &Document) -> HTMLBaseElement {
|
||||
HTMLBaseElement {
|
||||
htmlelement: HTMLElement::new_inherited(local_name, prefix, document)
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ impl HTMLBaseElement {
|
|||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> Root<HTMLBaseElement> {
|
||||
Node::reflect_node(box HTMLBaseElement::new_inherited(local_name, prefix, document),
|
||||
document,
|
||||
|
|
|
@ -18,7 +18,7 @@ use dom::htmlelement::HTMLElement;
|
|||
use dom::node::{Node, document_from_node, window_from_node};
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
use script_traits::ScriptMsg as ConstellationMsg;
|
||||
use servo_url::ServoUrl;
|
||||
use style::attr::AttrValue;
|
||||
|
@ -34,7 +34,7 @@ pub struct HTMLBodyElement {
|
|||
}
|
||||
|
||||
impl HTMLBodyElement {
|
||||
fn new_inherited(local_name: LocalName, prefix: Option<DOMString>, document: &Document)
|
||||
fn new_inherited(local_name: LocalName, prefix: Option<Prefix>, document: &Document)
|
||||
-> HTMLBodyElement {
|
||||
HTMLBodyElement {
|
||||
htmlelement: HTMLElement::new_inherited(local_name, prefix, document),
|
||||
|
@ -42,7 +42,7 @@ impl HTMLBodyElement {
|
|||
}
|
||||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName, prefix: Option<DOMString>, document: &Document)
|
||||
pub fn new(local_name: LocalName, prefix: Option<Prefix>, document: &Document)
|
||||
-> Root<HTMLBodyElement> {
|
||||
Node::reflect_node(box HTMLBodyElement::new_inherited(local_name, prefix, document),
|
||||
document,
|
||||
|
|
|
@ -4,12 +4,11 @@
|
|||
|
||||
use dom::bindings::codegen::Bindings::HTMLBRElementBinding;
|
||||
use dom::bindings::js::Root;
|
||||
use dom::bindings::str::DOMString;
|
||||
use dom::document::Document;
|
||||
use dom::htmlelement::HTMLElement;
|
||||
use dom::node::Node;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
|
||||
#[dom_struct]
|
||||
pub struct HTMLBRElement {
|
||||
|
@ -17,7 +16,7 @@ pub struct HTMLBRElement {
|
|||
}
|
||||
|
||||
impl HTMLBRElement {
|
||||
fn new_inherited(local_name: LocalName, prefix: Option<DOMString>, document: &Document) -> HTMLBRElement {
|
||||
fn new_inherited(local_name: LocalName, prefix: Option<Prefix>, document: &Document) -> HTMLBRElement {
|
||||
HTMLBRElement {
|
||||
htmlelement: HTMLElement::new_inherited(local_name, prefix, document)
|
||||
}
|
||||
|
@ -25,7 +24,7 @@ impl HTMLBRElement {
|
|||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> Root<HTMLBRElement> {
|
||||
Node::reflect_node(box HTMLBRElement::new_inherited(local_name, prefix, document),
|
||||
document,
|
||||
|
|
|
@ -24,7 +24,7 @@ use dom::validation::Validatable;
|
|||
use dom::validitystate::{ValidityState, ValidationFlags};
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
use std::cell::Cell;
|
||||
use std::default::Default;
|
||||
use style::element_state::*;
|
||||
|
@ -47,7 +47,7 @@ pub struct HTMLButtonElement {
|
|||
|
||||
impl HTMLButtonElement {
|
||||
fn new_inherited(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> HTMLButtonElement {
|
||||
HTMLButtonElement {
|
||||
htmlelement:
|
||||
|
@ -60,7 +60,7 @@ impl HTMLButtonElement {
|
|||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> Root<HTMLButtonElement> {
|
||||
Node::reflect_node(box HTMLButtonElement::new_inherited(local_name, prefix, document),
|
||||
document,
|
||||
|
|
|
@ -27,7 +27,7 @@ use dom::virtualmethods::VirtualMethods;
|
|||
use dom::webglrenderingcontext::{LayoutCanvasWebGLRenderingContextHelpers, WebGLRenderingContext};
|
||||
use dom_struct::dom_struct;
|
||||
use euclid::size::Size2D;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
use image::ColorType;
|
||||
use image::png::PNGEncoder;
|
||||
use ipc_channel::ipc::{self, IpcSender};
|
||||
|
@ -56,7 +56,7 @@ pub struct HTMLCanvasElement {
|
|||
|
||||
impl HTMLCanvasElement {
|
||||
fn new_inherited(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> HTMLCanvasElement {
|
||||
HTMLCanvasElement {
|
||||
htmlelement: HTMLElement::new_inherited(local_name, prefix, document),
|
||||
|
@ -66,7 +66,7 @@ impl HTMLCanvasElement {
|
|||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> Root<HTMLCanvasElement> {
|
||||
Node::reflect_node(box HTMLCanvasElement::new_inherited(local_name, prefix, document),
|
||||
document,
|
||||
|
|
|
@ -10,7 +10,7 @@ use dom::document::Document;
|
|||
use dom::htmlelement::HTMLElement;
|
||||
use dom::node::Node;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
|
||||
#[dom_struct]
|
||||
pub struct HTMLDataElement {
|
||||
|
@ -19,7 +19,7 @@ pub struct HTMLDataElement {
|
|||
|
||||
impl HTMLDataElement {
|
||||
fn new_inherited(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> HTMLDataElement {
|
||||
HTMLDataElement {
|
||||
htmlelement: HTMLElement::new_inherited(local_name, prefix, document)
|
||||
|
@ -28,7 +28,7 @@ impl HTMLDataElement {
|
|||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> Root<HTMLDataElement> {
|
||||
Node::reflect_node(box HTMLDataElement::new_inherited(local_name, prefix, document),
|
||||
document,
|
||||
|
|
|
@ -6,7 +6,6 @@ use dom::bindings::codegen::Bindings::HTMLDataListElementBinding;
|
|||
use dom::bindings::codegen::Bindings::HTMLDataListElementBinding::HTMLDataListElementMethods;
|
||||
use dom::bindings::inheritance::Castable;
|
||||
use dom::bindings::js::Root;
|
||||
use dom::bindings::str::DOMString;
|
||||
use dom::document::Document;
|
||||
use dom::element::Element;
|
||||
use dom::htmlcollection::{CollectionFilter, HTMLCollection};
|
||||
|
@ -14,7 +13,7 @@ use dom::htmlelement::HTMLElement;
|
|||
use dom::htmloptionelement::HTMLOptionElement;
|
||||
use dom::node::{Node, window_from_node};
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
|
||||
#[dom_struct]
|
||||
pub struct HTMLDataListElement {
|
||||
|
@ -23,7 +22,7 @@ pub struct HTMLDataListElement {
|
|||
|
||||
impl HTMLDataListElement {
|
||||
fn new_inherited(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> HTMLDataListElement {
|
||||
HTMLDataListElement {
|
||||
htmlelement:
|
||||
|
@ -33,7 +32,7 @@ impl HTMLDataListElement {
|
|||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> Root<HTMLDataListElement> {
|
||||
Node::reflect_node(box HTMLDataListElement::new_inherited(local_name, prefix, document),
|
||||
document,
|
||||
|
|
|
@ -8,7 +8,6 @@ use dom::bindings::codegen::Bindings::HTMLDetailsElementBinding::HTMLDetailsElem
|
|||
use dom::bindings::inheritance::Castable;
|
||||
use dom::bindings::js::Root;
|
||||
use dom::bindings::refcounted::Trusted;
|
||||
use dom::bindings::str::DOMString;
|
||||
use dom::document::Document;
|
||||
use dom::element::AttributeMutation;
|
||||
use dom::eventtarget::EventTarget;
|
||||
|
@ -16,7 +15,7 @@ use dom::htmlelement::HTMLElement;
|
|||
use dom::node::{Node, window_from_node};
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
use script_thread::Runnable;
|
||||
use std::cell::Cell;
|
||||
use task_source::TaskSource;
|
||||
|
@ -29,7 +28,7 @@ pub struct HTMLDetailsElement {
|
|||
|
||||
impl HTMLDetailsElement {
|
||||
fn new_inherited(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> HTMLDetailsElement {
|
||||
HTMLDetailsElement {
|
||||
htmlelement:
|
||||
|
@ -40,7 +39,7 @@ impl HTMLDetailsElement {
|
|||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> Root<HTMLDetailsElement> {
|
||||
Node::reflect_node(box HTMLDetailsElement::new_inherited(local_name, prefix, document),
|
||||
document,
|
||||
|
|
|
@ -14,7 +14,7 @@ use dom::eventtarget::EventTarget;
|
|||
use dom::htmlelement::HTMLElement;
|
||||
use dom::node::{Node, window_from_node};
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
|
||||
#[dom_struct]
|
||||
pub struct HTMLDialogElement {
|
||||
|
@ -24,7 +24,7 @@ pub struct HTMLDialogElement {
|
|||
|
||||
impl HTMLDialogElement {
|
||||
fn new_inherited(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> HTMLDialogElement {
|
||||
HTMLDialogElement {
|
||||
htmlelement:
|
||||
|
@ -35,7 +35,7 @@ impl HTMLDialogElement {
|
|||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> Root<HTMLDialogElement> {
|
||||
Node::reflect_node(box HTMLDialogElement::new_inherited(local_name, prefix, document),
|
||||
document,
|
||||
|
|
|
@ -4,12 +4,11 @@
|
|||
|
||||
use dom::bindings::codegen::Bindings::HTMLDirectoryElementBinding;
|
||||
use dom::bindings::js::Root;
|
||||
use dom::bindings::str::DOMString;
|
||||
use dom::document::Document;
|
||||
use dom::htmlelement::HTMLElement;
|
||||
use dom::node::Node;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
|
||||
#[dom_struct]
|
||||
pub struct HTMLDirectoryElement {
|
||||
|
@ -18,7 +17,7 @@ pub struct HTMLDirectoryElement {
|
|||
|
||||
impl HTMLDirectoryElement {
|
||||
fn new_inherited(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> HTMLDirectoryElement {
|
||||
HTMLDirectoryElement {
|
||||
htmlelement:
|
||||
|
@ -28,7 +27,7 @@ impl HTMLDirectoryElement {
|
|||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> Root<HTMLDirectoryElement> {
|
||||
Node::reflect_node(box HTMLDirectoryElement::new_inherited(local_name, prefix, document),
|
||||
document,
|
||||
|
|
|
@ -9,7 +9,7 @@ use dom::document::Document;
|
|||
use dom::htmlelement::HTMLElement;
|
||||
use dom::node::Node;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
|
||||
#[dom_struct]
|
||||
pub struct HTMLDivElement {
|
||||
|
@ -18,7 +18,7 @@ pub struct HTMLDivElement {
|
|||
|
||||
impl HTMLDivElement {
|
||||
fn new_inherited(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> HTMLDivElement {
|
||||
HTMLDivElement {
|
||||
htmlelement: HTMLElement::new_inherited(local_name, prefix, document)
|
||||
|
@ -27,7 +27,7 @@ impl HTMLDivElement {
|
|||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> Root<HTMLDivElement> {
|
||||
Node::reflect_node(box HTMLDivElement::new_inherited(local_name, prefix, document),
|
||||
document,
|
||||
|
|
|
@ -4,12 +4,11 @@
|
|||
|
||||
use dom::bindings::codegen::Bindings::HTMLDListElementBinding;
|
||||
use dom::bindings::js::Root;
|
||||
use dom::bindings::str::DOMString;
|
||||
use dom::document::Document;
|
||||
use dom::htmlelement::HTMLElement;
|
||||
use dom::node::Node;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
|
||||
#[dom_struct]
|
||||
pub struct HTMLDListElement {
|
||||
|
@ -17,7 +16,7 @@ pub struct HTMLDListElement {
|
|||
}
|
||||
|
||||
impl HTMLDListElement {
|
||||
fn new_inherited(local_name: LocalName, prefix: Option<DOMString>, document: &Document) -> HTMLDListElement {
|
||||
fn new_inherited(local_name: LocalName, prefix: Option<Prefix>, document: &Document) -> HTMLDListElement {
|
||||
HTMLDListElement {
|
||||
htmlelement:
|
||||
HTMLElement::new_inherited(local_name, prefix, document)
|
||||
|
@ -26,7 +25,7 @@ impl HTMLDListElement {
|
|||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> Root<HTMLDListElement> {
|
||||
Node::reflect_node(box HTMLDListElement::new_inherited(local_name, prefix, document),
|
||||
document,
|
||||
|
|
|
@ -30,7 +30,7 @@ use dom::node::{document_from_node, window_from_node};
|
|||
use dom::nodelist::NodeList;
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
use std::ascii::AsciiExt;
|
||||
use std::borrow::ToOwned;
|
||||
use std::default::Default;
|
||||
|
@ -46,13 +46,13 @@ pub struct HTMLElement {
|
|||
}
|
||||
|
||||
impl HTMLElement {
|
||||
pub fn new_inherited(tag_name: LocalName, prefix: Option<DOMString>,
|
||||
pub fn new_inherited(tag_name: LocalName, prefix: Option<Prefix>,
|
||||
document: &Document) -> HTMLElement {
|
||||
HTMLElement::new_inherited_with_state(ElementState::empty(), tag_name, prefix, document)
|
||||
}
|
||||
|
||||
pub fn new_inherited_with_state(state: ElementState, tag_name: LocalName,
|
||||
prefix: Option<DOMString>, document: &Document)
|
||||
prefix: Option<Prefix>, document: &Document)
|
||||
-> HTMLElement {
|
||||
HTMLElement {
|
||||
element:
|
||||
|
@ -63,7 +63,7 @@ impl HTMLElement {
|
|||
}
|
||||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName, prefix: Option<DOMString>, document: &Document) -> Root<HTMLElement> {
|
||||
pub fn new(local_name: LocalName, prefix: Option<Prefix>, document: &Document) -> Root<HTMLElement> {
|
||||
Node::reflect_node(box HTMLElement::new_inherited(local_name, prefix, document),
|
||||
document,
|
||||
HTMLElementBinding::Wrap)
|
||||
|
|
|
@ -4,12 +4,11 @@
|
|||
|
||||
use dom::bindings::codegen::Bindings::HTMLEmbedElementBinding;
|
||||
use dom::bindings::js::Root;
|
||||
use dom::bindings::str::DOMString;
|
||||
use dom::document::Document;
|
||||
use dom::htmlelement::HTMLElement;
|
||||
use dom::node::Node;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
|
||||
#[dom_struct]
|
||||
pub struct HTMLEmbedElement {
|
||||
|
@ -17,7 +16,7 @@ pub struct HTMLEmbedElement {
|
|||
}
|
||||
|
||||
impl HTMLEmbedElement {
|
||||
fn new_inherited(local_name: LocalName, prefix: Option<DOMString>, document: &Document) -> HTMLEmbedElement {
|
||||
fn new_inherited(local_name: LocalName, prefix: Option<Prefix>, document: &Document) -> HTMLEmbedElement {
|
||||
HTMLEmbedElement {
|
||||
htmlelement: HTMLElement::new_inherited(local_name, prefix, document)
|
||||
}
|
||||
|
@ -25,7 +24,7 @@ impl HTMLEmbedElement {
|
|||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> Root<HTMLEmbedElement> {
|
||||
Node::reflect_node(box HTMLEmbedElement::new_inherited(local_name, prefix, document),
|
||||
document,
|
||||
|
|
|
@ -7,7 +7,6 @@ use dom::bindings::codegen::Bindings::HTMLFieldSetElementBinding;
|
|||
use dom::bindings::codegen::Bindings::HTMLFieldSetElementBinding::HTMLFieldSetElementMethods;
|
||||
use dom::bindings::inheritance::{Castable, ElementTypeId, HTMLElementTypeId, NodeTypeId};
|
||||
use dom::bindings::js::{MutNullableJS, Root};
|
||||
use dom::bindings::str::DOMString;
|
||||
use dom::document::Document;
|
||||
use dom::element::{AttributeMutation, Element};
|
||||
use dom::htmlcollection::{CollectionFilter, HTMLCollection};
|
||||
|
@ -18,7 +17,7 @@ use dom::node::{Node, window_from_node};
|
|||
use dom::validitystate::ValidityState;
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
use std::default::Default;
|
||||
use style::element_state::*;
|
||||
|
||||
|
@ -30,7 +29,7 @@ pub struct HTMLFieldSetElement {
|
|||
|
||||
impl HTMLFieldSetElement {
|
||||
fn new_inherited(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> HTMLFieldSetElement {
|
||||
HTMLFieldSetElement {
|
||||
htmlelement:
|
||||
|
@ -42,7 +41,7 @@ impl HTMLFieldSetElement {
|
|||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> Root<HTMLFieldSetElement> {
|
||||
Node::reflect_node(box HTMLFieldSetElement::new_inherited(local_name, prefix, document),
|
||||
document,
|
||||
|
|
|
@ -14,7 +14,7 @@ use dom::htmlelement::HTMLElement;
|
|||
use dom::node::Node;
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
use servo_atoms::Atom;
|
||||
use style::attr::AttrValue;
|
||||
use style::str::{HTML_SPACE_CHARACTERS, read_numbers};
|
||||
|
@ -26,7 +26,7 @@ pub struct HTMLFontElement {
|
|||
|
||||
|
||||
impl HTMLFontElement {
|
||||
fn new_inherited(local_name: LocalName, prefix: Option<DOMString>, document: &Document) -> HTMLFontElement {
|
||||
fn new_inherited(local_name: LocalName, prefix: Option<Prefix>, document: &Document) -> HTMLFontElement {
|
||||
HTMLFontElement {
|
||||
htmlelement: HTMLElement::new_inherited(local_name, prefix, document),
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ impl HTMLFontElement {
|
|||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> Root<HTMLFontElement> {
|
||||
Node::reflect_node(box HTMLFontElement::new_inherited(local_name, prefix, document),
|
||||
document,
|
||||
|
|
|
@ -45,7 +45,7 @@ use dom_struct::dom_struct;
|
|||
use encoding::EncodingRef;
|
||||
use encoding::all::UTF_8;
|
||||
use encoding::label::encoding_from_whatwg_label;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
use hyper::header::{Charset, ContentDisposition, ContentType, DispositionParam, DispositionType};
|
||||
use hyper::method::Method;
|
||||
use msg::constellation_msg::PipelineId;
|
||||
|
@ -73,7 +73,7 @@ pub struct HTMLFormElement {
|
|||
|
||||
impl HTMLFormElement {
|
||||
fn new_inherited(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> HTMLFormElement {
|
||||
HTMLFormElement {
|
||||
htmlelement: HTMLElement::new_inherited(local_name, prefix, document),
|
||||
|
@ -86,7 +86,7 @@ impl HTMLFormElement {
|
|||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> Root<HTMLFormElement> {
|
||||
Node::reflect_node(box HTMLFormElement::new_inherited(local_name, prefix, document),
|
||||
document,
|
||||
|
|
|
@ -4,12 +4,11 @@
|
|||
|
||||
use dom::bindings::codegen::Bindings::HTMLFrameElementBinding;
|
||||
use dom::bindings::js::Root;
|
||||
use dom::bindings::str::DOMString;
|
||||
use dom::document::Document;
|
||||
use dom::htmlelement::HTMLElement;
|
||||
use dom::node::Node;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
|
||||
#[dom_struct]
|
||||
pub struct HTMLFrameElement {
|
||||
|
@ -17,7 +16,7 @@ pub struct HTMLFrameElement {
|
|||
}
|
||||
|
||||
impl HTMLFrameElement {
|
||||
fn new_inherited(local_name: LocalName, prefix: Option<DOMString>, document: &Document) -> HTMLFrameElement {
|
||||
fn new_inherited(local_name: LocalName, prefix: Option<Prefix>, document: &Document) -> HTMLFrameElement {
|
||||
HTMLFrameElement {
|
||||
htmlelement: HTMLElement::new_inherited(local_name, prefix, document)
|
||||
}
|
||||
|
@ -25,7 +24,7 @@ impl HTMLFrameElement {
|
|||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> Root<HTMLFrameElement> {
|
||||
Node::reflect_node(box HTMLFrameElement::new_inherited(local_name, prefix, document),
|
||||
document,
|
||||
|
|
|
@ -7,12 +7,11 @@ use dom::bindings::codegen::Bindings::HTMLFrameSetElementBinding;
|
|||
use dom::bindings::codegen::Bindings::HTMLFrameSetElementBinding::HTMLFrameSetElementMethods;
|
||||
use dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
|
||||
use dom::bindings::js::Root;
|
||||
use dom::bindings::str::DOMString;
|
||||
use dom::document::Document;
|
||||
use dom::htmlelement::HTMLElement;
|
||||
use dom::node::{Node, document_from_node};
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
|
||||
#[dom_struct]
|
||||
pub struct HTMLFrameSetElement {
|
||||
|
@ -21,7 +20,7 @@ pub struct HTMLFrameSetElement {
|
|||
|
||||
impl HTMLFrameSetElement {
|
||||
fn new_inherited(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> HTMLFrameSetElement {
|
||||
HTMLFrameSetElement {
|
||||
htmlelement:
|
||||
|
@ -31,7 +30,7 @@ impl HTMLFrameSetElement {
|
|||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> Root<HTMLFrameSetElement> {
|
||||
Node::reflect_node(box HTMLFrameSetElement::new_inherited(local_name, prefix, document),
|
||||
document,
|
||||
|
|
|
@ -6,7 +6,6 @@ use dom::bindings::codegen::Bindings::DocumentBinding::DocumentMethods;
|
|||
use dom::bindings::codegen::Bindings::HTMLHeadElementBinding;
|
||||
use dom::bindings::inheritance::Castable;
|
||||
use dom::bindings::js::{Root, RootedReference};
|
||||
use dom::bindings::str::DOMString;
|
||||
use dom::document::{Document, determine_policy_for_token};
|
||||
use dom::element::Element;
|
||||
use dom::htmlelement::HTMLElement;
|
||||
|
@ -15,7 +14,7 @@ use dom::node::{Node, document_from_node};
|
|||
use dom::userscripts::load_script;
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
|
||||
#[dom_struct]
|
||||
pub struct HTMLHeadElement {
|
||||
|
@ -24,7 +23,7 @@ pub struct HTMLHeadElement {
|
|||
|
||||
impl HTMLHeadElement {
|
||||
fn new_inherited(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> HTMLHeadElement {
|
||||
HTMLHeadElement {
|
||||
htmlelement: HTMLElement::new_inherited(local_name, prefix, document)
|
||||
|
@ -33,7 +32,7 @@ impl HTMLHeadElement {
|
|||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> Root<HTMLHeadElement> {
|
||||
Node::reflect_node(box HTMLHeadElement::new_inherited(local_name, prefix, document),
|
||||
document,
|
||||
|
|
|
@ -4,12 +4,11 @@
|
|||
|
||||
use dom::bindings::codegen::Bindings::HTMLHeadingElementBinding;
|
||||
use dom::bindings::js::Root;
|
||||
use dom::bindings::str::DOMString;
|
||||
use dom::document::Document;
|
||||
use dom::htmlelement::HTMLElement;
|
||||
use dom::node::Node;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
|
||||
#[derive(JSTraceable, HeapSizeOf)]
|
||||
pub enum HeadingLevel {
|
||||
|
@ -29,7 +28,7 @@ pub struct HTMLHeadingElement {
|
|||
|
||||
impl HTMLHeadingElement {
|
||||
fn new_inherited(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document,
|
||||
level: HeadingLevel) -> HTMLHeadingElement {
|
||||
HTMLHeadingElement {
|
||||
|
@ -41,7 +40,7 @@ impl HTMLHeadingElement {
|
|||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document,
|
||||
level: HeadingLevel) -> Root<HTMLHeadingElement> {
|
||||
Node::reflect_node(box HTMLHeadingElement::new_inherited(local_name, prefix, document, level),
|
||||
|
|
|
@ -13,7 +13,7 @@ use dom::htmlelement::HTMLElement;
|
|||
use dom::node::Node;
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
use style::attr::{AttrValue, LengthOrPercentageOrAuto};
|
||||
|
||||
#[dom_struct]
|
||||
|
@ -22,7 +22,7 @@ pub struct HTMLHRElement {
|
|||
}
|
||||
|
||||
impl HTMLHRElement {
|
||||
fn new_inherited(local_name: LocalName, prefix: Option<DOMString>, document: &Document) -> HTMLHRElement {
|
||||
fn new_inherited(local_name: LocalName, prefix: Option<Prefix>, document: &Document) -> HTMLHRElement {
|
||||
HTMLHRElement {
|
||||
htmlelement: HTMLElement::new_inherited(local_name, prefix, document)
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ impl HTMLHRElement {
|
|||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> Root<HTMLHRElement> {
|
||||
Node::reflect_node(box HTMLHRElement::new_inherited(local_name, prefix, document),
|
||||
document,
|
||||
|
|
|
@ -4,12 +4,11 @@
|
|||
|
||||
use dom::bindings::codegen::Bindings::HTMLHtmlElementBinding;
|
||||
use dom::bindings::js::Root;
|
||||
use dom::bindings::str::DOMString;
|
||||
use dom::document::Document;
|
||||
use dom::htmlelement::HTMLElement;
|
||||
use dom::node::Node;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
|
||||
#[dom_struct]
|
||||
pub struct HTMLHtmlElement {
|
||||
|
@ -17,7 +16,7 @@ pub struct HTMLHtmlElement {
|
|||
}
|
||||
|
||||
impl HTMLHtmlElement {
|
||||
fn new_inherited(localName: LocalName, prefix: Option<DOMString>, document: &Document) -> HTMLHtmlElement {
|
||||
fn new_inherited(localName: LocalName, prefix: Option<Prefix>, document: &Document) -> HTMLHtmlElement {
|
||||
HTMLHtmlElement {
|
||||
htmlelement: HTMLElement::new_inherited(localName, prefix, document)
|
||||
}
|
||||
|
@ -25,7 +24,7 @@ impl HTMLHtmlElement {
|
|||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(localName: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> Root<HTMLHtmlElement> {
|
||||
Node::reflect_node(box HTMLHtmlElement::new_inherited(localName, prefix, document),
|
||||
document,
|
||||
|
|
|
@ -36,7 +36,7 @@ use dom::node::{Node, NodeDamage, UnbindContext, document_from_node, window_from
|
|||
use dom::virtualmethods::VirtualMethods;
|
||||
use dom::window::{ReflowReason, Window};
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
use ipc_channel::ipc;
|
||||
use js::jsapi::{JSAutoCompartment, JSContext, MutableHandleValue};
|
||||
use js::jsval::{NullValue, UndefinedValue};
|
||||
|
@ -241,7 +241,7 @@ impl HTMLIFrameElement {
|
|||
}
|
||||
|
||||
fn new_inherited(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> HTMLIFrameElement {
|
||||
HTMLIFrameElement {
|
||||
htmlelement: HTMLElement::new_inherited(local_name, prefix, document),
|
||||
|
@ -256,7 +256,7 @@ impl HTMLIFrameElement {
|
|||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> Root<HTMLIFrameElement> {
|
||||
Node::reflect_node(box HTMLIFrameElement::new_inherited(local_name, prefix, document),
|
||||
document,
|
||||
|
|
|
@ -35,7 +35,7 @@ use dom::virtualmethods::VirtualMethods;
|
|||
use dom::window::Window;
|
||||
use dom_struct::dom_struct;
|
||||
use euclid::point::Point2D;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
use ipc_channel::ipc;
|
||||
use ipc_channel::router::ROUTER;
|
||||
use net_traits::{FetchResponseListener, FetchMetadata, NetworkError, FetchResponseMsg};
|
||||
|
@ -368,7 +368,7 @@ impl HTMLImageElement {
|
|||
}
|
||||
}
|
||||
|
||||
fn new_inherited(local_name: LocalName, prefix: Option<DOMString>, document: &Document) -> HTMLImageElement {
|
||||
fn new_inherited(local_name: LocalName, prefix: Option<Prefix>, document: &Document) -> HTMLImageElement {
|
||||
HTMLImageElement {
|
||||
htmlelement: HTMLElement::new_inherited(local_name, prefix, document),
|
||||
current_request: DOMRefCell::new(ImageRequest {
|
||||
|
@ -394,7 +394,7 @@ impl HTMLImageElement {
|
|||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> Root<HTMLImageElement> {
|
||||
Node::reflect_node(box HTMLImageElement::new_inherited(local_name, prefix, document),
|
||||
document,
|
||||
|
|
|
@ -37,7 +37,7 @@ use dom::validation::Validatable;
|
|||
use dom::validitystate::ValidationFlags;
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
use ipc_channel::ipc::{self, IpcSender};
|
||||
use mime_guess;
|
||||
use net_traits::{CoreResourceMsg, IpcSend};
|
||||
|
@ -135,7 +135,7 @@ static DEFAULT_MAX_LENGTH: i32 = -1;
|
|||
static DEFAULT_MIN_LENGTH: i32 = -1;
|
||||
|
||||
impl HTMLInputElement {
|
||||
fn new_inherited(local_name: LocalName, prefix: Option<DOMString>, document: &Document) -> HTMLInputElement {
|
||||
fn new_inherited(local_name: LocalName, prefix: Option<Prefix>, document: &Document) -> HTMLInputElement {
|
||||
let chan = document.window().upcast::<GlobalScope>().constellation_chan().clone();
|
||||
HTMLInputElement {
|
||||
htmlelement:
|
||||
|
@ -163,7 +163,7 @@ impl HTMLInputElement {
|
|||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> Root<HTMLInputElement> {
|
||||
Node::reflect_node(box HTMLInputElement::new_inherited(local_name, prefix, document),
|
||||
document,
|
||||
|
|
|
@ -18,7 +18,7 @@ use dom::htmlformelement::{FormControl, FormControlElementHelpers, HTMLFormEleme
|
|||
use dom::node::{document_from_node, Node};
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
use style::attr::AttrValue;
|
||||
|
||||
#[dom_struct]
|
||||
|
@ -28,7 +28,7 @@ pub struct HTMLLabelElement {
|
|||
|
||||
impl HTMLLabelElement {
|
||||
fn new_inherited(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> HTMLLabelElement {
|
||||
HTMLLabelElement {
|
||||
htmlelement:
|
||||
|
@ -38,7 +38,7 @@ impl HTMLLabelElement {
|
|||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> Root<HTMLLabelElement> {
|
||||
Node::reflect_node(box HTMLLabelElement::new_inherited(local_name, prefix, document),
|
||||
document,
|
||||
|
|
|
@ -7,7 +7,6 @@ use dom::bindings::codegen::Bindings::HTMLLegendElementBinding::HTMLLegendElemen
|
|||
use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
|
||||
use dom::bindings::inheritance::Castable;
|
||||
use dom::bindings::js::{MutNullableJS, Root};
|
||||
use dom::bindings::str::DOMString;
|
||||
use dom::document::Document;
|
||||
use dom::element::Element;
|
||||
use dom::htmlelement::HTMLElement;
|
||||
|
@ -16,7 +15,7 @@ use dom::htmlformelement::{HTMLFormElement, FormControl};
|
|||
use dom::node::{Node, UnbindContext};
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
|
||||
#[dom_struct]
|
||||
pub struct HTMLLegendElement {
|
||||
|
@ -26,7 +25,7 @@ pub struct HTMLLegendElement {
|
|||
|
||||
impl HTMLLegendElement {
|
||||
fn new_inherited(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document)
|
||||
-> HTMLLegendElement {
|
||||
HTMLLegendElement {
|
||||
|
@ -37,7 +36,7 @@ impl HTMLLegendElement {
|
|||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document)
|
||||
-> Root<HTMLLegendElement> {
|
||||
Node::reflect_node(box HTMLLegendElement::new_inherited(local_name, prefix, document),
|
||||
|
|
|
@ -12,7 +12,7 @@ use dom::htmlelement::HTMLElement;
|
|||
use dom::node::Node;
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
use style::attr::AttrValue;
|
||||
|
||||
#[dom_struct]
|
||||
|
@ -21,7 +21,7 @@ pub struct HTMLLIElement {
|
|||
}
|
||||
|
||||
impl HTMLLIElement {
|
||||
fn new_inherited(local_name: LocalName, prefix: Option<DOMString>, document: &Document) -> HTMLLIElement {
|
||||
fn new_inherited(local_name: LocalName, prefix: Option<Prefix>, document: &Document) -> HTMLLIElement {
|
||||
HTMLLIElement {
|
||||
htmlelement: HTMLElement::new_inherited(local_name, prefix, document)
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ impl HTMLLIElement {
|
|||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> Root<HTMLLIElement> {
|
||||
Node::reflect_node(box HTMLLIElement::new_inherited(local_name, prefix, document),
|
||||
document,
|
||||
|
|
|
@ -22,7 +22,7 @@ use dom::node::{Node, UnbindContext, document_from_node, window_from_node};
|
|||
use dom::stylesheet::StyleSheet as DOMStyleSheet;
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
use net_traits::ReferrerPolicy;
|
||||
use script_layout_interface::message::Msg;
|
||||
use script_traits::{MozBrowserEvent, ScriptMsg as ConstellationMsg};
|
||||
|
@ -69,7 +69,7 @@ pub struct HTMLLinkElement {
|
|||
}
|
||||
|
||||
impl HTMLLinkElement {
|
||||
fn new_inherited(local_name: LocalName, prefix: Option<DOMString>, document: &Document,
|
||||
fn new_inherited(local_name: LocalName, prefix: Option<Prefix>, document: &Document,
|
||||
creator: ElementCreator) -> HTMLLinkElement {
|
||||
HTMLLinkElement {
|
||||
htmlelement: HTMLElement::new_inherited(local_name, prefix, document),
|
||||
|
@ -85,7 +85,7 @@ impl HTMLLinkElement {
|
|||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document,
|
||||
creator: ElementCreator) -> Root<HTMLLinkElement> {
|
||||
Node::reflect_node(box HTMLLinkElement::new_inherited(local_name, prefix, document, creator),
|
||||
|
|
|
@ -5,13 +5,12 @@
|
|||
use dom::bindings::codegen::Bindings::HTMLMapElementBinding;
|
||||
use dom::bindings::inheritance::Castable;
|
||||
use dom::bindings::js::Root;
|
||||
use dom::bindings::str::DOMString;
|
||||
use dom::document::Document;
|
||||
use dom::htmlareaelement::HTMLAreaElement;
|
||||
use dom::htmlelement::HTMLElement;
|
||||
use dom::node::Node;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
|
||||
#[dom_struct]
|
||||
pub struct HTMLMapElement {
|
||||
|
@ -20,7 +19,7 @@ pub struct HTMLMapElement {
|
|||
|
||||
impl HTMLMapElement {
|
||||
fn new_inherited(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> HTMLMapElement {
|
||||
HTMLMapElement {
|
||||
htmlelement: HTMLElement::new_inherited(local_name, prefix, document)
|
||||
|
@ -29,7 +28,7 @@ impl HTMLMapElement {
|
|||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> Root<HTMLMapElement> {
|
||||
Node::reflect_node(box HTMLMapElement::new_inherited(local_name, prefix, document),
|
||||
document,
|
||||
|
@ -42,4 +41,3 @@ impl HTMLMapElement {
|
|||
.filter_map(Root::downcast::<HTMLAreaElement>).collect()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ use dom::mediaerror::MediaError;
|
|||
use dom::node::{window_from_node, document_from_node, Node, UnbindContext};
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
use ipc_channel::ipc;
|
||||
use ipc_channel::router::ROUTER;
|
||||
use net_traits::{FetchResponseListener, FetchMetadata, Metadata, NetworkError};
|
||||
|
@ -227,7 +227,7 @@ pub struct HTMLMediaElement {
|
|||
|
||||
impl HTMLMediaElement {
|
||||
pub fn new_inherited(tag_name: LocalName,
|
||||
prefix: Option<DOMString>, document: &Document)
|
||||
prefix: Option<Prefix>, document: &Document)
|
||||
-> HTMLMediaElement {
|
||||
HTMLMediaElement {
|
||||
htmlelement:
|
||||
|
|
|
@ -18,7 +18,7 @@ use dom::htmlheadelement::HTMLHeadElement;
|
|||
use dom::node::{Node, UnbindContext, document_from_node, window_from_node};
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
use servo_config::prefs::PREFS;
|
||||
use std::ascii::AsciiExt;
|
||||
use std::sync::Arc;
|
||||
|
@ -39,7 +39,7 @@ pub struct HTMLMetaElement {
|
|||
|
||||
impl HTMLMetaElement {
|
||||
fn new_inherited(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> HTMLMetaElement {
|
||||
HTMLMetaElement {
|
||||
htmlelement: HTMLElement::new_inherited(local_name, prefix, document),
|
||||
|
@ -50,7 +50,7 @@ impl HTMLMetaElement {
|
|||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> Root<HTMLMetaElement> {
|
||||
Node::reflect_node(box HTMLMetaElement::new_inherited(local_name, prefix, document),
|
||||
document,
|
||||
|
|
|
@ -5,13 +5,12 @@
|
|||
use dom::bindings::codegen::Bindings::HTMLMeterElementBinding::{self, HTMLMeterElementMethods};
|
||||
use dom::bindings::inheritance::Castable;
|
||||
use dom::bindings::js::Root;
|
||||
use dom::bindings::str::DOMString;
|
||||
use dom::document::Document;
|
||||
use dom::htmlelement::HTMLElement;
|
||||
use dom::node::Node;
|
||||
use dom::nodelist::NodeList;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
|
||||
#[dom_struct]
|
||||
pub struct HTMLMeterElement {
|
||||
|
@ -20,7 +19,7 @@ pub struct HTMLMeterElement {
|
|||
|
||||
impl HTMLMeterElement {
|
||||
fn new_inherited(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> HTMLMeterElement {
|
||||
HTMLMeterElement {
|
||||
htmlelement: HTMLElement::new_inherited(local_name, prefix, document)
|
||||
|
@ -29,7 +28,7 @@ impl HTMLMeterElement {
|
|||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> Root<HTMLMeterElement> {
|
||||
Node::reflect_node(box HTMLMeterElement::new_inherited(local_name, prefix, document),
|
||||
document,
|
||||
|
|
|
@ -4,12 +4,11 @@
|
|||
|
||||
use dom::bindings::codegen::Bindings::HTMLModElementBinding;
|
||||
use dom::bindings::js::Root;
|
||||
use dom::bindings::str::DOMString;
|
||||
use dom::document::Document;
|
||||
use dom::htmlelement::HTMLElement;
|
||||
use dom::node::Node;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
|
||||
#[dom_struct]
|
||||
pub struct HTMLModElement {
|
||||
|
@ -18,7 +17,7 @@ pub struct HTMLModElement {
|
|||
|
||||
impl HTMLModElement {
|
||||
fn new_inherited(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> HTMLModElement {
|
||||
HTMLModElement {
|
||||
htmlelement:
|
||||
|
@ -28,7 +27,7 @@ impl HTMLModElement {
|
|||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> Root<HTMLModElement> {
|
||||
Node::reflect_node(box HTMLModElement::new_inherited(local_name, prefix, document),
|
||||
document,
|
||||
|
|
|
@ -18,7 +18,7 @@ use dom::validation::Validatable;
|
|||
use dom::validitystate::{ValidityState, ValidationFlags};
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
use net_traits::image::base::Image;
|
||||
use std::default::Default;
|
||||
use std::sync::Arc;
|
||||
|
@ -33,7 +33,7 @@ pub struct HTMLObjectElement {
|
|||
|
||||
impl HTMLObjectElement {
|
||||
fn new_inherited(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> HTMLObjectElement {
|
||||
HTMLObjectElement {
|
||||
htmlelement:
|
||||
|
@ -45,7 +45,7 @@ impl HTMLObjectElement {
|
|||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> Root<HTMLObjectElement> {
|
||||
Node::reflect_node(box HTMLObjectElement::new_inherited(local_name, prefix, document),
|
||||
document,
|
||||
|
|
|
@ -4,12 +4,11 @@
|
|||
|
||||
use dom::bindings::codegen::Bindings::HTMLOListElementBinding;
|
||||
use dom::bindings::js::Root;
|
||||
use dom::bindings::str::DOMString;
|
||||
use dom::document::Document;
|
||||
use dom::htmlelement::HTMLElement;
|
||||
use dom::node::Node;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
|
||||
#[dom_struct]
|
||||
pub struct HTMLOListElement {
|
||||
|
@ -18,7 +17,7 @@ pub struct HTMLOListElement {
|
|||
|
||||
impl HTMLOListElement {
|
||||
fn new_inherited(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> HTMLOListElement {
|
||||
HTMLOListElement {
|
||||
htmlelement: HTMLElement::new_inherited(local_name, prefix, document)
|
||||
|
@ -27,7 +26,7 @@ impl HTMLOListElement {
|
|||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> Root<HTMLOListElement> {
|
||||
Node::reflect_node(box HTMLOListElement::new_inherited(local_name, prefix, document),
|
||||
document,
|
||||
|
|
|
@ -7,7 +7,6 @@ use dom::bindings::codegen::Bindings::HTMLOptGroupElementBinding;
|
|||
use dom::bindings::codegen::Bindings::HTMLOptGroupElementBinding::HTMLOptGroupElementMethods;
|
||||
use dom::bindings::inheritance::Castable;
|
||||
use dom::bindings::js::Root;
|
||||
use dom::bindings::str::DOMString;
|
||||
use dom::document::Document;
|
||||
use dom::element::{AttributeMutation, Element};
|
||||
use dom::htmlelement::HTMLElement;
|
||||
|
@ -15,7 +14,7 @@ use dom::htmloptionelement::HTMLOptionElement;
|
|||
use dom::node::Node;
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
use style::element_state::*;
|
||||
|
||||
#[dom_struct]
|
||||
|
@ -25,7 +24,7 @@ pub struct HTMLOptGroupElement {
|
|||
|
||||
impl HTMLOptGroupElement {
|
||||
fn new_inherited(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> HTMLOptGroupElement {
|
||||
HTMLOptGroupElement {
|
||||
htmlelement:
|
||||
|
@ -36,7 +35,7 @@ impl HTMLOptGroupElement {
|
|||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> Root<HTMLOptGroupElement> {
|
||||
Node::reflect_node(box HTMLOptGroupElement::new_inherited(local_name, prefix, document),
|
||||
document,
|
||||
|
|
|
@ -23,7 +23,7 @@ use dom::node::{Node, UnbindContext};
|
|||
use dom::text::Text;
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
use std::cell::Cell;
|
||||
use style::element_state::*;
|
||||
use style::str::{split_html_space_chars, str_join};
|
||||
|
@ -41,7 +41,7 @@ pub struct HTMLOptionElement {
|
|||
|
||||
impl HTMLOptionElement {
|
||||
fn new_inherited(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> HTMLOptionElement {
|
||||
HTMLOptionElement {
|
||||
htmlelement:
|
||||
|
@ -54,7 +54,7 @@ impl HTMLOptionElement {
|
|||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> Root<HTMLOptionElement> {
|
||||
Node::reflect_node(box HTMLOptionElement::new_inherited(local_name, prefix, document),
|
||||
document,
|
||||
|
|
|
@ -7,7 +7,6 @@ use dom::bindings::codegen::Bindings::HTMLOutputElementBinding;
|
|||
use dom::bindings::codegen::Bindings::HTMLOutputElementBinding::HTMLOutputElementMethods;
|
||||
use dom::bindings::inheritance::Castable;
|
||||
use dom::bindings::js::{MutNullableJS, Root};
|
||||
use dom::bindings::str::DOMString;
|
||||
use dom::document::Document;
|
||||
use dom::element::{AttributeMutation, Element};
|
||||
use dom::htmlelement::HTMLElement;
|
||||
|
@ -17,7 +16,7 @@ use dom::nodelist::NodeList;
|
|||
use dom::validitystate::ValidityState;
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
|
||||
#[dom_struct]
|
||||
pub struct HTMLOutputElement {
|
||||
|
@ -27,7 +26,7 @@ pub struct HTMLOutputElement {
|
|||
|
||||
impl HTMLOutputElement {
|
||||
fn new_inherited(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> HTMLOutputElement {
|
||||
HTMLOutputElement {
|
||||
htmlelement:
|
||||
|
@ -38,7 +37,7 @@ impl HTMLOutputElement {
|
|||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> Root<HTMLOutputElement> {
|
||||
Node::reflect_node(box HTMLOutputElement::new_inherited(local_name, prefix, document),
|
||||
document,
|
||||
|
|
|
@ -4,12 +4,11 @@
|
|||
|
||||
use dom::bindings::codegen::Bindings::HTMLParagraphElementBinding;
|
||||
use dom::bindings::js::Root;
|
||||
use dom::bindings::str::DOMString;
|
||||
use dom::document::Document;
|
||||
use dom::htmlelement::HTMLElement;
|
||||
use dom::node::Node;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
|
||||
#[dom_struct]
|
||||
pub struct HTMLParagraphElement {
|
||||
|
@ -18,7 +17,7 @@ pub struct HTMLParagraphElement {
|
|||
|
||||
impl HTMLParagraphElement {
|
||||
fn new_inherited(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> HTMLParagraphElement {
|
||||
HTMLParagraphElement {
|
||||
htmlelement:
|
||||
|
@ -28,7 +27,7 @@ impl HTMLParagraphElement {
|
|||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> Root<HTMLParagraphElement> {
|
||||
Node::reflect_node(box HTMLParagraphElement::new_inherited(local_name, prefix, document),
|
||||
document,
|
||||
|
|
|
@ -4,12 +4,11 @@
|
|||
|
||||
use dom::bindings::codegen::Bindings::HTMLParamElementBinding;
|
||||
use dom::bindings::js::Root;
|
||||
use dom::bindings::str::DOMString;
|
||||
use dom::document::Document;
|
||||
use dom::htmlelement::HTMLElement;
|
||||
use dom::node::Node;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
|
||||
#[dom_struct]
|
||||
pub struct HTMLParamElement {
|
||||
|
@ -18,7 +17,7 @@ pub struct HTMLParamElement {
|
|||
|
||||
impl HTMLParamElement {
|
||||
fn new_inherited(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> HTMLParamElement {
|
||||
HTMLParamElement {
|
||||
htmlelement:
|
||||
|
@ -28,7 +27,7 @@ impl HTMLParamElement {
|
|||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> Root<HTMLParamElement> {
|
||||
Node::reflect_node(box HTMLParamElement::new_inherited(local_name, prefix, document),
|
||||
document,
|
||||
|
|
|
@ -4,12 +4,11 @@
|
|||
|
||||
use dom::bindings::codegen::Bindings::HTMLPreElementBinding;
|
||||
use dom::bindings::js::Root;
|
||||
use dom::bindings::str::DOMString;
|
||||
use dom::document::Document;
|
||||
use dom::htmlelement::HTMLElement;
|
||||
use dom::node::Node;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
|
||||
#[dom_struct]
|
||||
pub struct HTMLPreElement {
|
||||
|
@ -18,7 +17,7 @@ pub struct HTMLPreElement {
|
|||
|
||||
impl HTMLPreElement {
|
||||
fn new_inherited(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> HTMLPreElement {
|
||||
HTMLPreElement {
|
||||
htmlelement:
|
||||
|
@ -28,7 +27,7 @@ impl HTMLPreElement {
|
|||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> Root<HTMLPreElement> {
|
||||
Node::reflect_node(box HTMLPreElement::new_inherited(local_name, prefix, document),
|
||||
document,
|
||||
|
|
|
@ -5,13 +5,12 @@
|
|||
use dom::bindings::codegen::Bindings::HTMLProgressElementBinding::{self, HTMLProgressElementMethods};
|
||||
use dom::bindings::inheritance::Castable;
|
||||
use dom::bindings::js::Root;
|
||||
use dom::bindings::str::DOMString;
|
||||
use dom::document::Document;
|
||||
use dom::htmlelement::HTMLElement;
|
||||
use dom::node::Node;
|
||||
use dom::nodelist::NodeList;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
|
||||
#[dom_struct]
|
||||
pub struct HTMLProgressElement {
|
||||
|
@ -20,7 +19,7 @@ pub struct HTMLProgressElement {
|
|||
|
||||
impl HTMLProgressElement {
|
||||
fn new_inherited(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> HTMLProgressElement {
|
||||
HTMLProgressElement {
|
||||
htmlelement:
|
||||
|
@ -30,7 +29,7 @@ impl HTMLProgressElement {
|
|||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> Root<HTMLProgressElement> {
|
||||
Node::reflect_node(box HTMLProgressElement::new_inherited(local_name, prefix, document),
|
||||
document,
|
||||
|
|
|
@ -4,12 +4,11 @@
|
|||
|
||||
use dom::bindings::codegen::Bindings::HTMLQuoteElementBinding;
|
||||
use dom::bindings::js::Root;
|
||||
use dom::bindings::str::DOMString;
|
||||
use dom::document::Document;
|
||||
use dom::htmlelement::HTMLElement;
|
||||
use dom::node::Node;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
|
||||
#[dom_struct]
|
||||
pub struct HTMLQuoteElement {
|
||||
|
@ -18,7 +17,7 @@ pub struct HTMLQuoteElement {
|
|||
|
||||
impl HTMLQuoteElement {
|
||||
fn new_inherited(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> HTMLQuoteElement {
|
||||
HTMLQuoteElement {
|
||||
htmlelement:
|
||||
|
@ -28,7 +27,7 @@ impl HTMLQuoteElement {
|
|||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> Root<HTMLQuoteElement> {
|
||||
Node::reflect_node(box HTMLQuoteElement::new_inherited(local_name, prefix, document),
|
||||
document,
|
||||
|
|
|
@ -26,7 +26,7 @@ use dom::virtualmethods::VirtualMethods;
|
|||
use dom_struct::dom_struct;
|
||||
use encoding::label::encoding_from_whatwg_label;
|
||||
use encoding::types::{DecoderTrap, EncodingRef};
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
use ipc_channel::ipc;
|
||||
use ipc_channel::router::ROUTER;
|
||||
use js::jsval::UndefinedValue;
|
||||
|
@ -69,7 +69,7 @@ pub struct HTMLScriptElement {
|
|||
}
|
||||
|
||||
impl HTMLScriptElement {
|
||||
fn new_inherited(local_name: LocalName, prefix: Option<DOMString>, document: &Document,
|
||||
fn new_inherited(local_name: LocalName, prefix: Option<Prefix>, document: &Document,
|
||||
creator: ElementCreator) -> HTMLScriptElement {
|
||||
HTMLScriptElement {
|
||||
htmlelement:
|
||||
|
@ -83,7 +83,7 @@ impl HTMLScriptElement {
|
|||
}
|
||||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName, prefix: Option<DOMString>, document: &Document,
|
||||
pub fn new(local_name: LocalName, prefix: Option<Prefix>, document: &Document,
|
||||
creator: ElementCreator) -> Root<HTMLScriptElement> {
|
||||
Node::reflect_node(box HTMLScriptElement::new_inherited(local_name, prefix, document, creator),
|
||||
document,
|
||||
|
|
|
@ -31,7 +31,7 @@ use dom::validation::Validatable;
|
|||
use dom::validitystate::{ValidityState, ValidationFlags};
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
use std::default::Default;
|
||||
use std::iter;
|
||||
use style::attr::AttrValue;
|
||||
|
@ -69,7 +69,7 @@ static DEFAULT_SELECT_SIZE: u32 = 0;
|
|||
|
||||
impl HTMLSelectElement {
|
||||
fn new_inherited(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> HTMLSelectElement {
|
||||
HTMLSelectElement {
|
||||
htmlelement:
|
||||
|
@ -82,7 +82,7 @@ impl HTMLSelectElement {
|
|||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> Root<HTMLSelectElement> {
|
||||
Node::reflect_node(box HTMLSelectElement::new_inherited(local_name, prefix, document),
|
||||
document,
|
||||
|
|
|
@ -4,12 +4,11 @@
|
|||
|
||||
use dom::bindings::codegen::Bindings::HTMLSourceElementBinding;
|
||||
use dom::bindings::js::Root;
|
||||
use dom::bindings::str::DOMString;
|
||||
use dom::document::Document;
|
||||
use dom::htmlelement::HTMLElement;
|
||||
use dom::node::Node;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
|
||||
#[dom_struct]
|
||||
pub struct HTMLSourceElement {
|
||||
|
@ -18,7 +17,7 @@ pub struct HTMLSourceElement {
|
|||
|
||||
impl HTMLSourceElement {
|
||||
fn new_inherited(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> HTMLSourceElement {
|
||||
HTMLSourceElement {
|
||||
htmlelement:
|
||||
|
@ -28,7 +27,7 @@ impl HTMLSourceElement {
|
|||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> Root<HTMLSourceElement> {
|
||||
Node::reflect_node(box HTMLSourceElement::new_inherited(local_name, prefix, document),
|
||||
document,
|
||||
|
|
|
@ -4,12 +4,11 @@
|
|||
|
||||
use dom::bindings::codegen::Bindings::HTMLSpanElementBinding;
|
||||
use dom::bindings::js::Root;
|
||||
use dom::bindings::str::DOMString;
|
||||
use dom::document::Document;
|
||||
use dom::htmlelement::HTMLElement;
|
||||
use dom::node::Node;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
|
||||
#[dom_struct]
|
||||
pub struct HTMLSpanElement {
|
||||
|
@ -17,7 +16,7 @@ pub struct HTMLSpanElement {
|
|||
}
|
||||
|
||||
impl HTMLSpanElement {
|
||||
fn new_inherited(local_name: LocalName, prefix: Option<DOMString>, document: &Document) -> HTMLSpanElement {
|
||||
fn new_inherited(local_name: LocalName, prefix: Option<Prefix>, document: &Document) -> HTMLSpanElement {
|
||||
HTMLSpanElement {
|
||||
htmlelement: HTMLElement::new_inherited(local_name, prefix, document)
|
||||
}
|
||||
|
@ -25,7 +24,7 @@ impl HTMLSpanElement {
|
|||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> Root<HTMLSpanElement> {
|
||||
Node::reflect_node(box HTMLSpanElement::new_inherited(local_name, prefix, document),
|
||||
document,
|
||||
|
|
|
@ -9,7 +9,6 @@ use dom::bindings::codegen::Bindings::HTMLStyleElementBinding::HTMLStyleElementM
|
|||
use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
|
||||
use dom::bindings::inheritance::Castable;
|
||||
use dom::bindings::js::{MutNullableJS, Root};
|
||||
use dom::bindings::str::DOMString;
|
||||
use dom::cssstylesheet::CSSStyleSheet;
|
||||
use dom::document::Document;
|
||||
use dom::element::{Element, ElementCreator};
|
||||
|
@ -19,7 +18,7 @@ use dom::node::{ChildrenMutation, Node, UnbindContext, document_from_node, windo
|
|||
use dom::stylesheet::StyleSheet as DOMStyleSheet;
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
use net_traits::ReferrerPolicy;
|
||||
use script_layout_interface::message::Msg;
|
||||
use std::cell::Cell;
|
||||
|
@ -45,7 +44,7 @@ pub struct HTMLStyleElement {
|
|||
|
||||
impl HTMLStyleElement {
|
||||
fn new_inherited(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document,
|
||||
creator: ElementCreator) -> HTMLStyleElement {
|
||||
HTMLStyleElement {
|
||||
|
@ -62,7 +61,7 @@ impl HTMLStyleElement {
|
|||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document,
|
||||
creator: ElementCreator) -> Root<HTMLStyleElement> {
|
||||
Node::reflect_node(box HTMLStyleElement::new_inherited(local_name, prefix, document, creator),
|
||||
|
|
|
@ -4,12 +4,11 @@
|
|||
|
||||
use dom::bindings::codegen::Bindings::HTMLTableCaptionElementBinding;
|
||||
use dom::bindings::js::Root;
|
||||
use dom::bindings::str::DOMString;
|
||||
use dom::document::Document;
|
||||
use dom::htmlelement::HTMLElement;
|
||||
use dom::node::Node;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
|
||||
#[dom_struct]
|
||||
pub struct HTMLTableCaptionElement {
|
||||
|
@ -18,7 +17,7 @@ pub struct HTMLTableCaptionElement {
|
|||
|
||||
impl HTMLTableCaptionElement {
|
||||
fn new_inherited(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> HTMLTableCaptionElement {
|
||||
HTMLTableCaptionElement {
|
||||
htmlelement:
|
||||
|
@ -28,7 +27,7 @@ impl HTMLTableCaptionElement {
|
|||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> Root<HTMLTableCaptionElement> {
|
||||
Node::reflect_node(box HTMLTableCaptionElement::new_inherited(local_name, prefix, document),
|
||||
document,
|
||||
|
|
|
@ -15,7 +15,7 @@ use dom::htmltablerowelement::HTMLTableRowElement;
|
|||
use dom::node::Node;
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
use style::attr::{AttrValue, LengthOrPercentageOrAuto};
|
||||
|
||||
const DEFAULT_COLSPAN: u32 = 1;
|
||||
|
@ -28,7 +28,7 @@ pub struct HTMLTableCellElement {
|
|||
|
||||
impl HTMLTableCellElement {
|
||||
pub fn new_inherited(tag_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document)
|
||||
-> HTMLTableCellElement {
|
||||
HTMLTableCellElement {
|
||||
|
|
|
@ -4,12 +4,11 @@
|
|||
|
||||
use dom::bindings::codegen::Bindings::HTMLTableColElementBinding;
|
||||
use dom::bindings::js::Root;
|
||||
use dom::bindings::str::DOMString;
|
||||
use dom::document::Document;
|
||||
use dom::htmlelement::HTMLElement;
|
||||
use dom::node::Node;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
|
||||
#[dom_struct]
|
||||
pub struct HTMLTableColElement {
|
||||
|
@ -18,7 +17,7 @@ pub struct HTMLTableColElement {
|
|||
|
||||
impl HTMLTableColElement {
|
||||
fn new_inherited(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> HTMLTableColElement {
|
||||
HTMLTableColElement {
|
||||
htmlelement:
|
||||
|
@ -28,7 +27,7 @@ impl HTMLTableColElement {
|
|||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> Root<HTMLTableColElement> {
|
||||
Node::reflect_node(box HTMLTableColElement::new_inherited(local_name, prefix, document),
|
||||
document,
|
||||
|
|
|
@ -4,12 +4,11 @@
|
|||
|
||||
use dom::bindings::codegen::Bindings::HTMLTableDataCellElementBinding;
|
||||
use dom::bindings::js::Root;
|
||||
use dom::bindings::str::DOMString;
|
||||
use dom::document::Document;
|
||||
use dom::htmltablecellelement::HTMLTableCellElement;
|
||||
use dom::node::Node;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
|
||||
#[dom_struct]
|
||||
pub struct HTMLTableDataCellElement {
|
||||
|
@ -18,7 +17,7 @@ pub struct HTMLTableDataCellElement {
|
|||
|
||||
impl HTMLTableDataCellElement {
|
||||
fn new_inherited(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> HTMLTableDataCellElement {
|
||||
HTMLTableDataCellElement {
|
||||
htmltablecellelement:
|
||||
|
@ -27,7 +26,7 @@ impl HTMLTableDataCellElement {
|
|||
}
|
||||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName, prefix: Option<DOMString>, document: &Document)
|
||||
pub fn new(local_name: LocalName, prefix: Option<Prefix>, document: &Document)
|
||||
-> Root<HTMLTableDataCellElement> {
|
||||
Node::reflect_node(box HTMLTableDataCellElement::new_inherited(local_name,
|
||||
prefix,
|
||||
|
|
|
@ -23,7 +23,7 @@ use dom::htmltablesectionelement::HTMLTableSectionElement;
|
|||
use dom::node::{Node, document_from_node, window_from_node};
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
use std::cell::Cell;
|
||||
use style::attr::{AttrValue, LengthOrPercentageOrAuto, parse_unsigned_integer};
|
||||
|
||||
|
@ -50,7 +50,7 @@ impl CollectionFilter for TableRowFilter {
|
|||
}
|
||||
|
||||
impl HTMLTableElement {
|
||||
fn new_inherited(local_name: LocalName, prefix: Option<DOMString>, document: &Document)
|
||||
fn new_inherited(local_name: LocalName, prefix: Option<Prefix>, document: &Document)
|
||||
-> HTMLTableElement {
|
||||
HTMLTableElement {
|
||||
htmlelement: HTMLElement::new_inherited(local_name, prefix, document),
|
||||
|
@ -61,7 +61,7 @@ impl HTMLTableElement {
|
|||
}
|
||||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName, prefix: Option<DOMString>, document: &Document)
|
||||
pub fn new(local_name: LocalName, prefix: Option<Prefix>, document: &Document)
|
||||
-> Root<HTMLTableElement> {
|
||||
Node::reflect_node(box HTMLTableElement::new_inherited(local_name, prefix, document),
|
||||
document,
|
||||
|
|
|
@ -4,12 +4,11 @@
|
|||
|
||||
use dom::bindings::codegen::Bindings::HTMLTableHeaderCellElementBinding;
|
||||
use dom::bindings::js::Root;
|
||||
use dom::bindings::str::DOMString;
|
||||
use dom::document::Document;
|
||||
use dom::htmltablecellelement::HTMLTableCellElement;
|
||||
use dom::node::Node;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
|
||||
#[dom_struct]
|
||||
pub struct HTMLTableHeaderCellElement {
|
||||
|
@ -18,7 +17,7 @@ pub struct HTMLTableHeaderCellElement {
|
|||
|
||||
impl HTMLTableHeaderCellElement {
|
||||
fn new_inherited(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> HTMLTableHeaderCellElement {
|
||||
HTMLTableHeaderCellElement {
|
||||
htmltablecellelement:
|
||||
|
@ -28,7 +27,7 @@ impl HTMLTableHeaderCellElement {
|
|||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> Root<HTMLTableHeaderCellElement> {
|
||||
Node::reflect_node(box HTMLTableHeaderCellElement::new_inherited(local_name, prefix, document),
|
||||
document,
|
||||
|
|
|
@ -22,7 +22,7 @@ use dom::htmltablesectionelement::HTMLTableSectionElement;
|
|||
use dom::node::{Node, window_from_node};
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
use style::attr::AttrValue;
|
||||
|
||||
#[derive(JSTraceable)]
|
||||
|
@ -41,7 +41,7 @@ pub struct HTMLTableRowElement {
|
|||
}
|
||||
|
||||
impl HTMLTableRowElement {
|
||||
fn new_inherited(local_name: LocalName, prefix: Option<DOMString>, document: &Document)
|
||||
fn new_inherited(local_name: LocalName, prefix: Option<Prefix>, document: &Document)
|
||||
-> HTMLTableRowElement {
|
||||
HTMLTableRowElement {
|
||||
htmlelement: HTMLElement::new_inherited(local_name, prefix, document),
|
||||
|
@ -50,7 +50,7 @@ impl HTMLTableRowElement {
|
|||
}
|
||||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName, prefix: Option<DOMString>, document: &Document)
|
||||
pub fn new(local_name: LocalName, prefix: Option<Prefix>, document: &Document)
|
||||
-> Root<HTMLTableRowElement> {
|
||||
Node::reflect_node(box HTMLTableRowElement::new_inherited(local_name, prefix, document),
|
||||
document,
|
||||
|
|
|
@ -17,7 +17,7 @@ use dom::htmltablerowelement::HTMLTableRowElement;
|
|||
use dom::node::{Node, window_from_node};
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
use style::attr::AttrValue;
|
||||
|
||||
#[dom_struct]
|
||||
|
@ -26,7 +26,7 @@ pub struct HTMLTableSectionElement {
|
|||
}
|
||||
|
||||
impl HTMLTableSectionElement {
|
||||
fn new_inherited(local_name: LocalName, prefix: Option<DOMString>, document: &Document)
|
||||
fn new_inherited(local_name: LocalName, prefix: Option<Prefix>, document: &Document)
|
||||
-> HTMLTableSectionElement {
|
||||
HTMLTableSectionElement {
|
||||
htmlelement: HTMLElement::new_inherited(local_name, prefix, document),
|
||||
|
@ -34,7 +34,7 @@ impl HTMLTableSectionElement {
|
|||
}
|
||||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName, prefix: Option<DOMString>, document: &Document)
|
||||
pub fn new(local_name: LocalName, prefix: Option<Prefix>, document: &Document)
|
||||
-> Root<HTMLTableSectionElement> {
|
||||
Node::reflect_node(box HTMLTableSectionElement::new_inherited(local_name, prefix, document),
|
||||
document,
|
||||
|
|
|
@ -8,14 +8,13 @@ use dom::bindings::codegen::Bindings::HTMLTemplateElementBinding::HTMLTemplateEl
|
|||
use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
|
||||
use dom::bindings::inheritance::Castable;
|
||||
use dom::bindings::js::{MutNullableJS, Root};
|
||||
use dom::bindings::str::DOMString;
|
||||
use dom::document::Document;
|
||||
use dom::documentfragment::DocumentFragment;
|
||||
use dom::htmlelement::HTMLElement;
|
||||
use dom::node::{CloneChildrenFlag, Node, document_from_node};
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
|
||||
#[dom_struct]
|
||||
pub struct HTMLTemplateElement {
|
||||
|
@ -27,7 +26,7 @@ pub struct HTMLTemplateElement {
|
|||
|
||||
impl HTMLTemplateElement {
|
||||
fn new_inherited(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> HTMLTemplateElement {
|
||||
HTMLTemplateElement {
|
||||
htmlelement:
|
||||
|
@ -38,7 +37,7 @@ impl HTMLTemplateElement {
|
|||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> Root<HTMLTemplateElement> {
|
||||
Node::reflect_node(box HTMLTemplateElement::new_inherited(local_name, prefix, document),
|
||||
document,
|
||||
|
|
|
@ -26,7 +26,7 @@ use dom::nodelist::NodeList;
|
|||
use dom::validation::Validatable;
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
use ipc_channel::ipc::IpcSender;
|
||||
use script_traits::ScriptMsg as ConstellationMsg;
|
||||
use std::cell::Cell;
|
||||
|
@ -107,7 +107,7 @@ static DEFAULT_ROWS: u32 = 2;
|
|||
|
||||
impl HTMLTextAreaElement {
|
||||
fn new_inherited(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> HTMLTextAreaElement {
|
||||
let chan = document.window().upcast::<GlobalScope>().constellation_chan().clone();
|
||||
HTMLTextAreaElement {
|
||||
|
@ -124,7 +124,7 @@ impl HTMLTextAreaElement {
|
|||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> Root<HTMLTextAreaElement> {
|
||||
Node::reflect_node(box HTMLTextAreaElement::new_inherited(local_name, prefix, document),
|
||||
document,
|
||||
|
|
|
@ -10,7 +10,7 @@ use dom::document::Document;
|
|||
use dom::htmlelement::HTMLElement;
|
||||
use dom::node::Node;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
|
||||
#[dom_struct]
|
||||
pub struct HTMLTimeElement {
|
||||
|
@ -18,7 +18,7 @@ pub struct HTMLTimeElement {
|
|||
}
|
||||
|
||||
impl HTMLTimeElement {
|
||||
fn new_inherited(local_name: LocalName, prefix: Option<DOMString>, document: &Document) -> HTMLTimeElement {
|
||||
fn new_inherited(local_name: LocalName, prefix: Option<Prefix>, document: &Document) -> HTMLTimeElement {
|
||||
HTMLTimeElement {
|
||||
htmlelement: HTMLElement::new_inherited(local_name, prefix, document),
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ impl HTMLTimeElement {
|
|||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> Root<HTMLTimeElement> {
|
||||
Node::reflect_node(box HTMLTimeElement::new_inherited(local_name, prefix, document),
|
||||
document,
|
||||
|
|
|
@ -13,7 +13,7 @@ use dom::htmlelement::HTMLElement;
|
|||
use dom::node::{ChildrenMutation, Node};
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
|
||||
#[dom_struct]
|
||||
pub struct HTMLTitleElement {
|
||||
|
@ -21,7 +21,7 @@ pub struct HTMLTitleElement {
|
|||
}
|
||||
|
||||
impl HTMLTitleElement {
|
||||
fn new_inherited(local_name: LocalName, prefix: Option<DOMString>, document: &Document) -> HTMLTitleElement {
|
||||
fn new_inherited(local_name: LocalName, prefix: Option<Prefix>, document: &Document) -> HTMLTitleElement {
|
||||
HTMLTitleElement {
|
||||
htmlelement: HTMLElement::new_inherited(local_name, prefix, document)
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ impl HTMLTitleElement {
|
|||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> Root<HTMLTitleElement> {
|
||||
Node::reflect_node(box HTMLTitleElement::new_inherited(local_name, prefix, document),
|
||||
document,
|
||||
|
|
|
@ -4,12 +4,11 @@
|
|||
|
||||
use dom::bindings::codegen::Bindings::HTMLTrackElementBinding;
|
||||
use dom::bindings::js::Root;
|
||||
use dom::bindings::str::DOMString;
|
||||
use dom::document::Document;
|
||||
use dom::htmlelement::HTMLElement;
|
||||
use dom::node::Node;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
|
||||
#[dom_struct]
|
||||
pub struct HTMLTrackElement {
|
||||
|
@ -17,7 +16,7 @@ pub struct HTMLTrackElement {
|
|||
}
|
||||
|
||||
impl HTMLTrackElement {
|
||||
fn new_inherited(local_name: LocalName, prefix: Option<DOMString>, document: &Document) -> HTMLTrackElement {
|
||||
fn new_inherited(local_name: LocalName, prefix: Option<Prefix>, document: &Document) -> HTMLTrackElement {
|
||||
HTMLTrackElement {
|
||||
htmlelement: HTMLElement::new_inherited(local_name, prefix, document)
|
||||
}
|
||||
|
@ -25,7 +24,7 @@ impl HTMLTrackElement {
|
|||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> Root<HTMLTrackElement> {
|
||||
Node::reflect_node(box HTMLTrackElement::new_inherited(local_name, prefix, document),
|
||||
document,
|
||||
|
|
|
@ -4,12 +4,11 @@
|
|||
|
||||
use dom::bindings::codegen::Bindings::HTMLUListElementBinding;
|
||||
use dom::bindings::js::Root;
|
||||
use dom::bindings::str::DOMString;
|
||||
use dom::document::Document;
|
||||
use dom::htmlelement::HTMLElement;
|
||||
use dom::node::Node;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
|
||||
#[dom_struct]
|
||||
pub struct HTMLUListElement {
|
||||
|
@ -17,7 +16,7 @@ pub struct HTMLUListElement {
|
|||
}
|
||||
|
||||
impl HTMLUListElement {
|
||||
fn new_inherited(local_name: LocalName, prefix: Option<DOMString>, document: &Document) -> HTMLUListElement {
|
||||
fn new_inherited(local_name: LocalName, prefix: Option<Prefix>, document: &Document) -> HTMLUListElement {
|
||||
HTMLUListElement {
|
||||
htmlelement: HTMLElement::new_inherited(local_name, prefix, document)
|
||||
}
|
||||
|
@ -25,7 +24,7 @@ impl HTMLUListElement {
|
|||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> Root<HTMLUListElement> {
|
||||
Node::reflect_node(box HTMLUListElement::new_inherited(local_name, prefix, document),
|
||||
document,
|
||||
|
|
|
@ -4,12 +4,11 @@
|
|||
|
||||
use dom::bindings::codegen::Bindings::HTMLUnknownElementBinding;
|
||||
use dom::bindings::js::Root;
|
||||
use dom::bindings::str::DOMString;
|
||||
use dom::document::Document;
|
||||
use dom::htmlelement::HTMLElement;
|
||||
use dom::node::Node;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
|
||||
#[dom_struct]
|
||||
pub struct HTMLUnknownElement {
|
||||
|
@ -18,7 +17,7 @@ pub struct HTMLUnknownElement {
|
|||
|
||||
impl HTMLUnknownElement {
|
||||
fn new_inherited(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> HTMLUnknownElement {
|
||||
HTMLUnknownElement {
|
||||
htmlelement:
|
||||
|
@ -28,7 +27,7 @@ impl HTMLUnknownElement {
|
|||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> Root<HTMLUnknownElement> {
|
||||
Node::reflect_node(box HTMLUnknownElement::new_inherited(local_name, prefix, document),
|
||||
document,
|
||||
|
|
|
@ -4,12 +4,11 @@
|
|||
|
||||
use dom::bindings::codegen::Bindings::HTMLVideoElementBinding;
|
||||
use dom::bindings::js::Root;
|
||||
use dom::bindings::str::DOMString;
|
||||
use dom::document::Document;
|
||||
use dom::htmlmediaelement::HTMLMediaElement;
|
||||
use dom::node::Node;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
|
||||
#[dom_struct]
|
||||
pub struct HTMLVideoElement {
|
||||
|
@ -17,7 +16,7 @@ pub struct HTMLVideoElement {
|
|||
}
|
||||
|
||||
impl HTMLVideoElement {
|
||||
fn new_inherited(local_name: LocalName, prefix: Option<DOMString>, document: &Document) -> HTMLVideoElement {
|
||||
fn new_inherited(local_name: LocalName, prefix: Option<Prefix>, document: &Document) -> HTMLVideoElement {
|
||||
HTMLVideoElement {
|
||||
htmlmediaelement:
|
||||
HTMLMediaElement::new_inherited(local_name, prefix, document)
|
||||
|
@ -26,7 +25,7 @@ impl HTMLVideoElement {
|
|||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> Root<HTMLVideoElement> {
|
||||
Node::reflect_node(box HTMLVideoElement::new_inherited(local_name, prefix, document),
|
||||
document,
|
||||
|
|
|
@ -3,12 +3,11 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use dom::bindings::inheritance::Castable;
|
||||
use dom::bindings::str::DOMString;
|
||||
use dom::document::Document;
|
||||
use dom::element::Element;
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
use style::element_state::ElementState;
|
||||
|
||||
#[dom_struct]
|
||||
|
@ -18,7 +17,7 @@ pub struct SVGElement {
|
|||
|
||||
impl SVGElement {
|
||||
pub fn new_inherited_with_state(state: ElementState, tag_name: LocalName,
|
||||
prefix: Option<DOMString>, document: &Document)
|
||||
prefix: Option<Prefix>, document: &Document)
|
||||
-> SVGElement {
|
||||
SVGElement {
|
||||
element:
|
||||
|
|
|
@ -3,12 +3,11 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use dom::bindings::inheritance::Castable;
|
||||
use dom::bindings::str::DOMString;
|
||||
use dom::document::Document;
|
||||
use dom::svgelement::SVGElement;
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
use style::element_state::ElementState;
|
||||
|
||||
#[dom_struct]
|
||||
|
@ -17,13 +16,13 @@ pub struct SVGGraphicsElement {
|
|||
}
|
||||
|
||||
impl SVGGraphicsElement {
|
||||
pub fn new_inherited(tag_name: LocalName, prefix: Option<DOMString>,
|
||||
pub fn new_inherited(tag_name: LocalName, prefix: Option<Prefix>,
|
||||
document: &Document) -> SVGGraphicsElement {
|
||||
SVGGraphicsElement::new_inherited_with_state(ElementState::empty(), tag_name, prefix, document)
|
||||
}
|
||||
|
||||
pub fn new_inherited_with_state(state: ElementState, tag_name: LocalName,
|
||||
prefix: Option<DOMString>, document: &Document)
|
||||
prefix: Option<Prefix>, document: &Document)
|
||||
-> SVGGraphicsElement {
|
||||
SVGGraphicsElement {
|
||||
svgelement:
|
||||
|
|
|
@ -13,7 +13,7 @@ use dom::node::Node;
|
|||
use dom::svggraphicselement::SVGGraphicsElement;
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
use dom_struct::dom_struct;
|
||||
use html5ever_atoms::LocalName;
|
||||
use html5ever_atoms::{LocalName, Prefix};
|
||||
use script_layout_interface::SVGSVGData;
|
||||
use style::attr::AttrValue;
|
||||
|
||||
|
@ -27,7 +27,7 @@ pub struct SVGSVGElement {
|
|||
|
||||
impl SVGSVGElement {
|
||||
fn new_inherited(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> SVGSVGElement {
|
||||
SVGSVGElement {
|
||||
svggraphicselement:
|
||||
|
@ -37,7 +37,7 @@ impl SVGSVGElement {
|
|||
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new(local_name: LocalName,
|
||||
prefix: Option<DOMString>,
|
||||
prefix: Option<Prefix>,
|
||||
document: &Document) -> Root<SVGSVGElement> {
|
||||
Node::reflect_node(box SVGSVGElement::new_inherited(local_name, prefix, document),
|
||||
document,
|
||||
|
|
|
@ -31,10 +31,10 @@ macro_rules! sizeof_checker (
|
|||
// Update the sizes here
|
||||
sizeof_checker!(size_event_target, EventTarget, 40);
|
||||
sizeof_checker!(size_node, Node, 152);
|
||||
sizeof_checker!(size_element, Element, 320);
|
||||
sizeof_checker!(size_htmlelement, HTMLElement, 336);
|
||||
sizeof_checker!(size_div, HTMLDivElement, 336);
|
||||
sizeof_checker!(size_span, HTMLSpanElement, 336);
|
||||
sizeof_checker!(size_element, Element, 312);
|
||||
sizeof_checker!(size_htmlelement, HTMLElement, 328);
|
||||
sizeof_checker!(size_div, HTMLDivElement, 328);
|
||||
sizeof_checker!(size_span, HTMLSpanElement, 328);
|
||||
sizeof_checker!(size_text, Text, 184);
|
||||
sizeof_checker!(size_characterdata, CharacterData, 184);
|
||||
sizeof_checker!(size_servothreadsafelayoutnode, ServoThreadSafeLayoutNode, 16);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue