mirror of
https://github.com/servo/servo
synced 2026-04-30 19:37:43 +02:00
Explicitly customise flags of new nodes where needed
Given codegen now generates the various TypeId enums, it seems pointless to still have to write their respective values in every DOM struct inheriting from Node just to set the initial IS_IN_DOC flag in Document and IN_ENABLED_STATE in form controls.
This commit is contained in:
@@ -7,7 +7,7 @@ use dom::attr::Attr;
|
||||
use dom::bindings::codegen::Bindings::HTMLCollectionBinding::HTMLCollectionMethods;
|
||||
use dom::bindings::codegen::Bindings::HTMLTableSectionElementBinding::{self, HTMLTableSectionElementMethods};
|
||||
use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
|
||||
use dom::bindings::codegen::InheritTypes::{ElementCast, HTMLElementCast, HTMLElementTypeId};
|
||||
use dom::bindings::codegen::InheritTypes::{ElementCast, HTMLElementCast};
|
||||
use dom::bindings::codegen::InheritTypes::{HTMLTableRowElementDerived, NodeCast};
|
||||
use dom::bindings::error::Error;
|
||||
use dom::bindings::error::{ErrorResult, Fallible};
|
||||
@@ -33,10 +33,7 @@ impl HTMLTableSectionElement {
|
||||
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: &Document)
|
||||
-> HTMLTableSectionElement {
|
||||
HTMLTableSectionElement {
|
||||
htmlelement: HTMLElement::new_inherited(HTMLElementTypeId::HTMLTableSectionElement,
|
||||
localName,
|
||||
prefix,
|
||||
document),
|
||||
htmlelement: HTMLElement::new_inherited(localName, prefix, document),
|
||||
background_color: Cell::new(None),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user