Bug 1322512 - force <audio controls> to have horizontal writing-mode, so that its control bar is never an orthogonal flow. r=dholbert
MozReview-Commit-ID: 4hLOYrBtiGc
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bugs/1322512-1-ref.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<audio controls></audio>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/bugs/1322512-1.html
@@ -0,0 +1,6 @@
+<!DOCTYPE HTML>
+<html>
+<body>
+<audio controls style="writing-mode: vertical-lr"></audio>
+</body>
+</html>
--- a/layout/reftests/bugs/reftest.list
+++ b/layout/reftests/bugs/reftest.list
@@ -1981,10 +1981,9 @@ fuzzy(2,40000) == 1316719-1a.html 131671
fuzzy(2,40000) == 1316719-1b.html 1316719-1-ref.html
fuzzy(2,40000) == 1316719-1c.html 1316719-1-ref.html
HTTP == 652991-1a.html 652991-1-ref.html
HTTP == 652991-1b.html 652991-1-ref.html
HTTP == 652991-2.html 652991-2-ref.html
HTTP == 652991-3.html 652991-3-ref.html
HTTP == 652991-4.html 652991-4-ref.html
-
-
+== 1322512-1.html 1322512-1-ref.html
--- a/layout/style/res/html.css
+++ b/layout/style/res/html.css
@@ -751,16 +751,23 @@ video > img:-moz-native-anonymous {
object-fit: inherit !important;
object-position: inherit !important;
}
audio:not([controls]) {
display: none;
}
+audio[controls] {
+ /* This ensures that intrinsic sizing can reliably shrinkwrap our
+ controls (which are also always horizontal) and produce a
+ reasonable intrinsic size from them. */
+ writing-mode: horizontal-tb !important;
+}
+
*|*::-moz-html-canvas-content {
display: block !important;
/* we want to be an absolute and fixed container */
transform: translate(0) !important;
}
video > .caption-box {
width: 100%;