Bug 1417701: Remove some useless rules and importance declarations in ua.css. r?heycam draft
authorEmilio Cobos Álvarez <emilio@crisal.io>
Thu, 16 Nov 2017 19:13:41 +0100
changeset 699393 903775d2a3b5face8ef6aff5b847129a800238fd
parent 699392 094e81521e2102be3ae3914a21f4ee6ba3ba5b81
child 740617 45674a9389ecdb10c9c5ad31bcf5bbdc3dcdac73
push id89555
push userbmo:emilio@crisal.io
push dateFri, 17 Nov 2017 04:05:26 +0000
reviewersheycam
bugs1417701
milestone59.0a1
Bug 1417701: Remove some useless rules and importance declarations in ua.css. r?heycam There's no need to set anon boxes reset properties to their defaults. Also, there's no need to use !important, since they have no other rules. There's ::-moz-pagecontent which is tricky, because it can be affected by @page rules, but only margin properties are allowed on those. MozReview-Commit-ID: Gtl9jTLYyXA
layout/style/res/ua.css
--- a/layout/style/res/ua.css
+++ b/layout/style/res/ua.css
@@ -7,34 +7,32 @@
 
 /* magic -- some of these rules are important to keep pages from overriding
             them
 */
 
 /* Tables */
 
 *|*::-moz-table {
-  display: table !important;
+  display: table;
   box-sizing: border-box; /* XXX do we really want this? */
 }
 
 *|*::-moz-inline-table {
-  display: inline-table !important;
+  display: inline-table;
   box-sizing: border-box; /* XXX do we really want this? */
 }
 
 *|*::-moz-table-wrapper {
   /* The inherited properties here need to be safe to have on both the
    * table and the table wrapper, generally because code ignores them
    * for the table. */
-  display: inherit !important; /* table or inline-table */
-  -moz-top-layer: inherit !important;
-  margin: inherit ! important;
-  padding: 0 ! important;
-  border: none ! important;
+  display: inherit; /* table or inline-table */
+  -moz-top-layer: inherit;
+  margin: inherit;
   float: inherit;
   clear: inherit;
   position: inherit;
   top: inherit;
   right: inherit;
   bottom: inherit;
   left: inherit;
   z-index: inherit;
@@ -55,53 +53,53 @@
   grid-column-start: inherit;
   grid-column-end: inherit;
   grid-row-start: inherit;
   grid-row-end: inherit;
   order: inherit;
 }
 
 *|*::-moz-table-row {
-  display: table-row !important;
+  display: table-row;
 }
 
 /* The ::-moz-table-column pseudo-element is for extra columns at the end
    of a table. */
 *|*::-moz-table-column {
-  display: table-column !important;
+  display: table-column;
   /* Make sure anonymous columns don't interfere with hit testing.  Basically,
    * they should pretend as much as possible to not exist (since in the spec
    * they do not exist).
    *
    * Please make sure to not reintroduce
    * https://bugzilla.mozilla.org/show_bug.cgi?id=1403293 if you change this
    * bit!
    */
-  visibility: hidden !important;
+  visibility: hidden;
 }
 
 *|*::-moz-table-column-group {
-  display: table-column-group !important;
+  display: table-column-group;
   /* Make sure anonymous colgroups don't interfere with hit testing.  Basically,
    * they should pretend as much as possible to not exist (since in the spec
    * they do not exist).
    *
    * Please make sure to not reintroduce
    * https://bugzilla.mozilla.org/show_bug.cgi?id=1403293 if you change this
    * bit!
    */
-  visibility: hidden !important;
+  visibility: hidden;
 }
 
 *|*::-moz-table-row-group {
-  display: table-row-group !important;
+  display: table-row-group;
 }
 
 *|*::-moz-table-cell {
-  display: table-cell !important;
+  display: table-cell;
   white-space: inherit;
 }
 
 /* Ruby */
 *|*::-moz-ruby {
   display: ruby;
   unicode-bidi: isolate;
 }
@@ -146,53 +144,50 @@
 *|*:any-link:-moz-focusring {
   /* Don't specify the outline-color, we should always use initial value. */
   outline: 1px dotted;
 }
 
 /* Miscellaneous */
 
 *|*::-moz-cell-content {
-  display: block !important;
-  position: static !important;
+  display: block;
   unicode-bidi: inherit;
   text-overflow: inherit;
   overflow-clip-box: inherit;
 }
 
 *|*::-moz-block-inside-inline-wrapper {
-  display: block !important;
+  display: block;
   /* we currently inherit from the inline that is split */
   position: inherit; /* static or relative or sticky */
   outline: inherit;
   outline-offset: inherit;
   clip-path: inherit;
   filter: inherit;
   mask: inherit;
   opacity: inherit;
   text-decoration: inherit;
-  -moz-box-ordinal-group: inherit !important;
+  -moz-box-ordinal-group: inherit;
   overflow-clip-box: inherit;
   unicode-bidi: inherit;
   text-overflow: inherit;
   /* The properties below here don't apply if our position is static,
      and we do want them to have an effect if it's not, so it's fine
      to always inherit them. */
   top: inherit;
   left: inherit;
   bottom: inherit;
   right: inherit;
   z-index: inherit;
 }
 
 *|*::-moz-xul-anonymous-block {
-  display: block ! important;
-  position: static ! important;
-  float: none ! important;
-  -moz-box-ordinal-group: inherit !important;
+  display: block;
+  -moz-box-ordinal-group: inherit;
   text-overflow: inherit;
   overflow-clip-box: inherit;
 }
 
 *|*::-moz-scrolled-content, *|*::-moz-scrolled-canvas,
 *|*::-moz-scrolled-page-sequence {
   /* e.g., text inputs, select boxes */
   padding: inherit;
@@ -230,77 +225,75 @@
   grid-template-rows: inherit;
   /* CSS Align */
   align-content: inherit;
   align-items: inherit;
   justify-content: inherit;
   justify-items: inherit;
   /* Do not change these. nsCSSFrameConstructor depends on them to create a good
      frame tree. */
-  position: static !important;
-  float: none !important;
   overflow-clip-box: inherit;
 }
 
 *|*::-moz-viewport, *|*::-moz-viewport-scroll, *|*::-moz-canvas, *|*::-moz-scrolled-canvas {
-  display: block !important;
+  display: block;
   background-color: inherit;
 }
 
 *|*::-moz-viewport-scroll {
   overflow: auto;
 %ifdef XP_WIN
   resize: both;
 %endif
 }
 
 *|*::-moz-column-content {
   /* the column boxes inside a column-flowed block */
   /* make unicode-bidi inherit, otherwise it has no effect on column boxes */
   unicode-bidi: inherit;
   text-overflow: inherit;
   /* inherit the outer frame's display, otherwise we turn into an inline */
-  display: inherit !important;
+  display: inherit;
   /* Carry through our parent's height so that %-height children get
   their heights set */
   height: 100%;
 }
 
 *|*::-moz-anonymous-flex-item,
 *|*::-moz-anonymous-grid-item {
   /* Anonymous blocks that wrap contiguous runs of text
    * inside of a flex or grid container. */
   display: block;
 }
 
 *|*::-moz-page-sequence, *|*::-moz-scrolled-page-sequence {
   /* Collection of pages in print/print preview. Visual styles may only appear
    * in print preview. */
-  display: block !important;
+  display: block;
   background: linear-gradient(#606060, #8a8a8a) fixed;
   height: 100%;
 }
 
 *|*::-moz-page {
   /* Individual page in print/print preview. Visual styles may only appear
    * in print preview. */
-  display: block !important;
+  display: block;
   background: white;
   box-shadow: 5px 5px 8px #202020;
   box-decoration-break: clone;
   margin: 0.125in 0.25in;
 }
 
 *|*::-moz-pagecontent {
-  display: block !important;
+  display: block;
   margin: auto;
 }
 
 *|*::-moz-pagebreak {
-  display: block !important;
+  display: block;
 }
 
 /* Printing */
 
 @media print {
 
   * {
     cursor: default !important;