mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Update to string-cache 0.3
This commit is contained in:
parent
9fcc9d9d3f
commit
53b638c0e2
170 changed files with 1309 additions and 1050 deletions
|
@ -1660,7 +1660,10 @@ trait ObjectElement {
|
|||
impl<N> ObjectElement for N where N: ThreadSafeLayoutNode {
|
||||
fn has_object_data(&self) -> bool {
|
||||
let elem = self.as_element().unwrap();
|
||||
let type_and_data = (elem.get_attr(&ns!(), &atom!("type")), elem.get_attr(&ns!(), &atom!("data")));
|
||||
let type_and_data = (
|
||||
elem.get_attr(&ns!(), &local_name!("type")),
|
||||
elem.get_attr(&ns!(), &local_name!("data")),
|
||||
);
|
||||
match type_and_data {
|
||||
(None, Some(uri)) => is_image_data(uri),
|
||||
_ => false
|
||||
|
@ -1669,7 +1672,10 @@ impl<N> ObjectElement for N where N: ThreadSafeLayoutNode {
|
|||
|
||||
fn object_data(&self) -> Option<Url> {
|
||||
let elem = self.as_element().unwrap();
|
||||
let type_and_data = (elem.get_attr(&ns!(), &atom!("type")), elem.get_attr(&ns!(), &atom!("data")));
|
||||
let type_and_data = (
|
||||
elem.get_attr(&ns!(), &local_name!("type")),
|
||||
elem.get_attr(&ns!(), &local_name!("data")),
|
||||
);
|
||||
match type_and_data {
|
||||
(None, Some(uri)) if is_image_data(uri) => Url::parse(uri).ok(),
|
||||
_ => None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue