auto merge of #2544 : saneyuki/servo/rm_main, r=jdm

Fix #2541
This commit is contained in:
bors-servo 2014-06-01 15:49:23 -04:00
commit 05acf41317
9 changed files with 2 additions and 63 deletions

View file

@ -74,7 +74,6 @@ DOMInterfaces = {
'HTMLLIElement': {},
'HTMLLinkElement': {},
'HTMLMapElement': {},
'HTMLMainElement': {},
'HTMLMediaElement': {},
'HTMLMetaElement': {},
'HTMLMeterElement': {},

View file

@ -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)

View file

@ -97,7 +97,6 @@ pub enum ElementTypeId {
HTMLLegendElementTypeId,
HTMLLinkElementTypeId,
HTMLLIElementTypeId,
HTMLMainElementTypeId,
HTMLMapElementTypeId,
HTMLMediaElementTypeId,
HTMLMetaElementTypeId,

View file

@ -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 {
}

View file

@ -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 {};

View file

@ -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);

View file

@ -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;

View file

@ -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>

View file

@ -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);