Skip to content

Commit

Permalink
correct currentSrc function
Browse files Browse the repository at this point in the history
  • Loading branch information
nupurbaghel committed Sep 1, 2018
1 parent 577830d commit d7cb68c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 65 deletions.
4 changes: 2 additions & 2 deletions components/script/dom/htmlimageelement.rs
Expand Up @@ -1147,9 +1147,9 @@ impl HTMLImageElementMethods for HTMLImageElement {

// https://html.spec.whatwg.org/multipage/#dom-img-currentsrc
fn CurrentSrc(&self) -> DOMString {
let ref url = self.current_request.borrow().source_url;
let ref url = self.current_request.borrow().parsed_url;
match *url {
Some(ref url) => url.clone(),
Some(ref url) => DOMString::from_string(url.clone().into_string()),
None => DOMString::from(""),
}
}
Expand Down
@@ -1,26 +1,5 @@
[adoption.html]
type: testharness
[img (src only)]
expected: FAIL

[img (src only), parent is picture]
expected: FAIL

[img (src only), previous sibling is source]
expected: FAIL

[img (srcset 1 cand)]
expected: FAIL

[img (srcset 1 cand), parent is picture]
expected: FAIL

[img (srcset 1 cand), previous sibling is source]
expected: FAIL

[adopt a cloned img in template]
expected: FAIL

[adoption is from appendChild]
expected: FAIL

@@ -1,69 +1,27 @@
[viewport-change.html]
type: testharness
expected: TIMEOUT
[img (src only) broken image, onload, narrow]
expected: FAIL

[img (src only) valid image, onload, narrow]
expected: FAIL

[img (srcset 1 cand) broken image, onload, narrow]
expected: FAIL

[img (srcset 1 cand) valid image, onload, narrow]
expected: FAIL

[picture: source (max-width:500px) broken image, img broken image, onload, narrow]
expected: FAIL

[picture: source (max-width:500px) broken image, img valid image, onload, narrow]
expected: FAIL

[picture: source (max-width:500px) broken image, img valid image, resize to wide]
expected: TIMEOUT

[picture: source (max-width:500px) valid image, img broken image, onload, narrow]
expected: FAIL

[picture: source (max-width:500px) valid image, img valid image, onload, narrow]
expected: FAIL

[picture: source (max-width:500px) valid image, img valid image, resize to wide]
expected: TIMEOUT

[picture: same URL in source (max-width:500px) and img, onload, narrow]
expected: FAIL

[img (src only) broken image, onload, wide]
expected: FAIL

[img (src only) valid image, onload, wide]
expected: FAIL

[img (srcset 1 cand) broken image, onload, wide]
expected: FAIL

[img (srcset 1 cand) valid image, onload, wide]
expected: FAIL

[picture: source (max-width:500px) broken image, img broken image, onload, wide]
expected: FAIL

[picture: source (max-width:500px) broken image, img valid image, onload, wide]
expected: FAIL

[picture: source (max-width:500px) valid image, img broken image, onload, wide]
expected: FAIL

[picture: source (max-width:500px) valid image, img broken image, resize to narrow]
expected: TIMEOUT

[picture: source (max-width:500px) valid image, img valid image, onload, wide]
expected: FAIL

[picture: source (max-width:500px) valid image, img valid image, resize to narrow]
expected: TIMEOUT

[picture: same URL in source (max-width:500px) and img, onload, wide]
expected: FAIL

0 comments on commit d7cb68c

Please sign in to comment.