Make writing-mode affect computed display

If a box has a different writing-mode than its containing block, and has a specified display of inline, change the computed display to inline-block.
Also adds the second manual testcase from #15754 as a WPT to assert that the computed display does in fact change.
This commit is contained in:
Benjamin Dahse 2017-03-17 21:41:42 +01:00
parent 0a0fb61b48
commit 8db0fcaa29
4 changed files with 46 additions and 0 deletions

View file

@ -11142,6 +11142,12 @@
{}
]
],
"css/writing-mode_change_display.html": [
[
"/_mozilla/css/writing-mode_change_display.html",
{}
]
],
"mozilla/DOMParser.html": [
[
"/_mozilla/mozilla/DOMParser.html",
@ -24145,6 +24151,10 @@
"b16bf3e07cb3c45f7d630ca35bae1012d38d1b6b",
"support"
],
"css/writing-mode_change_display.html": [
"9ac1f9756a4cd44196242beb80621b9bc8cbe2ff",
"testharness"
],
"mozilla/2x2.png": [
"c67d3f646e86413722833d2308a9bfc793a916bf",
"support"

View file

@ -0,0 +1 @@
prefs: [layout.writing-mode.enabled:true]

View file

@ -0,0 +1,20 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>writing-mode test</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
</head>
<body>
<div>
<span style="writing-mode: vertical-rl; border: 20px solid green">Text</span>
</div>
<script>
test(function() {
assert_equals(getComputedStyle(document.querySelector("span")).display, "inline-block");
}, "The span's `display` should change from `inline` to `inline-block`, because of its writing-mode.");
</script>
</body>
</html>