mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Use string-cache's Namespace type
This commit is contained in:
parent
6429750b33
commit
d50114c41d
27 changed files with 126 additions and 183 deletions
|
@ -20,7 +20,6 @@ use dom::virtualmethods::VirtualMethods;
|
|||
|
||||
use servo_net::image_cache_task;
|
||||
use servo_net::image_cache_task::ImageCacheTask;
|
||||
use servo_util::namespace::Null;
|
||||
use servo_util::str::DOMString;
|
||||
use string_cache::Atom;
|
||||
|
||||
|
@ -63,8 +62,8 @@ impl<'a> ProcessDataURL for JSRef<'a, HTMLObjectElement> {
|
|||
let elem: JSRef<Element> = ElementCast::from_ref(*self);
|
||||
|
||||
// TODO: support other values
|
||||
match (elem.get_attribute(Null, "type").map(|x| x.root().Value()),
|
||||
elem.get_attribute(Null, "data").map(|x| x.root().Value())) {
|
||||
match (elem.get_attribute(ns!(""), "type").map(|x| x.root().Value()),
|
||||
elem.get_attribute(ns!(""), "data").map(|x| x.root().Value())) {
|
||||
(None, Some(uri)) => {
|
||||
if is_image_data(uri.as_slice()) {
|
||||
let data_url = Url::parse(uri.as_slice()).unwrap();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue