mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
commit
05acf41317
9 changed files with 2 additions and 63 deletions
|
@ -74,7 +74,6 @@ DOMInterfaces = {
|
|||
'HTMLLIElement': {},
|
||||
'HTMLLinkElement': {},
|
||||
'HTMLMapElement': {},
|
||||
'HTMLMainElement': {},
|
||||
'HTMLMediaElement': {},
|
||||
'HTMLMetaElement': {},
|
||||
'HTMLMeterElement': {},
|
||||
|
|
|
@ -127,8 +127,6 @@ generate_cacheable_wrapper_htmlelement!(HTMLLIElement, HTMLLIElementBinding::Wra
|
|||
|
||||
generate_cacheable_wrapper_htmlelement!(HTMLLinkElement, HTMLLinkElementBinding::Wrap)
|
||||
|
||||
generate_cacheable_wrapper_htmlelement!(HTMLMainElement, HTMLMainElementBinding::Wrap)
|
||||
|
||||
generate_cacheable_wrapper_htmlelement!(HTMLMapElement, HTMLMapElementBinding::Wrap)
|
||||
|
||||
generate_cacheable_wrapper_htmlelement!(HTMLMediaElement, HTMLMediaElementBinding::Wrap)
|
||||
|
|
|
@ -97,7 +97,6 @@ pub enum ElementTypeId {
|
|||
HTMLLegendElementTypeId,
|
||||
HTMLLinkElementTypeId,
|
||||
HTMLLIElementTypeId,
|
||||
HTMLMainElementTypeId,
|
||||
HTMLMapElementTypeId,
|
||||
HTMLMediaElementTypeId,
|
||||
HTMLMetaElementTypeId,
|
||||
|
|
|
@ -1,40 +0,0 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use dom::bindings::codegen::BindingDeclarations::HTMLMainElementBinding;
|
||||
use dom::bindings::codegen::InheritTypes::HTMLMainElementDerived;
|
||||
use dom::bindings::js::{JSRef, Temporary};
|
||||
use dom::document::Document;
|
||||
use dom::element::HTMLMainElementTypeId;
|
||||
use dom::eventtarget::{EventTarget, NodeTargetTypeId};
|
||||
use dom::htmlelement::HTMLElement;
|
||||
use dom::node::{Node, ElementNodeTypeId};
|
||||
use servo_util::str::DOMString;
|
||||
|
||||
#[deriving(Encodable)]
|
||||
pub struct HTMLMainElement {
|
||||
pub htmlelement: HTMLElement
|
||||
}
|
||||
|
||||
impl HTMLMainElementDerived for EventTarget {
|
||||
fn is_htmlmainelement(&self) -> bool {
|
||||
self.type_id == NodeTargetTypeId(ElementNodeTypeId(HTMLMainElementTypeId))
|
||||
}
|
||||
}
|
||||
|
||||
impl HTMLMainElement {
|
||||
pub fn new_inherited(localName: DOMString, document: &JSRef<Document>) -> HTMLMainElement {
|
||||
HTMLMainElement {
|
||||
htmlelement: HTMLElement::new_inherited(HTMLMainElementTypeId, localName, document)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(localName: DOMString, document: &JSRef<Document>) -> Temporary<HTMLMainElement> {
|
||||
let element = HTMLMainElement::new_inherited(localName, document);
|
||||
Node::reflect_node(box element, document, HTMLMainElementBinding::Wrap)
|
||||
}
|
||||
}
|
||||
|
||||
pub trait HTMLMainElementMethods {
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
// Proprietary.
|
||||
interface HTMLMainElement : HTMLElement {};
|
|
@ -229,7 +229,7 @@ pub fn build_element_from_tag(tag: DOMString, document: &JSRef<Document>) -> Tem
|
|||
handle_element!(document, tag, "legend", HTMLLegendElement);
|
||||
handle_element!(document, tag, "li", HTMLLIElement);
|
||||
handle_element!(document, tag, "link", HTMLLinkElement);
|
||||
handle_element!(document, tag, "main", HTMLMainElement);
|
||||
handle_element!(document, tag, "main", HTMLElement);
|
||||
handle_element!(document, tag, "map", HTMLMapElement);
|
||||
handle_element!(document, tag, "mark", HTMLElement);
|
||||
handle_element!(document, tag, "marquee", HTMLElement);
|
||||
|
|
|
@ -114,7 +114,6 @@ pub mod dom {
|
|||
pub mod htmllegendelement;
|
||||
pub mod htmllielement;
|
||||
pub mod htmllinkelement;
|
||||
pub mod htmlmainelement;
|
||||
pub mod htmlmapelement;
|
||||
pub mod htmlmediaelement;
|
||||
pub mod htmlmetaelement;
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
<html>
|
||||
<head>
|
||||
<script src="harness.js"></script>
|
||||
<main>
|
||||
<script>
|
||||
var main = document.getElementsByTagName("main")[0];
|
||||
is_a(main, HTMLMainElement);
|
||||
finish();
|
||||
</script>
|
|
@ -84,7 +84,7 @@
|
|||
create_element_and_check("legend", HTMLLegendElement);
|
||||
create_element_and_check("li", HTMLLIElement);
|
||||
create_element_and_check("link", HTMLLinkElement);
|
||||
create_element_and_check("main", HTMLMainElement);
|
||||
create_element_and_check("main", HTMLElement);
|
||||
create_element_and_check("map", HTMLMapElement);
|
||||
create_element_and_check("mark", HTMLElement);
|
||||
create_element_and_check("marquee", HTMLElement);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue