Introduce ElementCSSInlineStyle for SVGElement

This commit is contained in:
CYBAI 2020-06-04 21:37:29 +09:00
parent ea491b4117
commit c561a3eb0e
4 changed files with 49 additions and 2 deletions

View file

@ -52,6 +52,7 @@ use crate::dom::htmltextareaelement::HTMLTextAreaElement;
use crate::dom::htmltitleelement::HTMLTitleElement;
use crate::dom::htmlvideoelement::HTMLVideoElement;
use crate::dom::node::{BindContext, ChildrenMutation, CloneChildrenFlag, Node, UnbindContext};
use crate::dom::svgelement::SVGElement;
use crate::dom::svgsvgelement::SVGSVGElement;
use html5ever::LocalName;
use style::attr::AttrValue;
@ -269,6 +270,9 @@ pub fn vtable_for(node: &Node) -> &dyn VirtualMethods {
NodeTypeId::Element(ElementTypeId::SVGElement(SVGElementTypeId::SVGGraphicsElement(
SVGGraphicsElementTypeId::SVGSVGElement,
))) => node.downcast::<SVGSVGElement>().unwrap() as &dyn VirtualMethods,
NodeTypeId::Element(ElementTypeId::SVGElement(SVGElementTypeId::SVGElement)) => {
node.downcast::<SVGElement>().unwrap() as &dyn VirtualMethods
},
NodeTypeId::Element(ElementTypeId::Element) => {
node.downcast::<Element>().unwrap() as &dyn VirtualMethods
},