mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-03 14:28:39 +09:00
Issue #1619 - Add Vertical Writing Testcase
Ensures aspect ratio numerator and denominator aren't swapped in vertical writing modes. https://bugzilla.mozilla.org/show_bug.cgi?id=1548768
This commit is contained in:
parent
777b3cc622
commit
217374ebf6
2 changed files with 57 additions and 20 deletions
|
|
@ -0,0 +1,57 @@
|
|||
<!doctype html>
|
||||
<title>Frame width and height attributes as they apply in a vertical writing mode</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<style>
|
||||
#horiz
|
||||
{
|
||||
writing-mode: horizontal-tb;
|
||||
display: inline-block;
|
||||
}
|
||||
#vert
|
||||
{
|
||||
writing-mode: vertical-rl;
|
||||
display: inline-block;
|
||||
}
|
||||
object
|
||||
{
|
||||
border: 1px solid red;
|
||||
margin: 5px;
|
||||
}
|
||||
</style>
|
||||
<div id="horiz">
|
||||
<object data="/images/green.png" width=300></object>
|
||||
<object data="/images/green.png" height=50></object>
|
||||
</div>
|
||||
<div id="vert">
|
||||
<object data="/images/green.png" width=300></object>
|
||||
<object data="/images/green.png" height=50></object>
|
||||
</div>
|
||||
<script>
|
||||
let t = async_test("Frame width and height attributes as they apply in a vertical writing mode");
|
||||
function assert_dimensions(obj, expectedX, expectedY) {
|
||||
assert_equals(getComputedStyle(obj).width, expectedX);
|
||||
assert_equals(getComputedStyle(obj).height, expectedY);
|
||||
}
|
||||
t.step(function() {
|
||||
var obj = document.createElement('object');
|
||||
obj.width = 133;
|
||||
obj.data = '/images/blue.png';
|
||||
document.getElementById('horiz').appendChild(obj);
|
||||
|
||||
obj = document.createElement('object');
|
||||
obj.width = 133;
|
||||
obj.data = '/images/blue.png';
|
||||
document.getElementById('vert').appendChild(obj);
|
||||
});
|
||||
|
||||
onload = t.step_func_done(function() {
|
||||
let objects = document.querySelectorAll("object");
|
||||
assert_dimensions(objects[0], '300px', '150px');
|
||||
assert_dimensions(objects[1], '100px', '50px');
|
||||
assert_dimensions(objects[2], '133px', '106px');
|
||||
assert_dimensions(objects[3], '300px', '150px');
|
||||
assert_dimensions(objects[4], '100px', '50px');
|
||||
assert_dimensions(objects[5], '133px', '106px');
|
||||
});
|
||||
</script>
|
||||
Loading…
Add table
Add a link
Reference in a new issue