Bug 1501125 - Use WR clips instead of a mask as well for circle() and ellipse() shapes. r=kats
authorEmilio Cobos Álvarez <emilio@crisal.io>
Tue, 23 Oct 2018 03:25:26 +0200
changeset 490975 85cfe824ab6a8c80cd73faa101dcf9ddffe0db89
parent 490974 4e67ecbff9579883cfde518f79694164153ddcdd
child 490976 4fc03405a420a93d5dec32f09fd8323369b9ba7c
push id247
push userfmarier@mozilla.com
push dateSat, 27 Oct 2018 01:06:44 +0000
reviewerskats
bugs1501125
milestone65.0a1
Bug 1501125 - Use WR clips instead of a mask as well for circle() and ellipse() shapes. r=kats Differential Revision: https://phabricator.services.mozilla.com/D9463
layout/painting/nsDisplayList.cpp
layout/reftests/svg/svg-integration/clip-path/reftest.list
layout/reftests/w3c-css/submitted/masking/reftest.list
testing/web-platform/meta/css/css-masking/clip-path/clip-path-circle-001.html.ini
testing/web-platform/meta/css/css-masking/clip-path/clip-path-circle-002.html.ini
testing/web-platform/meta/css/css-masking/clip-path/clip-path-circle-003.html.ini
testing/web-platform/meta/css/css-masking/clip-path/clip-path-circle-004.html.ini
testing/web-platform/meta/css/css-masking/clip-path/clip-path-circle-005.html.ini
testing/web-platform/meta/css/css-masking/clip-path/clip-path-circle-006.html.ini
testing/web-platform/meta/css/css-masking/clip-path/clip-path-circle-007.html.ini
testing/web-platform/meta/css/css-masking/clip-path/clip-path-circle-008.html.ini
testing/web-platform/meta/css/css-masking/clip-path/clip-path-ellipse-001.html.ini
testing/web-platform/meta/css/css-masking/clip-path/clip-path-ellipse-002.html.ini
testing/web-platform/meta/css/css-masking/clip-path/clip-path-ellipse-003.html.ini
testing/web-platform/meta/css/css-masking/clip-path/clip-path-ellipse-004.html.ini
testing/web-platform/meta/css/css-masking/clip-path/clip-path-ellipse-005.html.ini
testing/web-platform/meta/css/css-masking/clip-path/clip-path-ellipse-006.html.ini
testing/web-platform/meta/css/css-masking/clip-path/clip-path-ellipse-007.html.ini
testing/web-platform/meta/css/css-masking/clip-path/clip-path-ellipse-008.html.ini
--- a/layout/painting/nsDisplayList.cpp
+++ b/layout/painting/nsDisplayList.cpp
@@ -9976,40 +9976,81 @@ CreateSimpleClipRegion(const nsDisplayMa
     return Nothing();
   }
 
   auto& clipPath = style->mClipPath;
   if (clipPath.GetType() != StyleShapeSourceType::Shape) {
     return Nothing();
   }
 
-  // TODO(emilio): We should be able to also simplify most of the circle() and
-  // ellipse() shapes.
   auto& shape = clipPath.GetBasicShape();
-  if (shape->GetShapeType() != StyleBasicShapeType::Inset) {
+  if (shape->GetShapeType() == StyleBasicShapeType::Polygon) {
     return Nothing();
   }
 
+  auto appUnitsPerDevPixel = frame->PresContext()->AppUnitsPerDevPixel();
   const nsRect refBox =
     nsLayoutUtils::ComputeGeometryBox(frame, clipPath.GetReferenceBox());
 
-  const nsRect insetRect =
-    ShapeUtils::ComputeInsetRect(shape, refBox) + aDisplayItem.ToReferenceFrame();
-
-  auto appUnitsPerDevPixel = frame->PresContext()->AppUnitsPerDevPixel();
-
-  nscoord radii[8] = { 0 };
   AutoTArray<wr::ComplexClipRegion, 1> clipRegions;
-  if (ShapeUtils::ComputeInsetRadii(shape, insetRect, refBox, radii)) {
-    clipRegions.AppendElement(wr::ToComplexClipRegion(
-      insetRect, radii, appUnitsPerDevPixel));
-  }
-
-  auto rect = wr::ToRoundedLayoutRect(
-    LayoutDeviceRect::FromAppUnits(insetRect, appUnitsPerDevPixel));
+
+  wr::LayoutRect rect;
+  switch (shape->GetShapeType()) {
+    case StyleBasicShapeType::Inset: {
+      const nsRect insetRect =
+        ShapeUtils::ComputeInsetRect(shape, refBox) + aDisplayItem.ToReferenceFrame();
+
+      nscoord radii[8] = { 0 };
+
+      if (ShapeUtils::ComputeInsetRadii(shape, insetRect, refBox, radii)) {
+        clipRegions.AppendElement(wr::ToComplexClipRegion(
+          insetRect, radii, appUnitsPerDevPixel));
+      }
+
+      rect = wr::ToRoundedLayoutRect(
+        LayoutDeviceRect::FromAppUnits(insetRect, appUnitsPerDevPixel));
+      break;
+    }
+    case StyleBasicShapeType::Ellipse:
+    case StyleBasicShapeType::Circle: {
+      nsPoint center = ShapeUtils::ComputeCircleOrEllipseCenter(shape, refBox);
+
+      nsSize radii;
+      if (shape->GetShapeType() == StyleBasicShapeType::Ellipse) {
+        radii = ShapeUtils::ComputeEllipseRadii(shape, center, refBox);
+      } else {
+        nscoord radius = ShapeUtils::ComputeCircleRadius(shape, center, refBox);
+        radii = { radius, radius };
+      }
+
+      nsRect ellipseRect(
+        aDisplayItem.ToReferenceFrame() + center - nsPoint(radii.width, radii.height),
+        radii * 2);
+
+      nscoord ellipseRadii[8];
+      NS_FOR_CSS_HALF_CORNERS(corner) {
+        ellipseRadii[corner] = HalfCornerIsX(corner) ? radii.width : radii.height;
+      }
+
+      clipRegions.AppendElement(wr::ToComplexClipRegion(
+          ellipseRect, ellipseRadii, appUnitsPerDevPixel));
+
+      rect = wr::ToRoundedLayoutRect(
+        LayoutDeviceRect::FromAppUnits(ellipseRect, appUnitsPerDevPixel));
+      break;
+    }
+    default:
+      // Please don't add more exceptions, try to find a way to define the clip
+      // without using a mask image.
+      //
+      // And if you _really really_ need to add an exception, add it to where
+      // the polygon check is.
+      MOZ_ASSERT_UNREACHABLE("Unhandled shape id?");
+      return Nothing();
+  }
   wr::WrClipId clipId =
     aBuilder.DefineClip(Nothing(), rect, &clipRegions, nullptr);
   return Some(clipId);
 }
 
 enum class HandleOpacity
 {
   No,
--- a/layout/reftests/svg/svg-integration/clip-path/reftest.list
+++ b/layout/reftests/svg/svg-integration/clip-path/reftest.list
@@ -11,46 +11,46 @@
 == clip-path-polygon-007.html clip-path-stripes-001-ref.html
 == clip-path-polygon-008.html clip-path-stripes-002-ref.html
 == clip-path-polygon-009.html clip-path-square-002-ref.html
 == clip-path-polygon-010.html clip-path-stripes-001-ref.html
 == clip-path-polygon-011.html clip-path-stripes-001-ref.html
 == clip-path-polygon-012.html clip-path-stripes-001-ref.html
 fuzzy-if(skiaContent,0-1,0-20) fails-if(webrender&&!gtkWidget) == clip-path-polygon-013.html clip-path-stripes-003-ref.html
 
-fuzzy-if(webrender,64-64,714-714) == clip-path-circle-001.html clip-path-circle-001-ref.html
-fuzzy-if(webrender,64-64,714-714) == clip-path-circle-002.html clip-path-circle-001-ref.html
-fuzzy-if(webrender,64-64,714-714) == clip-path-circle-003.html clip-path-circle-001-ref.html
-fuzzy-if(webrender,64-64,714-714) == clip-path-circle-004.html clip-path-circle-001-ref.html
-fuzzy-if(webrender,64-64,714-714) == clip-path-circle-005.html clip-path-circle-002-ref.html
-fuzzy-if(webrender,64-64,714-714) == clip-path-circle-006.html clip-path-circle-001-ref.html
-fuzzy-if(webrender,64-64,714-714) == clip-path-circle-007.html clip-path-circle-002-ref.html
-fuzzy-if(webrender,64-64,714-714) == clip-path-circle-008.html clip-path-circle-002-ref.html
-fuzzy-if(webrender,64-64,714-714) == clip-path-circle-009.html clip-path-circle-003-ref.html
-fuzzy-if(webrender,64-64,714-714) == clip-path-circle-010.html clip-path-circle-004-ref.html
-fuzzy-if(webrender,64-64,714-714) == clip-path-circle-011.html clip-path-circle-005-ref.html
-fuzzy-if(webrender,64-64,714-714) == clip-path-circle-012.html clip-path-circle-006-ref.html
-fuzzy-if(webrender,64-64,714-714) == clip-path-circle-013.html clip-path-circle-002-ref.html
-fuzzy-if(webrender,64-64,714-714) == clip-path-circle-014.html clip-path-circle-007-ref.html
-fuzzy-if(webrender,64-64,714-714) == clip-path-circle-015.html clip-path-circle-008-ref.html
-fuzzy-if(webrender,64-64,714-714) == clip-path-circle-016.html clip-path-circle-009-ref.html
-fuzzy-if(/^Windows\x20NT\x2010\.0/.test(http.oscpu),0-16,0-9) fuzzy-if(webrender,64-64,714-714) == clip-path-circle-017.html clip-path-circle-007-ref.html
-fuzzy-if(webrender,64-64,714-714) == clip-path-circle-018.html clip-path-circle-010-ref.html
-fuzzy-if(webrender,64-64,714-714) == clip-path-circle-019.html clip-path-circle-002-ref.html
-fuzzy-if(webrender,64-64,714-714) == clip-path-circle-020.html clip-path-circle-002-ref.html
+fuzzy-if(webrender,35-35,703-703) == clip-path-circle-001.html clip-path-circle-001-ref.html
+fuzzy-if(webrender,35-35,703-703) == clip-path-circle-002.html clip-path-circle-001-ref.html
+fuzzy-if(webrender,35-35,703-703) == clip-path-circle-003.html clip-path-circle-001-ref.html
+fuzzy-if(webrender,35-35,703-703) == clip-path-circle-004.html clip-path-circle-001-ref.html
+fuzzy-if(webrender,35-35,703-703) == clip-path-circle-005.html clip-path-circle-002-ref.html
+fuzzy-if(webrender,35-35,703-703) == clip-path-circle-006.html clip-path-circle-001-ref.html
+fuzzy-if(webrender,35-35,703-703) == clip-path-circle-007.html clip-path-circle-002-ref.html
+fuzzy-if(webrender,35-35,703-703) == clip-path-circle-008.html clip-path-circle-002-ref.html
+fuzzy-if(webrender,35-35,703-703) == clip-path-circle-009.html clip-path-circle-003-ref.html
+fuzzy-if(webrender,35-35,703-703) == clip-path-circle-010.html clip-path-circle-004-ref.html
+fuzzy-if(webrender,35-35,703-703) == clip-path-circle-011.html clip-path-circle-005-ref.html
+fuzzy-if(webrender,35-35,703-703) == clip-path-circle-012.html clip-path-circle-006-ref.html
+fuzzy-if(webrender,35-35,703-703) == clip-path-circle-013.html clip-path-circle-002-ref.html
+fuzzy-if(webrender,35-35,703-703) == clip-path-circle-014.html clip-path-circle-007-ref.html
+fuzzy-if(webrender,35-35,703-703) == clip-path-circle-015.html clip-path-circle-008-ref.html
+fuzzy-if(webrender,35-35,703-703) == clip-path-circle-016.html clip-path-circle-009-ref.html
+fuzzy-if(/^Windows\x20NT\x2010\.0/.test(http.oscpu),0-16,0-9) fuzzy-if(webrender,35-35,703-703) == clip-path-circle-017.html clip-path-circle-007-ref.html
+fuzzy-if(webrender,35-35,703-703) == clip-path-circle-018.html clip-path-circle-010-ref.html
+fuzzy-if(webrender,35-35,703-703) == clip-path-circle-019.html clip-path-circle-002-ref.html
+fuzzy-if(webrender,35-35,703-703) == clip-path-circle-020.html clip-path-circle-002-ref.html
 == clip-path-circle-021.html clip-path-circle-021-ref.html
 
-fuzzy-if(webrender,64-64,1106-1106) == clip-path-ellipse-001.html clip-path-ellipse-001-ref.html
-fuzzy-if(webrender,64-64,1106-1106) == clip-path-ellipse-002.html clip-path-ellipse-001-ref.html
-fuzzy-if(webrender,64-64,1106-1106) == clip-path-ellipse-003.html clip-path-ellipse-001-ref.html
-fuzzy-if(webrender,64-64,1106-1106) == clip-path-ellipse-004.html clip-path-ellipse-001-ref.html
-fuzzy-if(webrender,64-64,1106-1106) == clip-path-ellipse-005.html clip-path-ellipse-001-ref.html
-fuzzy-if(webrender,64-64,1106-1106) == clip-path-ellipse-006.html clip-path-ellipse-001-ref.html
-fuzzy-if(webrender,64-64,1106-1106) == clip-path-ellipse-007.html clip-path-ellipse-001-ref.html
-fuzzy-if(webrender,64-64,1106-1106) == clip-path-ellipse-008.html clip-path-ellipse-001-ref.html
+fuzzy-if(webrender,36-36,1100-1100) == clip-path-ellipse-001.html clip-path-ellipse-001-ref.html
+fuzzy-if(webrender,36-36,1100-1100) == clip-path-ellipse-002.html clip-path-ellipse-001-ref.html
+fuzzy-if(webrender,36-36,1100-1100) == clip-path-ellipse-003.html clip-path-ellipse-001-ref.html
+fuzzy-if(webrender,36-36,1100-1100) == clip-path-ellipse-004.html clip-path-ellipse-001-ref.html
+fuzzy-if(webrender,36-36,1100-1100) == clip-path-ellipse-005.html clip-path-ellipse-001-ref.html
+fuzzy-if(webrender,36-36,1100-1100) == clip-path-ellipse-006.html clip-path-ellipse-001-ref.html
+fuzzy-if(webrender,36-36,1100-1100) == clip-path-ellipse-007.html clip-path-ellipse-001-ref.html
+fuzzy-if(webrender,36-36,1100-1100) == clip-path-ellipse-008.html clip-path-ellipse-001-ref.html
 
 == clip-path-inset-001a.html clip-path-inset-001-ref.html
 == clip-path-inset-001b.html clip-path-inset-001-ref.html
 == clip-path-inset-001c.html clip-path-inset-001-ref.html
 # Anti-aliasing behavior for masking and borders is different
 fuzzy-if(!webrender,0-64,0-146) == clip-path-inset-002a.html clip-path-inset-002-ref.html
 fuzzy-if(!webrender,0-64,0-146) == clip-path-inset-002b.html clip-path-inset-002-ref.html
 fuzzy-if(!webrender,0-64,0-146) == clip-path-inset-002c.html clip-path-inset-002-ref.html
--- a/layout/reftests/w3c-css/submitted/masking/reftest.list
+++ b/layout/reftests/w3c-css/submitted/masking/reftest.list
@@ -84,17 +84,17 @@ fails == mask-origin-2.html mask-origin-
 == mask-size-percent.html mask-size-percent-percent-ref.html
 == mask-size-percent-auto.html mask-size-percent-percent-ref.html
 == mask-size-percent-length.html mask-size-percent-percent-ref.html
 == mask-size-percent-percent.html mask-size-percent-percent-ref.html
 == mask-size-percent-percent-stretch.html mask-size-percent-percent-stretch-ref.html
 
 fuzzy-if(winWidget,0-1,0-21) fuzzy-if(skiaContent,0-1,0-60) fuzzy-if(webrender,0-64,0-371) == clip-path-contentBox-1a.html clip-path-geometryBox-1-ref.html
 fuzzy-if(winWidget,0-16,0-21) fuzzy-if(skiaContent,0-1,0-60) == clip-path-contentBox-1b.html clip-path-geometryBox-1-ref.html
-fuzzy-if(winWidget,0-16,0-21) fuzzy-if(skiaContent,0-1,0-60) fuzzy-if(webrender,64-64,371-371) == clip-path-contentBox-1c.html clip-path-geometryBox-1-ref.html
+fuzzy-if(winWidget,0-16,0-21) fuzzy-if(skiaContent,0-1,0-60) fuzzy-if(webrender,35-35,360-360) == clip-path-contentBox-1c.html clip-path-geometryBox-1-ref.html
 fuzzy-if(winWidget,0-16,0-21) fuzzy-if(skiaContent,0-1,0-60) fuzzy-if(webrender,0-64,0-371) == clip-path-paddingBox-1a.html clip-path-geometryBox-1-ref.html
 fuzzy-if(winWidget,0-16,0-21) fuzzy-if(skiaContent,0-1,0-60) == clip-path-paddingBox-1b.html clip-path-geometryBox-1-ref.html
 fuzzy-if(winWidget,0-16,0-21) fuzzy-if(skiaContent,0-1,0-60) fuzzy-if(webrender,0-64,0-371) == clip-path-paddingBox-1c.html clip-path-geometryBox-1-ref.html
 fuzzy(0-64,0-371) == clip-path-borderBox-1a.html clip-path-geometryBox-1-ref.html
 fuzzy-if(winWidget,0-16,0-21) fuzzy-if(skiaContent,0-1,0-60) == clip-path-borderBox-1b.html clip-path-geometryBox-1-ref.html
 fuzzy(0-64,0-371) == clip-path-borderBox-1c.html clip-path-geometryBox-1-ref.html
 fuzzy-if(winWidget,0-16,0-21) fuzzy-if(skiaContent,0-1,0-60) == clip-path-marginBox-1a.html clip-path-geometryBox-1-ref.html
 fuzzy(0-64,0-371) == clip-path-fillBox-1a.html clip-path-geometryBox-1-ref.html
--- a/testing/web-platform/meta/css/css-masking/clip-path/clip-path-circle-001.html.ini
+++ b/testing/web-platform/meta/css/css-masking/clip-path/clip-path-circle-001.html.ini
@@ -1,2 +1,3 @@
 [clip-path-circle-001.html]
-  expected: FAIL
+  expected:
+    if not webrender: FAIL
--- a/testing/web-platform/meta/css/css-masking/clip-path/clip-path-circle-002.html.ini
+++ b/testing/web-platform/meta/css/css-masking/clip-path/clip-path-circle-002.html.ini
@@ -1,2 +1,3 @@
 [clip-path-circle-002.html]
-  expected: FAIL
+  expected:
+    if not webrender: FAIL
--- a/testing/web-platform/meta/css/css-masking/clip-path/clip-path-circle-003.html.ini
+++ b/testing/web-platform/meta/css/css-masking/clip-path/clip-path-circle-003.html.ini
@@ -1,2 +1,3 @@
 [clip-path-circle-003.html]
-  expected: FAIL
+  expected:
+    if not webrender: FAIL
--- a/testing/web-platform/meta/css/css-masking/clip-path/clip-path-circle-004.html.ini
+++ b/testing/web-platform/meta/css/css-masking/clip-path/clip-path-circle-004.html.ini
@@ -1,2 +1,3 @@
 [clip-path-circle-004.html]
-  expected: FAIL
+  expected:
+    if not webrender: FAIL
--- a/testing/web-platform/meta/css/css-masking/clip-path/clip-path-circle-005.html.ini
+++ b/testing/web-platform/meta/css/css-masking/clip-path/clip-path-circle-005.html.ini
@@ -1,2 +1,3 @@
 [clip-path-circle-005.html]
-  expected: FAIL
+  expected:
+    if not webrender: FAIL
--- a/testing/web-platform/meta/css/css-masking/clip-path/clip-path-circle-006.html.ini
+++ b/testing/web-platform/meta/css/css-masking/clip-path/clip-path-circle-006.html.ini
@@ -1,2 +1,3 @@
 [clip-path-circle-006.html]
-  expected: FAIL
+  expected:
+    if not webrender: FAIL
--- a/testing/web-platform/meta/css/css-masking/clip-path/clip-path-circle-007.html.ini
+++ b/testing/web-platform/meta/css/css-masking/clip-path/clip-path-circle-007.html.ini
@@ -1,2 +1,3 @@
 [clip-path-circle-007.html]
-  expected: FAIL
+  expected:
+    if not webrender: FAIL
--- a/testing/web-platform/meta/css/css-masking/clip-path/clip-path-circle-008.html.ini
+++ b/testing/web-platform/meta/css/css-masking/clip-path/clip-path-circle-008.html.ini
@@ -1,2 +1,3 @@
 [clip-path-circle-008.html]
-  expected: FAIL
+  expected:
+    if not webrender: FAIL
--- a/testing/web-platform/meta/css/css-masking/clip-path/clip-path-ellipse-001.html.ini
+++ b/testing/web-platform/meta/css/css-masking/clip-path/clip-path-ellipse-001.html.ini
@@ -1,10 +1,3 @@
 [clip-path-ellipse-001.html]
   expected:
-    if webrender: FAIL
-    if os == "linux": FAIL
-    if debug and not webrender and e10s and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): FAIL
-    if debug and not webrender and e10s and (os == "win") and (version == "10.0.15063") and (processor == "x86_64") and (bits == 64): FAIL
-    if not debug and not webrender and e10s and (os == "win") and (version == "10.0.15063") and (processor == "x86_64") and (bits == 64): FAIL
-    if not debug and not webrender and e10s and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): FAIL
-    if debug and not webrender and e10s and (os == "mac") and (version == "OS X 10.10.5") and (processor == "x86_64") and (bits == 64): FAIL
-    if not debug and not webrender and e10s and (os == "mac") and (version == "OS X 10.10.5") and (processor == "x86_64") and (bits == 64): FAIL
+    if not webrender: FAIL
--- a/testing/web-platform/meta/css/css-masking/clip-path/clip-path-ellipse-002.html.ini
+++ b/testing/web-platform/meta/css/css-masking/clip-path/clip-path-ellipse-002.html.ini
@@ -1,11 +1,3 @@
 [clip-path-ellipse-002.html]
   expected:
-    if debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): FAIL
-    if not debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): FAIL
-    if os == "linux": FAIL
-    if debug and not webrender and e10s and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): FAIL
-    if debug and not webrender and e10s and (os == "win") and (version == "10.0.15063") and (processor == "x86_64") and (bits == 64): FAIL
-    if not debug and not webrender and e10s and (os == "win") and (version == "10.0.15063") and (processor == "x86_64") and (bits == 64): FAIL
-    if not debug and not webrender and e10s and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): FAIL
-    if debug and not webrender and e10s and (os == "mac") and (version == "OS X 10.10.5") and (processor == "x86_64") and (bits == 64): FAIL
-    if not debug and not webrender and e10s and (os == "mac") and (version == "OS X 10.10.5") and (processor == "x86_64") and (bits == 64): FAIL
+    if not webrender: FAIL
--- a/testing/web-platform/meta/css/css-masking/clip-path/clip-path-ellipse-003.html.ini
+++ b/testing/web-platform/meta/css/css-masking/clip-path/clip-path-ellipse-003.html.ini
@@ -1,11 +1,3 @@
 [clip-path-ellipse-003.html]
   expected:
-    if debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): FAIL
-    if not debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): FAIL
-    if os == "linux": FAIL
-    if debug and not webrender and e10s and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): FAIL
-    if debug and not webrender and e10s and (os == "win") and (version == "10.0.15063") and (processor == "x86_64") and (bits == 64): FAIL
-    if not debug and not webrender and e10s and (os == "win") and (version == "10.0.15063") and (processor == "x86_64") and (bits == 64): FAIL
-    if not debug and not webrender and e10s and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): FAIL
-    if debug and not webrender and e10s and (os == "mac") and (version == "OS X 10.10.5") and (processor == "x86_64") and (bits == 64): FAIL
-    if not debug and not webrender and e10s and (os == "mac") and (version == "OS X 10.10.5") and (processor == "x86_64") and (bits == 64): FAIL
+    if not webrender: FAIL
--- a/testing/web-platform/meta/css/css-masking/clip-path/clip-path-ellipse-004.html.ini
+++ b/testing/web-platform/meta/css/css-masking/clip-path/clip-path-ellipse-004.html.ini
@@ -1,11 +1,3 @@
 [clip-path-ellipse-004.html]
   expected:
-    if debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): FAIL
-    if not debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): FAIL
-    if os == "linux": FAIL
-    if debug and not webrender and e10s and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): FAIL
-    if debug and not webrender and e10s and (os == "win") and (version == "10.0.15063") and (processor == "x86_64") and (bits == 64): FAIL
-    if not debug and not webrender and e10s and (os == "win") and (version == "10.0.15063") and (processor == "x86_64") and (bits == 64): FAIL
-    if not debug and not webrender and e10s and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): FAIL
-    if debug and not webrender and e10s and (os == "mac") and (version == "OS X 10.10.5") and (processor == "x86_64") and (bits == 64): FAIL
-    if not debug and not webrender and e10s and (os == "mac") and (version == "OS X 10.10.5") and (processor == "x86_64") and (bits == 64): FAIL
+    if not webrender: FAIL
--- a/testing/web-platform/meta/css/css-masking/clip-path/clip-path-ellipse-005.html.ini
+++ b/testing/web-platform/meta/css/css-masking/clip-path/clip-path-ellipse-005.html.ini
@@ -1,11 +1,3 @@
 [clip-path-ellipse-005.html]
   expected:
-    if debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): FAIL
-    if not debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): FAIL
-    if os == "linux": FAIL
-    if debug and not webrender and e10s and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): FAIL
-    if debug and not webrender and e10s and (os == "win") and (version == "10.0.15063") and (processor == "x86_64") and (bits == 64): FAIL
-    if not debug and not webrender and e10s and (os == "win") and (version == "10.0.15063") and (processor == "x86_64") and (bits == 64): FAIL
-    if not debug and not webrender and e10s and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): FAIL
-    if debug and not webrender and e10s and (os == "mac") and (version == "OS X 10.10.5") and (processor == "x86_64") and (bits == 64): FAIL
-    if not debug and not webrender and e10s and (os == "mac") and (version == "OS X 10.10.5") and (processor == "x86_64") and (bits == 64): FAIL
+    if not webrender: FAIL
--- a/testing/web-platform/meta/css/css-masking/clip-path/clip-path-ellipse-006.html.ini
+++ b/testing/web-platform/meta/css/css-masking/clip-path/clip-path-ellipse-006.html.ini
@@ -1,11 +1,3 @@
 [clip-path-ellipse-006.html]
   expected:
-    if debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): FAIL
-    if not debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): FAIL
-    if os == "linux": FAIL
-    if debug and not webrender and e10s and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): FAIL
-    if debug and not webrender and e10s and (os == "win") and (version == "10.0.15063") and (processor == "x86_64") and (bits == 64): FAIL
-    if not debug and not webrender and e10s and (os == "win") and (version == "10.0.15063") and (processor == "x86_64") and (bits == 64): FAIL
-    if not debug and not webrender and e10s and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): FAIL
-    if debug and not webrender and e10s and (os == "mac") and (version == "OS X 10.10.5") and (processor == "x86_64") and (bits == 64): FAIL
-    if not debug and not webrender and e10s and (os == "mac") and (version == "OS X 10.10.5") and (processor == "x86_64") and (bits == 64): FAIL
+    if not webrender: FAIL
--- a/testing/web-platform/meta/css/css-masking/clip-path/clip-path-ellipse-007.html.ini
+++ b/testing/web-platform/meta/css/css-masking/clip-path/clip-path-ellipse-007.html.ini
@@ -1,11 +1,3 @@
 [clip-path-ellipse-007.html]
   expected:
-    if debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): FAIL
-    if not debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): FAIL
-    if os == "linux": FAIL
-    if debug and not webrender and e10s and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): FAIL
-    if debug and not webrender and e10s and (os == "win") and (version == "10.0.15063") and (processor == "x86_64") and (bits == 64): FAIL
-    if not debug and not webrender and e10s and (os == "win") and (version == "10.0.15063") and (processor == "x86_64") and (bits == 64): FAIL
-    if not debug and not webrender and e10s and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): FAIL
-    if debug and not webrender and e10s and (os == "mac") and (version == "OS X 10.10.5") and (processor == "x86_64") and (bits == 64): FAIL
-    if not debug and not webrender and e10s and (os == "mac") and (version == "OS X 10.10.5") and (processor == "x86_64") and (bits == 64): FAIL
+    if not webrender: FAIL
--- a/testing/web-platform/meta/css/css-masking/clip-path/clip-path-ellipse-008.html.ini
+++ b/testing/web-platform/meta/css/css-masking/clip-path/clip-path-ellipse-008.html.ini
@@ -1,11 +1,3 @@
 [clip-path-ellipse-008.html]
   expected:
-    if debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): FAIL
-    if not debug and webrender and e10s and (os == "linux") and (version == "Ubuntu 16.04") and (processor == "x86_64") and (bits == 64): FAIL
-    if os == "linux": FAIL
-    if debug and not webrender and e10s and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): FAIL
-    if debug and not webrender and e10s and (os == "win") and (version == "10.0.15063") and (processor == "x86_64") and (bits == 64): FAIL
-    if not debug and not webrender and e10s and (os == "win") and (version == "10.0.15063") and (processor == "x86_64") and (bits == 64): FAIL
-    if not debug and not webrender and e10s and (os == "win") and (version == "6.1.7601") and (processor == "x86") and (bits == 32): FAIL
-    if debug and not webrender and e10s and (os == "mac") and (version == "OS X 10.10.5") and (processor == "x86_64") and (bits == 64): FAIL
-    if not debug and not webrender and e10s and (os == "mac") and (version == "OS X 10.10.5") and (processor == "x86_64") and (bits == 64): FAIL
+    if not webrender: FAIL