mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
add SVGElement, SVGGraphicsElement interfaces and SVGSVGElement element
This commit is contained in:
parent
318b23ed00
commit
9876020c22
13 changed files with 355 additions and 13 deletions
|
@ -7,6 +7,8 @@ use dom::bindings::inheritance::Castable;
|
|||
use dom::bindings::inheritance::ElementTypeId;
|
||||
use dom::bindings::inheritance::HTMLElementTypeId;
|
||||
use dom::bindings::inheritance::NodeTypeId;
|
||||
use dom::bindings::inheritance::SVGElementTypeId;
|
||||
use dom::bindings::inheritance::SVGGraphicsElementTypeId;
|
||||
use dom::bindings::str::DOMString;
|
||||
use dom::document::Document;
|
||||
use dom::element::{AttributeMutation, Element};
|
||||
|
@ -47,6 +49,7 @@ use dom::htmltemplateelement::HTMLTemplateElement;
|
|||
use dom::htmltextareaelement::HTMLTextAreaElement;
|
||||
use dom::htmltitleelement::HTMLTitleElement;
|
||||
use dom::node::{ChildrenMutation, CloneChildrenFlag, Node, UnbindContext};
|
||||
use dom::svgsvgelement::SVGSVGElement;
|
||||
use string_cache::Atom;
|
||||
use style::attr::AttrValue;
|
||||
|
||||
|
@ -231,6 +234,11 @@ pub fn vtable_for(node: &Node) -> &VirtualMethods {
|
|||
NodeTypeId::Element(ElementTypeId::HTMLElement(HTMLElementTypeId::HTMLTitleElement)) => {
|
||||
node.downcast::<HTMLTitleElement>().unwrap() as &VirtualMethods
|
||||
}
|
||||
NodeTypeId::Element(ElementTypeId::SVGElement(SVGElementTypeId::SVGGraphicsElement(
|
||||
SVGGraphicsElementTypeId::SVGSVGElement
|
||||
))) => {
|
||||
node.downcast::<SVGSVGElement>().unwrap() as &VirtualMethods
|
||||
}
|
||||
NodeTypeId::Element(ElementTypeId::Element) => {
|
||||
node.downcast::<Element>().unwrap() as &VirtualMethods
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue