Generate HTMLDocument bindings. Introduce invariant into generated bindings that associated DOM classes are named the same as their interfaces, so Event and Event_ need to be swapped.

This commit is contained in:
Josh Matthews 2013-07-27 14:28:05 -04:00
parent ad8fa8b3d7
commit 5546f2105b
18 changed files with 584 additions and 155 deletions

View file

@ -8,7 +8,7 @@ use dom::bindings::node;
use dom::bindings::utils::WrapperCache;
use dom::bindings;
use dom::characterdata::CharacterData;
use dom::document::Document;
use dom::document::AbstractDocument;
use dom::element::{Element, ElementTypeId, HTMLImageElement, HTMLImageElementTypeId, HTMLIframeElementTypeId, HTMLIframeElement};
use dom::element::{HTMLStyleElementTypeId};
@ -80,7 +80,7 @@ pub struct Node<View> {
prev_sibling: Option<AbstractNode<View>>,
/// The document that this node belongs to.
owner_doc: Option<@mut Document>,
owner_doc: Option<AbstractDocument>,
/// Layout information. Only the layout task may touch this data.
priv layout_data: Option<@mut ()>
@ -433,7 +433,7 @@ impl Node<ScriptView> {
node
}
pub fn add_to_doc(&mut self, doc: @mut Document) {
pub fn add_to_doc(&mut self, doc: AbstractDocument) {
self.owner_doc = Some(doc);
let mut node = self.first_child;
while node.is_some() {