mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00: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:
parent
617fc08783
commit
7d6ea83479
79 changed files with 173 additions and 231 deletions
|
@ -3,7 +3,6 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use dom::bindings::codegen::Bindings::HTMLVideoElementBinding;
|
||||
use dom::bindings::codegen::InheritTypes::HTMLMediaElementTypeId;
|
||||
use dom::bindings::js::Root;
|
||||
use dom::document::Document;
|
||||
use dom::htmlmediaelement::HTMLMediaElement;
|
||||
|
@ -19,7 +18,7 @@ impl HTMLVideoElement {
|
|||
fn new_inherited(localName: DOMString, prefix: Option<DOMString>, document: &Document) -> HTMLVideoElement {
|
||||
HTMLVideoElement {
|
||||
htmlmediaelement:
|
||||
HTMLMediaElement::new_inherited(HTMLMediaElementTypeId::HTMLVideoElement, localName, prefix, document)
|
||||
HTMLMediaElement::new_inherited(localName, prefix, document)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue