Bug 1586444 - Avoid styling scrollbar part children of object elements with vertical-align. r=emilio
authorCameron McCormack <cam@mcc.id.au>
Sun, 17 Nov 2019 23:17:34 +0000
changeset 502359 44a3e5f050de4aff4e3080532319595185f1db3a
parent 502358 a1849f162702113fc3e66790787e93bc55d46eb0
child 502360 a78c989f5538874bf4c5a0c98b199441ed6921f6
push id114172
push userdluca@mozilla.com
push dateTue, 19 Nov 2019 11:31:10 +0000
treeherdermozilla-inbound@b5c5ba07d3db [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersemilio
bugs1586444
milestone72.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1586444 - Avoid styling scrollbar part children of object elements with vertical-align. r=emilio Differential Revision: https://phabricator.services.mozilla.com/D53124
layout/style/crashtests/1586444.html
layout/style/crashtests/crashtests.list
toolkit/content/minimal-xul.css
new file mode 100644
--- /dev/null
+++ b/layout/style/crashtests/1586444.html
@@ -0,0 +1,15 @@
+<style>
+#a {
+  overflow: auto auto;
+  display: -webkit-box;
+}
+</style>
+<script>
+window.onload = () => {
+  a.align = "ABSMIDDLE"
+  document.documentElement.style.display="none"
+  document.documentElement.getBoundingClientRect()
+  document.documentElement.style.display=""
+}
+</script>
+<object id="a">
--- a/layout/style/crashtests/crashtests.list
+++ b/layout/style/crashtests/crashtests.list
@@ -307,8 +307,9 @@ pref(layout.css.resizeobserver.enabled,t
 load 1562361.html
 load 1566684.html
 load 1579788.html
 load 1580307.html
 load 1581579.html
 skip-if(release_or_beta) pref(dom.paintWorklet.enabled,true) pref(dom.worklet.enabled,true) load 1593766.html # bug 1581896
 pref(layout.css.motion-path.enabled,true) load 1594949.html
 pref(layout.css.motion-path.enabled,true) pref(layout.css.individual-transform.enabled,true) load 1594960.html
+load 1586444.html
--- a/toolkit/content/minimal-xul.css
+++ b/toolkit/content/minimal-xul.css
@@ -68,16 +68,21 @@ scrollcorner, resizer, scrollbar, scroll
 
   /* The initial value of justify-items is `legacy`, which makes it depend on
    * the parent style.
    *
    * Reset it to something else.
    */
   justify-items: start;
 
+  /* Avoid `object > *` rule in html.css from setting a useless, non-initial
+   * value of vertical-align.
+   */
+  vertical-align: initial !important;
+
   /* Duplicate the rules from the '*' rule above, which were clobbered by the
    * 'all: initial' declaration.
    *
    * The other zero specificity rules above are on :root, and scrollbar parts
    * cannot match :root, so no need to duplicate them.
    */
   -moz-user-focus: ignore;
   -moz-user-select: none;