mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Switch to data_url::mime for document content type (#36522)
The data_url Mime parser has a more conformant behavior in most cases, including dealing with charsets. Testing: wpt expectations with new passes are updated. Signed-off-by: webbeef <me@webbeef.org>
This commit is contained in:
parent
32d59cfff4
commit
98884a5081
10 changed files with 112 additions and 178 deletions
|
@ -92,10 +92,12 @@ impl DOMImplementationMethods<crate::DomTypeHolder> for DOMImplementation {
|
|||
let namespace = namespace_from_domstring(maybe_namespace.to_owned());
|
||||
|
||||
let content_type = match namespace {
|
||||
ns!(html) => "application/xhtml+xml".parse().unwrap(),
|
||||
ns!(svg) => mime::IMAGE_SVG,
|
||||
_ => "application/xml".parse().unwrap(),
|
||||
};
|
||||
ns!(html) => "application/xhtml+xml",
|
||||
ns!(svg) => "image/svg+xml",
|
||||
_ => "application/xml",
|
||||
}
|
||||
.parse()
|
||||
.unwrap();
|
||||
|
||||
// Step 1.
|
||||
let doc = XMLDocument::new(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue