Dactyloidae/testing/web-platform/tests/css-backgrounds/background-size-cover-003-ref.html
Andy be1f68f39e Issue #1620 - Use Intrinsic Aspect Ratio for Images
https://bugzilla.mozilla.org/show_bug.cgi?id=1547231
https://bugzilla.mozilla.org/show_bug.cgi?id=1559094
https://bugzilla.mozilla.org/show_bug.cgi?id=1633434
https://bugzilla.mozilla.org/show_bug.cgi?id=1565690
https://bugzilla.mozilla.org/show_bug.cgi?id=1602047

Make use of Aspect Ratios in Image frames before Images are loaded.
- Check for width and height HTML properties and create a ratio with them.
- Overwrite HTML size values with actual image dimensions on load.
- Collapse any frames with srcless images.

Comments:
dom/html/nsGenericHTMLElement.cpp:1483
layout/generic/nsImageFrame.cpp:289
2020-08-14 08:59:33 +08:00

21 lines
320 B
HTML

<!doctype html>
<title>CSS Test Reference</title>
<style>
body { margin: 0 }
.first {
width: 100px;
height: 50px;
background: lime;
}
.space {
height: 50px;
}
.second {
width: 100px;
height: 100px;
background: lime;
}
</style>
<div class="first"></div>
<div class="space"></div>
<div class="second"></div>