Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Gecko Bug 1565690] When inferring an aspect ratio from an image's width and height attribute, only honor it if we don't have the real image aspect-ratio. #17815

Merged
merged 1 commit into from Jul 13, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -10,8 +10,8 @@
}
</style>
<img src=broken width=100 height=125>
<img src="/images/green.png" width=100 height=125>
<img src="/images/green.png">
<img src="/images/green.png" width=100 height=125>
<script>
let t = async_test("Image width and height attributes are used to infer aspect-ratio");
function assert_ratio(img, expected) {
Expand All @@ -21,7 +21,7 @@
onload = t.step_func_done(function() {
let images = document.querySelectorAll("img");
assert_ratio(images[0], 0.8);
assert_ratio(images[1], 0.8);
assert_ratio(images[2], 2.0); // 2.0 is the original aspect ratio of green.png
assert_ratio(images[1], 2.0); // Loaded image's aspect ratio, at least by default, overrides width / height ratio.
});
</script>