mirror of
https://github.com/servo/servo.git
synced 2025-08-08 15:05:35 +01:00
Support the parsing of image/svg+xml elements (#31318)
* Support the parsing of image/svg+xml elements * Update WPT test expectations
This commit is contained in:
parent
d00312eb08
commit
123854faee
17 changed files with 4 additions and 320 deletions
|
@ -10,7 +10,7 @@ use crate::document_loader::DocumentLoader;
|
|||
use crate::dom::bindings::codegen::Bindings::DOMParserBinding;
|
||||
use crate::dom::bindings::codegen::Bindings::DOMParserBinding::DOMParserMethods;
|
||||
use crate::dom::bindings::codegen::Bindings::DOMParserBinding::SupportedType::{
|
||||
Application_xhtml_xml, Application_xml, Text_html, Text_xml,
|
||||
Application_xhtml_xml, Application_xml, Image_svg_xml, Text_html, Text_xml,
|
||||
};
|
||||
use crate::dom::bindings::codegen::Bindings::DocumentBinding::DocumentReadyState;
|
||||
use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
|
||||
|
@ -84,7 +84,7 @@ impl DOMParserMethods for DOMParser {
|
|||
document.set_ready_state(DocumentReadyState::Complete);
|
||||
Ok(document)
|
||||
},
|
||||
Text_xml | Application_xml | Application_xhtml_xml => {
|
||||
Text_xml | Application_xml | Application_xhtml_xml | Image_svg_xml => {
|
||||
let document = Document::new(
|
||||
&self.window,
|
||||
HasBrowsingContext::No,
|
||||
|
|
|
@ -10,8 +10,8 @@ enum SupportedType {
|
|||
"text/html",
|
||||
"text/xml",
|
||||
"application/xml",
|
||||
"application/xhtml+xml"/*,
|
||||
"image/svg+xml"*/
|
||||
"application/xhtml+xml",
|
||||
"image/svg+xml"
|
||||
};
|
||||
|
||||
[Exposed=Window]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue