Bug 1582530 - Fix remaining cases that were relying on blockification. r=dao,dholbert
authorTim Nguyen <ntim.bugs@gmail.com>
Sat, 28 Sep 2019 00:20:32 +0000
changeset 495479 72a8d8c20180a068fd37f0bbf4619963486b0755
parent 495478 b768fb9e49838e06f4705ec249d59b7f1c236a50
child 495480 985e7a586265c3b74b695849812c1d658eb2e135
push id114134
push userccoroiu@mozilla.com
push dateMon, 30 Sep 2019 09:57:15 +0000
treeherdermozilla-inbound@b19e0c207cfd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdao, dholbert
bugs1582530
milestone71.0a1
first release with
nightly linux32
72a8d8c20180 / 71.0a1 / 20190928094605 / files
nightly linux64
72a8d8c20180 / 71.0a1 / 20190928094605 / files
nightly mac
72a8d8c20180 / 71.0a1 / 20190928094605 / files
nightly win32
72a8d8c20180 / 71.0a1 / 20190928094605 / files
nightly win64
72a8d8c20180 / 71.0a1 / 20190928094605 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1582530 - Fix remaining cases that were relying on blockification. r=dao,dholbert Differential Revision: https://phabricator.services.mozilla.com/D46676
browser/themes/shared/autocomplete.inc.css
browser/themes/shared/preferences/containers.css
browser/themes/shared/tabs.inc.css
dom/xul/crashtests/253479-2.xul
js/xpconnect/tests/chrome/test_bug726949.xul
layout/base/crashtests/336999-1.xul
layout/base/crashtests/344064-1-inner.xhtml
layout/base/crashtests/360339-1.xul
layout/base/crashtests/360339-2.xul
layout/base/crashtests/457362-1.xhtml
layout/base/tests/chrome/dialog_with_positioning_window.xul
layout/generic/crashtests/322780-1.xul
layout/generic/crashtests/331284-1.xhtml
layout/generic/crashtests/382745-1.xhtml
layout/generic/crashtests/442860-1.xul
layout/style/res/ua.css
layout/xul/crashtests/131008-1.xul
layout/xul/crashtests/137216-1.xul
layout/xul/crashtests/1379332-1.xul
layout/xul/crashtests/1379332-2.xul
layout/xul/crashtests/336962-1.xul
layout/xul/crashtests/384105-1-inner.xul
layout/xul/test/test_bug398982-1.xul
layout/xul/test/test_bug398982-2.xul
layout/xul/tree/crashtests/380217-1.xul
layout/xul/tree/crashtests/391178-2.xul
widget/crashtests/380359-1.xhtml
--- a/browser/themes/shared/autocomplete.inc.css
+++ b/browser/themes/shared/autocomplete.inc.css
@@ -43,16 +43,17 @@
 #PopupAutoComplete > richlistbox > richlistitem > .two-line-wrapper {
   box-sizing: border-box;
   display: flex;
   flex-direction: row;
   margin: 0;
 }
 
 #PopupAutoComplete > richlistbox > richlistitem > .two-line-wrapper > .ac-site-icon {
+  display: block;
   margin-inline-start: auto;
   margin-inline-end: 4px;
 }
 
 #PopupAutoComplete > richlistbox > richlistitem > .two-line-wrapper > .labels-wrapper {
   /* The text should flex while the icon should not */
   flex: 1;
   /* width/min-width are needed to get the text-overflow: ellipsis to work for the children */
--- a/browser/themes/shared/preferences/containers.css
+++ b/browser/themes/shared/preferences/containers.css
@@ -10,25 +10,21 @@
   --preference-active-color: #858585;
 }
 
 #name {
   -moz-box-flex: 1;
 }
 
 .radio-buttons {
-  display: flex;
+  -moz-box-orient: horizontal;
   margin-inline-start: 0.35rem;
 }
 
 .radio-buttons > radio {
-  flex: auto;
-  display: flex;
-  align-items: center;
-  justify-content: center;
   -moz-user-select: none;
   outline: 2px solid transparent;
   outline-offset: 4px;
   -moz-outline-radius: 100%;
   min-block-size: 24px;
   min-inline-size: 24px;
   border-radius: 50%;
   padding: 2px;
--- a/browser/themes/shared/tabs.inc.css
+++ b/browser/themes/shared/tabs.inc.css
@@ -578,25 +578,21 @@
 .tabbrowser-tab:hover > .tab-stack > .tab-background > .tab-line[multiselected]:not([selected=true]) {
   opacity: 0.5;
 }
 
 /* Pinned tabs */
 
 /* Pinned tab separators need position: absolute when positioned (during overflow). */
 #tabbrowser-tabs[positionpinnedtabs] > .tabbrowser-arrowscrollbox > .tabbrowser-tab[pinned]::after {
+  display: block;
   position: absolute;
   top: 0;
   bottom: 0;
-  right: 0;
-}
-
-#tabbrowser-tabs[positionpinnedtabs] > .tabbrowser-arrowscrollbox > .tabbrowser-tab[pinned]:-moz-locale-dir(rtl)::after {
-  right: unset;
-  left: 0;
+  inset-inline-end: 0;
 }
 
 #tabbrowser-tabs[positionpinnedtabs] > .tabbrowser-arrowscrollbox > .tabbrowser-tab[pinned] > .tab-stack {
   border-inline-end: 1px solid transparent;
 }
 
 .tabbrowser-tab:-moz-any([image], [pinned]) > .tab-stack > .tab-content[attention]:not([selected="true"]),
 .tabbrowser-tab > .tab-stack > .tab-content[pinned][titlechanged]:not([selected="true"]) {
--- a/dom/xul/crashtests/253479-2.xul
+++ b/dom/xul/crashtests/253479-2.xul
@@ -1,4 +1,4 @@
 <?xml version="1.0"?>
 <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-  <x style="position:fixed;"/>
-</window>
\ No newline at end of file
+  <x style="position:fixed; display: block;"/>
+</window>
--- a/js/xpconnect/tests/chrome/test_bug726949.xul
+++ b/js/xpconnect/tests/chrome/test_bug726949.xul
@@ -1,16 +1,17 @@
 <?xml version="1.0"?>
 <?xml-stylesheet type="text/css" href="chrome://global/skin"?>
 <?xml-stylesheet type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"?>
 <!--
 https://bugzilla.mozilla.org/show_bug.cgi?id=726949
 -->
 <window title="Mozilla Bug 726949"
-        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+        style="display: block;">
   <script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
 
   <!-- test results are displayed in the html:body -->
   <body xmlns="http://www.w3.org/1999/xhtml">
   <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=726949"
      target="_blank">Mozilla Bug 726949</a>
   </body>
 
--- a/layout/base/crashtests/336999-1.xul
+++ b/layout/base/crashtests/336999-1.xul
@@ -6,21 +6,19 @@ function boom()
 {
   document.getElementById("xxx").style.position = "fixed";
   document.documentElement.removeAttribute("class");
 }
 
 window.addEventListener("load", function(){setTimeout(boom, 30)}, 0);
 
 </script>
-	
 
-  <hbox id="xxx" style="position: absolute;">
+  <hbox id="xxx" style="position: absolute; display: block;">
     <label value="X" />
     <menulist>
       <menupopup>
         <menuitem label="Y" />
       </menupopup>
     </menulist>
   </hbox>
 
-
 </window>
--- a/layout/base/crashtests/344064-1-inner.xhtml
+++ b/layout/base/crashtests/344064-1-inner.xhtml
@@ -5,9 +5,9 @@
 function removestyles(){
   var x=document.getElementById('x');
   x.removeAttribute('style');
 }
 
 setTimeout(removestyles,400);
 
 </script>
-<div><xul:editor id="x" style="float: left;"></xul:editor></div></html>
\ No newline at end of file
+<div><xul:editor id="x" style="display: block; float: left;"></xul:editor></div></html>
--- a/layout/base/crashtests/360339-1.xul
+++ b/layout/base/crashtests/360339-1.xul
@@ -1,16 +1,23 @@
 <?xml version="1.0" ?>
 <?xml-stylesheet href="chrome://global/skin/" type="text/css" ?>
 
 <window xmlns:html="http://www.w3.org/1999/xhtml"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
 <html:style>
 * { float: right; }
+*:not(style) {
+  /* At the time this testcase was added, the above `float` styling would
+     have automatically forced "display:block" for these elements, so we
+     should preserve that styling to preserve the integrity of the crashtest
+     since blockification behavior for -moz-box is changing. */
+  display: block;
+}
 </html:style>
 
   <menulist>
     <menupopup id="ping">
     </menupopup>
   </menulist>
 
 </window>
--- a/layout/base/crashtests/360339-2.xul
+++ b/layout/base/crashtests/360339-2.xul
@@ -2,16 +2,24 @@
 <?xml-stylesheet href="chrome://global/skin/" type="text/css" ?>
 
 <window xmlns:html="http://www.w3.org/1999/xhtml"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
 <html:style>
 * { float: right; }
 #ping { float: none; }
+
+*:not(#ping):not(style) {
+  /* At the time this testcase was added, the above `float` styling would
+     have automatically forced "display:block" for these elements, so we
+     should preserve that styling to preserve the integrity of the crashtest
+     since blockification behavior for -moz-box is changing. */
+  display: block;
+}
 </html:style>
 
 <hbox>
   <menulist>
     <menupopup id="ping">
       <menuitem label="1"/>
     </menupopup>
   </menulist>
--- a/layout/base/crashtests/457362-1.xhtml
+++ b/layout/base/crashtests/457362-1.xhtml
@@ -1,9 +1,9 @@
 <html xmlns="http://www.w3.org/1999/xhtml" style="filter: url('#b');">
 
 <head></head>
 
 <body onload="document.getElementById('a').style.position = 'relative';">
-<hbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" style="float: left;" id="a"><treecols id="b"/></hbox>
+<hbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" style="display: block; float: left;" id="a"><treecols id="b"/></hbox>
 </body>
 
 </html>
--- a/layout/base/tests/chrome/dialog_with_positioning_window.xul
+++ b/layout/base/tests/chrome/dialog_with_positioning_window.xul
@@ -1,16 +1,16 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
 <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         onload="setTimeout(runTest, 0)">
   <vbox>
     <text value="powered by example.com" style="padding: 16px;"/>
   </vbox>
-  <hbox id="t" style="position: fixed; right: 16px; bottom: 16px;">
+  <hbox id="t" style="display: block; position: fixed; right: 16px; bottom: 16px;">
     <button label="OK"/>
   </hbox>
 <script><![CDATA[
 var SimpleTest = window.arguments[0].SimpleTest;
 var SpecialPowers = window.arguments[0].SpecialPowers;
 var is = window.arguments[0].is;
 var ok = window.arguments[0].ok;
 
--- a/layout/generic/crashtests/322780-1.xul
+++ b/layout/generic/crashtests/322780-1.xul
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
   <label>
-    <foopy style="float:left;" />
+    <foopy style="display: block; float:left;" />
   </label>
 </window>
--- a/layout/generic/crashtests/331284-1.xhtml
+++ b/layout/generic/crashtests/331284-1.xhtml
@@ -1,13 +1,13 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
 </head>
 
 <body>
   <hbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-    <ttt style="float: right">
+    <ttt style="display: block; float: right;">
       <img src="../../../testing/crashtest/images/animfish.gif" xmlns="http://www.w3.org/1999/xhtml" />
     </ttt>
   </hbox>
 </body>
 
 </html>
--- a/layout/generic/crashtests/382745-1.xhtml
+++ b/layout/generic/crashtests/382745-1.xhtml
@@ -1,10 +1,10 @@
 <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
 <tree/>
-<tree style="-moz-binding:url(382745-1-binding.xml#randomxbl); position: fixed;">
+<tree style="-moz-binding:url(382745-1-binding.xml#randomxbl); display: block; position: fixed;">
   <treecols>
     <treecol style="-moz-binding:url(382745-1-binding.xml#randomxbl);"/>
   </treecols>
 </tree>
 
-</window>
\ No newline at end of file
+</window>
--- a/layout/generic/crashtests/442860-1.xul
+++ b/layout/generic/crashtests/442860-1.xul
@@ -1,1 +1,1 @@
-<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"><hbox style="display: block; column-count: 15;"><scrollbar height="656119391073809204" style="position: fixed; -moz-appearance: tooltip;"/></hbox></window>
+<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"><hbox style="display: block; column-count: 15;"><scrollbar height="656119391073809204" style="display: block; position: fixed; -moz-appearance: tooltip;"/></hbox></window>
--- a/layout/style/res/ua.css
+++ b/layout/style/res/ua.css
@@ -339,16 +339,24 @@
   max-width: none !important;
   min-height: 0 !important;
   max-height: none !important;
   box-sizing: border-box !important;
   object-fit: contain;
   transform: none !important;
 }
 
+xul|*:fullscreen:not(:root):not([hidden="true"]) {
+  /* The position: fixed; property above used to force the computed display
+   * value to block. It is no longer the case now, so we manually set it here to
+   * maintain the old behaviour. We should probably not do this, but we don't
+   * fullscreen XUL element that frequently either. */
+  display: block;
+}
+
 /* Selectors here should match the check in
  * nsViewportFrame.cpp:ShouldInTopLayerForFullscreen() */
 *|*:fullscreen:not(:root):not(:-moz-browser-frame) {
   -moz-top-layer: top !important;
 }
 
 *|*::backdrop {
   -moz-top-layer: top !important;
--- a/layout/xul/crashtests/131008-1.xul
+++ b/layout/xul/crashtests/131008-1.xul
@@ -1,11 +1,11 @@
 <?xml-stylesheet href="chrome://global/skin" type="text/css"?>
 
 <window xmlns:html="http://www.w3.org/1999/xhtml"
 	xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
 	xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
 	id="MainWindow"
 	title="IWindow Test">
-<div style="position:absolute">abc</div>
+<div style="display: block; position:absolute">abc</div>
 
 
-</window>
\ No newline at end of file
+</window>
--- a/layout/xul/crashtests/137216-1.xul
+++ b/layout/xul/crashtests/137216-1.xul
@@ -1,4 +1,4 @@
 <?xml version="1.0"?>
 <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-	<iframe style="position:absolute;"/>
-</window>
\ No newline at end of file
+	<iframe style="position:absolute; display: block;"/>
+</window>
--- a/layout/xul/crashtests/1379332-1.xul
+++ b/layout/xul/crashtests/1379332-1.xul
@@ -1,9 +1,9 @@
 <?xml version="1.0"?>
 <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
   <hbox style="visibility: collapse; position: relative">
     <textbox>
-      <hbox style="position: absolute; width: 10px; height: 10px">
+      <hbox style="position: absolute; display: block; width: 10px; height: 10px">
       </hbox>
     </textbox>
   </hbox>
 </window>
--- a/layout/xul/crashtests/1379332-2.xul
+++ b/layout/xul/crashtests/1379332-2.xul
@@ -1,9 +1,9 @@
 <?xml version="1.0"?>
 <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
   <hbox style="position: relative;visibility: collapse;">
     <hbox style="padding:5px; border: 5px solid black">
-      <hbox style="position: absolute; width: 10px; height: 10px">
+      <hbox style="position: absolute; display: block; width: 10px; height: 10px">
       </hbox>
     </hbox>
   </hbox>
 </window>
--- a/layout/xul/crashtests/336962-1.xul
+++ b/layout/xul/crashtests/336962-1.xul
@@ -1,17 +1,18 @@
 <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
 <script>
 
-function init() { 
-  document.getElementById("foopy").style.position = "absolute";   
+function init() {
+  document.getElementById("foopy").style.display = "block";
+  document.getElementById("foopy").style.position = "absolute";
 }
 
 window.addEventListener("load", init, 0);
 
 </script>
 
 
 <box id="foopy" />
-       
+
 
 </window>
--- a/layout/xul/crashtests/384105-1-inner.xul
+++ b/layout/xul/crashtests/384105-1-inner.xul
@@ -1,21 +1,21 @@
 <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 <script id="script" xmlns="http://www.w3.org/1999/xhtml">
 function doe(){
 document.getElementById('a').removeAttribute('style');
 }
 setTimeout(doe,100);
 </script>
-<box id="a" style="position: absolute;">
+<box id="a" style="position: absolute; display: block;">
   <menuitem sizetopopup="always">
-    <menupopup style="position: absolute;"/>
+    <menupopup style="position: absolute; display: block;"/>
   </menuitem>
 
-  <box style="position: fixed;">
+  <box style="position: fixed; display: block;">
     <tree>
       <treecol>
         <treecol/>
       </treecol>
     </tree>
   </box>
 </box>
-</window>
\ No newline at end of file
+</window>
--- a/layout/xul/test/test_bug398982-1.xul
+++ b/layout/xul/test/test_bug398982-1.xul
@@ -1,14 +1,14 @@
 <?xml version="1.0"?>
 <?xml-stylesheet href="chrome://global/skin" type="text/css"?>
 <?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
 <menuitem xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
           xmlns:html="http://www.w3.org/1999/xhtml"
-          style="position: absolute; ">
+          style="position: absolute; display: block;">
 <!--
 https://bugzilla.mozilla.org/show_bug.cgi?id=398982
 -->
   <script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
 
 <tooltip type="zzz">
 <treecols/>
 </tooltip>
--- a/layout/xul/test/test_bug398982-2.xul
+++ b/layout/xul/test/test_bug398982-2.xul
@@ -4,17 +4,17 @@
 <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         xmlns:html="http://www.w3.org/1999/xhtml"
         title="Test for Bug 398982">
 <!--
 https://bugzilla.mozilla.org/show_bug.cgi?id=398982
 -->
   <script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
 
-<popupgroup style="position: absolute; ">
+<popupgroup style="position: absolute; display: block;">
 <tooltip type="zzz">
 <treecols/>
 </tooltip>
 
 <script xmlns="http://www.w3.org/1999/xhtml" class="testbody" type="application/javascript">
 <![CDATA[
 function doe() {
   document.getElementsByTagName('popupgroup')[0].removeAttribute('style');
--- a/layout/xul/tree/crashtests/380217-1.xul
+++ b/layout/xul/tree/crashtests/380217-1.xul
@@ -1,16 +1,23 @@
 <?xml version="1.0"?>
 <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
 <window xmlns:html="http://www.w3.org/1999/xhtml"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         onload="document.documentElement.style.content = '\'a\'';">
-        
+
 <html:style>
 * { position: fixed; }
+*:not(style) {
+  /* At the time this testcase was added, the above `float` styling would
+     have automatically forced "display:block" for these elements, so we
+     should preserve that styling to preserve the integrity of the crashtest
+     since blockification behavior for -moz-box is changing. */
+  display: block;
+}
 </html:style>
 
 <tree rows="6">
   <treecols>
       <treecol id="firstname" label="First Name" primary="true"/>
   </treecols>
   <treechildren>
     <treeitem>
--- a/layout/xul/tree/crashtests/391178-2.xul
+++ b/layout/xul/tree/crashtests/391178-2.xul
@@ -1,17 +1,17 @@
 <?xml-stylesheet href="chrome://browser/skin/" type="text/css"?>
 <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml" class="reftest-wait">
 
-<tree id="a" style="position: fixed;">
-  <box style=" display: -moz-box; position: fixed;">
+<tree id="a" style="display: block; position: fixed;">
+  <box style=" display: block; position: fixed;">
     <treecol style=" display: -moz-box;"/>
   </box>
-  <box style="position: fixed;">
-    <treechildren style="display: -moz-box; position: absolute;"/>
+  <box style="display: block; position: fixed;">
+    <treechildren style="display: block; position: absolute;"/>
   </box>
 </tree>
 
 <script xmlns="http://www.w3.org/1999/xhtml">
 function removestyles(){
   document.getElementById('a').removeAttribute('style');
   document.documentElement.removeAttribute("class");
 }
--- a/widget/crashtests/380359-1.xhtml
+++ b/widget/crashtests/380359-1.xhtml
@@ -1,8 +1,8 @@
 <html xmlns="http://www.w3.org/1999/xhtml"
       xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 <body>
 
-<xul:hbox style="position: fixed; -moz-appearance: checkbox;" />
+<xul:hbox style="display: block; position: fixed; -moz-appearance: checkbox;" />
 
 </body>
 </html>