Bug 1639756 - Cleanup ua.css by using :is(). r=jwatt
authorEmilio Cobos Álvarez <emilio@crisal.io>
Thu, 21 May 2020 12:27:31 +0000
changeset 531885 b8e3a5d241c9461def0cde60d778b429bd0fecc6
parent 531884 c161d7a53845bad9e2bebc9f76af9e6633507efb
child 531886 ff407bdf357e75aa51b10623a2d249a4dc57e863
push id116937
push userealvarez@mozilla.com
push dateMon, 25 May 2020 10:22:46 +0000
treeherderautoland@9d8f9a2cd37f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjwatt
bugs1639756
milestone78.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 1639756 - Cleanup ua.css by using :is(). r=jwatt Differential Revision: https://phabricator.services.mozilla.com/D76264
layout/style/res/ua.css
--- a/layout/style/res/ua.css
+++ b/layout/style/res/ua.css
@@ -400,18 +400,17 @@ div:-moz-native-anonymous.moz-accessible
   /* Add transition effect to make caret size changing smoother. */
   transition-duration: 250ms;
   transition-property: width, height, margin-left;
 
   position: absolute;
   z-index: 2147483647;
 }
 
-div:-moz-native-anonymous.moz-accessiblecaret > #text-overlay,
-div:-moz-native-anonymous.moz-accessiblecaret > #image {
+div:-moz-native-anonymous.moz-accessiblecaret > :is(#text-overlay, #image) {
   width: 100%;
 
   /* Override this property in moz-custom-content-container to make dummy touch
    * listener work. */
   pointer-events: auto;
 }
 
 div:-moz-native-anonymous.moz-accessiblecaret > #image {
@@ -420,27 +419,25 @@ div:-moz-native-anonymous.moz-accessible
   background-repeat: no-repeat;
   background-origin: content-box;
 }
 
 div:-moz-native-anonymous.moz-accessiblecaret.normal > #image {
   background-image: url("resource://gre-resources/accessiblecaret-normal@1x.png");
 }
 
-div:-moz-native-anonymous.moz-accessiblecaret.left > #text-overlay,
-div:-moz-native-anonymous.moz-accessiblecaret.left > #image {
+div:-moz-native-anonymous.moz-accessiblecaret.left > :is(#text-overlay, #image) {
   margin-left: -39%;
 }
 
 div:-moz-native-anonymous.moz-accessiblecaret.left > #image {
   background-image: url("resource://gre-resources/accessiblecaret-tilt-left@1x.png");
 }
 
-div:-moz-native-anonymous.moz-accessiblecaret.right > #text-overlay,
-div:-moz-native-anonymous.moz-accessiblecaret.right > #image {
+div:-moz-native-anonymous.moz-accessiblecaret.right > :is(#text-overlay, #image) {
   margin-left: 41%;
 }
 
 div:-moz-native-anonymous.moz-accessiblecaret.right > #image {
   background-image: url("resource://gre-resources/accessiblecaret-tilt-right@1x.png");
 }
 
 div:-moz-native-anonymous.moz-accessiblecaret.none {
@@ -485,43 +482,40 @@ div:-moz-native-anonymous.moz-accessible
   }
 
   div:-moz-native-anonymous.moz-accessiblecaret.right > #image {
     background-image: url("resource://gre-resources/accessiblecaret-tilt-right@2.25x.png");
   }
 }
 
 %ifdef ANDROID
-div:-moz-native-anonymous.moz-accessiblecaret > #text-overlay,
-div:-moz-native-anonymous.moz-accessiblecaret > #image {
+div:-moz-native-anonymous.moz-accessiblecaret > :is(#text-overlay, #image) {
   /* border: 0.1px solid red; */ /* Uncomment border to see the touch target. */
   padding-left: 59%; /* Enlarge the touch area. ((48-22)/2)px / 22px ~= 59% */
   padding-right: 59%; /* Enlarge the touch area. */
   margin-left: -59%;
 }
 
 div:-moz-native-anonymous.moz-accessiblecaret > #image {
   padding-bottom: 59%; /* Enlarge the touch area. */
 }
 
 div:-moz-native-anonymous.moz-accessiblecaret.normal > #image {
   background-image: url("chrome://geckoview/skin/images/accessiblecaret-normal-hdpi.png");
 }
 
-div:-moz-native-anonymous.moz-accessiblecaret.left > #text-overlay,
-div:-moz-native-anonymous.moz-accessiblecaret.left > #image {
+div:-moz-native-anonymous.moz-accessiblecaret.left > :is(#text-overlay, #image) {
   margin-left: -109%;
 }
 
 div:-moz-native-anonymous.moz-accessiblecaret.left > #image {
   background-image: url("chrome://geckoview/skin/images/accessiblecaret-tilt-left-hdpi.png");
 }
 
-div:-moz-native-anonymous.moz-accessiblecaret.right > #text-overlay,
-div:-moz-native-anonymous.moz-accessiblecaret.right > #image {
+div:-moz-native-anonymous.moz-accessiblecaret.right > :is(#text-overlay, #image) {
   margin-left: -12%;
 }
 
 div:-moz-native-anonymous.moz-accessiblecaret.right > #image {
   background-image: url("chrome://geckoview/skin/images/accessiblecaret-tilt-right-hdpi.png");
 }
 
 @media (min-resolution: 1.5dppx) {