Bug 1474466 - Convert rounded rect clips into paint geometry if the display item type support it. r?Bas,miko draft
authorMatt Woodrow <mwoodrow@mozilla.com>
Sun, 15 Jul 2018 20:26:46 +1200
changeset 818509 cbc05423051a79156bd66ce279e5c5df2eb3c640
parent 816164 9302fd8c95c05e5a5cd295dde3bbdac2d58d6256
push id116281
push usermwoodrow@mozilla.com
push dateSun, 15 Jul 2018 08:27:15 +0000
reviewersBas, miko
bugs1474466
milestone63.0a1
Bug 1474466 - Convert rounded rect clips into paint geometry if the display item type support it. r?Bas,miko MozReview-Commit-ID: EkqgSSLufnp
layout/painting/FrameLayerBuilder.cpp
layout/painting/nsDisplayList.cpp
layout/painting/nsDisplayList.h
layout/reftests/border-radius/reftest.list
layout/reftests/box-shadow/reftest.list
layout/reftests/bugs/reftest.list
layout/reftests/css-shapes/reftest.list
layout/reftests/image-element/reftest.list
testing/web-platform/meta/css/compositing/mix-blend-mode/mix-blend-mode-blended-element-overflow-hidden-and-border-radius.html.ini
testing/web-platform/meta/css/compositing/mix-blend-mode/mix-blend-mode-intermediate-element-overflow-hidden-and-border-radius.html.ini
testing/web-platform/meta/css/compositing/mix-blend-mode/mix-blend-mode-parent-with-border-radius.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/FrameLayerBuilder.cpp
+++ b/layout/painting/FrameLayerBuilder.cpp
@@ -6410,21 +6410,25 @@ FrameLayerBuilder::PaintItems(std::vecto
     // update the clip.
     const DisplayItemClip* clip = &item->GetClip();
     if (clip->GetRoundedRectCount() > 0 &&
         !clip->IsRectClippedByRoundedCorner(visibleRect)) {
       tmpClip = *clip;
       tmpClip.RemoveRoundedCorners();
       clip = &tmpClip;
     }
+    bool itemPaintsOwnClip = false;
     if (clipTracker.HasClip(opacityNesting) != clip->HasClip() ||
         (clip->HasClip() && *clip != currentClip)) {
       clipTracker.PopClipIfNeeded(opacityNesting);
 
-      if (clip->HasClip()) {
+      if (item->CanPaintWithClip(*clip)) {
+        MOZ_ASSERT(!cdi.mInactiveLayerManager);
+        itemPaintsOwnClip = true;
+      } else if (clip->HasClip()) {
         currentClip = *clip;
         clipTracker.SaveClip(opacityNesting);
         currentClip.ApplyTo(aContext, appUnitsPerDevPixel);
         aContext->NewPath();
       }
     }
 
     if (cdi.mInactiveLayerManager) {
@@ -6438,17 +6442,21 @@ FrameLayerBuilder::PaintItems(std::vecto
         frame->AddStateBits(NS_FRAME_PAINTED_THEBES);
       }
 #ifdef MOZ_DUMP_PAINTING
       if (gfxEnv::DumpPaintItems()) {
         DebugPaintItem(aDrawTarget, aPresContext, item, aBuilder);
       } else
 #endif
       {
-        item->Paint(aBuilder, aContext);
+        if (itemPaintsOwnClip) {
+          item->PaintWithClip(aBuilder, aContext, *clip);
+        } else {
+          item->Paint(aBuilder, aContext);
+        }
       }
     }
   }
 
   clipTracker.PopClipIfNeeded(opacityNesting);
   MOZ_ASSERT(opacityNesting == 0);
   MOZ_ASSERT(emptyOpacityNesting == 0);
 }
--- a/layout/painting/nsDisplayList.cpp
+++ b/layout/painting/nsDisplayList.cpp
@@ -4761,16 +4761,62 @@ nsDisplayBackgroundColor::CreateWebRende
                     roundedRect,
                     !BackfaceIsHidden(),
                     wr::ToColorF(ToDeviceColor(mColor)));
 
   return true;
 }
 
 void
+nsDisplayBackgroundColor::PaintWithClip(nsDisplayListBuilder* aBuilder,
+                                        gfxContext* aCtx,
+                                        const DisplayItemClip& aClip)
+{
+  MOZ_ASSERT(mBackgroundStyle->StyleBackground()->mImage.mLayers[0].mClip != StyleGeometryBox::Text);
+  if (mColor == Color()) {
+    return;
+  }
+
+  nsRect fillRect = mBackgroundRect;
+  if (aClip.HasClip()) {
+    fillRect.IntersectRect(fillRect, aClip.GetClipRect());
+  }
+
+  DrawTarget* dt = aCtx->GetDrawTarget();
+  int32_t A2D = mFrame->PresContext()->AppUnitsPerDevPixel();
+  Rect bounds = ToRect(nsLayoutUtils::RectToGfxRect(fillRect, A2D));
+  MaybeSnapToDevicePixels(bounds, *dt);
+  ColorPattern fill(ToDeviceColor(mColor));
+
+  if (aClip.GetRoundedRectCount()) {
+    MOZ_ASSERT(aClip.GetRoundedRectCount() == 1);
+
+    AutoTArray<DisplayItemClip::RoundedRect, 1> roundedRect;
+    aClip.AppendRoundedRects(&roundedRect);
+
+    bool pushedClip = false;
+    if (!fillRect.Contains(roundedRect[0].mRect)) {
+      dt->PushClipRect(bounds);
+      pushedClip = true;
+    }
+
+    RefPtr<Path> path = aClip.MakeRoundedRectPath(*aCtx->GetDrawTarget(),
+                                                  A2D,
+                                                  roundedRect[0]);
+    dt->Fill(path, fill);
+    if (pushedClip) {
+      dt->PopClip();
+    }
+  } else {
+    dt->FillRect(bounds, fill);
+  }
+}
+
+
+void
 nsDisplayBackgroundColor::Paint(nsDisplayListBuilder* aBuilder,
                                 gfxContext* aCtx)
 {
   if (mColor == Color()) {
     return;
   }
 
 #if 0
--- a/layout/painting/nsDisplayList.h
+++ b/layout/painting/nsDisplayList.h
@@ -2458,22 +2458,35 @@ public:
    * completely invisible.
    */
   virtual bool ShouldBuildLayerEvenIfInvisible(nsDisplayListBuilder* aBuilder) const
   {
     return false;
   }
 
   /**
+   * Returns true if this item supports PaintWithClip, where the clipping
+   * is used directly as the primitive geometry instead of needing an explicit
+   * clip.
+   */
+  virtual bool CanPaintWithClip(const DisplayItemClip& aClip) { return false; }
+
+  /**
    * Actually paint this item to some rendering context.
    * Content outside mVisibleRect need not be painted.
    * aCtx must be set up as for nsDisplayList::Paint.
    */
   virtual void Paint(nsDisplayListBuilder* aBuilder, gfxContext* aCtx) {}
 
+  /**
+   * Same as Paint, except provides a clip to use the geometry to draw with.
+   * Must not be called unless CanPaintWithClip returned true.
+   */
+  virtual void PaintWithClip(nsDisplayListBuilder* aBuilder, gfxContext* aCtx, const DisplayItemClip& aClip) {}
+
 #ifdef MOZ_DUMP_PAINTING
   /**
    * Mark this display item as being painted via FrameLayerBuilder::DrawPaintedLayer.
    */
   bool Painted() const { return mPainted; }
 
   /**
    * Check if this display item has been painted.
@@ -4392,16 +4405,17 @@ public:
     nsDisplayItem::RestoreState();
     mColor = mState.mColor;
   }
 
   virtual LayerState GetLayerState(nsDisplayListBuilder* aBuilder,
                                    LayerManager* aManager,
                                    const ContainerLayerParameters& aParameters) override;
   virtual void Paint(nsDisplayListBuilder* aBuilder, gfxContext* aCtx) override;
+  virtual void PaintWithClip(nsDisplayListBuilder* aBuilder, gfxContext* aCtx, const DisplayItemClip& aClip) override;
   virtual already_AddRefed<Layer> BuildLayer(nsDisplayListBuilder* aBuilder,
                                              LayerManager* aManager,
                                              const ContainerLayerParameters& aContainerParameters) override;
   virtual bool CreateWebRenderCommands(mozilla::wr::DisplayListBuilder& aBuilder,
                                        mozilla::wr::IpcResourceUpdateQueue& aResources,
                                        const StackingContextHelper& aSc,
                                        mozilla::layers::WebRenderLayerManager* aManager,
                                        nsDisplayListBuilder* aDisplayListBuilder) override;
@@ -4418,16 +4432,28 @@ public:
 
   virtual nsRect GetBounds(nsDisplayListBuilder* aBuilder,
                            bool* aSnap) const override
   {
     *aSnap = true;
     return mBackgroundRect;
   }
 
+  virtual bool CanPaintWithClip(const DisplayItemClip& aClip) override
+  {
+    mozilla::StyleGeometryBox clip = mBackgroundStyle->StyleBackground()->mImage.mLayers[0].mClip;
+    if (clip == mozilla::StyleGeometryBox::Text) {
+      return false;
+    }
+    if (aClip.GetRoundedRectCount() > 1) {
+      return false;
+    }
+    return true;
+  }
+
   virtual nsDisplayItemGeometry* AllocateGeometry(nsDisplayListBuilder* aBuilder) override
   {
     return new nsDisplaySolidColorGeometry(this, aBuilder, mColor.ToABGR());
   }
 
   virtual void ComputeInvalidationRegion(nsDisplayListBuilder* aBuilder,
                                          const nsDisplayItemGeometry* aGeometry,
                                          nsRegion* aInvalidRegion) const override
--- a/layout/reftests/border-radius/reftest.list
+++ b/layout/reftests/border-radius/reftest.list
@@ -46,18 +46,18 @@ fuzzy-if(/^Windows\x20NT\x2010\.0/.test(
 fuzzy-if(true,1,20) fuzzy-if(d2d,72,196) fuzzy-if(cocoaWidget,1,180) fuzzy-if(Android,140,237) == clipping-4-canvas.html clipping-4-ref.html # bug 732535
 fuzzy-if(Android,5,54) fuzzy-if(/^Windows\x20NT\x206\.2/.test(http.oscpu),1,10) fuzzy-if(skiaContent,1,172) == clipping-4-image.html clipping-4-ref.html
 fuzzy-if(/^Windows\x20NT\x206\.2/.test(http.oscpu),1,10) fuzzy-if(skiaContent,1,77) == clipping-4-overflow-hidden.html clipping-4-ref.html
 == clipping-5-canvas.html clipping-5-refc.html
 fuzzy-if(/^Windows\x20NT\x206\.2/.test(http.oscpu),1,5) == clipping-5-image.html clipping-5-refi.html
 fuzzy-if(/^Windows\x20NT\x206\.2/.test(http.oscpu),1,5) fuzzy-if(skiaContent,1,77) == clipping-5-overflow-hidden.html clipping-5-ref.html
 fuzzy-if(/^Windows\x20NT\x206\.2/.test(http.oscpu),1,5) fuzzy-if(Android,5,21) fuzzy-if(skiaContent,1,97) == clipping-5-refi.html clipping-5-ref.html
 fuzzy-if(true,1,7) fuzzy-if(d2d,55,95) fuzzy-if(cocoaWidget,1,99) fuzzy-if(Android,99,115) fuzzy-if(skiaContent,1,77) == clipping-5-refc.html clipping-5-ref.html # bug 732535
-fuzzy-if(Android,8,469) fuzzy-if(skiaContent,21,74) fuzzy-if(winWidget,144,335) fuzzy-if(webrender&&cocoaWidget,98-98,279-279) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == clipping-6.html clipping-6-ref.html # PaintedLayer and MaskLayer with transforms that aren't identical, bug 1392106
-fuzzy-if(true,2,29) fuzzy-if(d2d,46,71) fuzzy-if(Android,255,586) fuzzy-if(skiaContent,28,96) == clipping-7.html clipping-7-ref.html # ColorLayer and MaskLayer with transforms that aren't identical. Reference image rendered without using layers (which causes fuzzy failures).
+fuzzy-if(Android,8,469) fuzzy-if(skiaContent,21,76) fuzzy-if(winWidget,144,335) fuzzy-if(webrender&&cocoaWidget,98-98,279-279) random-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)) == clipping-6.html clipping-6-ref.html # PaintedLayer and MaskLayer with transforms that aren't identical, bug 1392106
+fuzzy-if(true,2,29) fuzzy-if(d2d,46,71) fuzzy-if(Android,255,586) fuzzy-if(skiaContent,28,97) == clipping-7.html clipping-7-ref.html # ColorLayer and MaskLayer with transforms that aren't identical. Reference image rendered without using layers (which causes fuzzy failures).
 fuzzy-if(/^Windows\x20NT\x206\.2/.test(http.oscpu),1,5) == clipping-and-zindex-1.html clipping-and-zindex-1-ref.html
 fuzzy-if(cocoaWidget,1,4) fuzzy-if(d2d,59,342) fuzzy-if(d3d11&&advancedLayers&&!d2d,30,3) == intersecting-clipping-1-canvas.html intersecting-clipping-1-refc.html
 == intersecting-clipping-1-image.html intersecting-clipping-1-refi.html
 == intersecting-clipping-1-overflow-hidden.html intersecting-clipping-1-ref.html
 fuzzy-if(Android,5,105) fuzzy-if(d2d,1,20) fuzzy-if(skiaContent,1,300) == intersecting-clipping-1-refi.html intersecting-clipping-1-ref.html
 fuzzy-if(true,1,33) fuzzy-if(d2d,59,350) fuzzy-if(cocoaWidget,1,332) fuzzy-if(Android,124,440) fuzzy-if(skiaContent,1,135) fuzzy-if(d3d11&&advancedLayers,81,353) skip-if(winWidget) == intersecting-clipping-1-refc.html intersecting-clipping-1-ref.html # bug 732535 # Disable on Windows bug 1451808
 
 # Inheritance
@@ -73,17 +73,17 @@ fuzzy-if(skiaContent,1,117) == invalidat
 # test that border-radius is reduced for scrollbars
 fails-if(Android) fuzzy-if(asyncPan&&!layersGPUAccelerated,12,12) fuzzy-if(browserIsRemote&&layersGPUAccelerated&&/^Windows\x20NT\x206\.1/.test(http.oscpu),12,12) fuzzy-if(skiaContent&&!Android,1,50) fuzzy-if(gtkWidget&&layersGPUAccelerated,12,12) == scrollbar-clamping-1.html scrollbar-clamping-1-ref.html
 fails-if(Android) == scrollbar-clamping-2.html scrollbar-clamping-2-ref.html
 
 # Test for bad corner joins.
 fuzzy-if(true,1,1) == corner-joins-1.xhtml corner-joins-1-ref.xhtml
 fuzzy(255,20) random-if(winWidget) fuzzy-if(skiaContent,255,610) == corner-joins-2.xhtml corner-joins-2-ref.xhtml
 
-fuzzy-if(/^Windows\x20NT\x2010\.0/.test(http.oscpu)||/^Windows\x20NT\x206\.2/.test(http.oscpu),1,20) fuzzy-if(d2d,98,157) fuzzy-if(Android,166,400) fuzzy-if(skiaContent,59,145) == scroll-1.html scroll-1-ref.html # see bug 732535 #Bug 959166
+fuzzy-if(/^Windows\x20NT\x2010\.0/.test(http.oscpu)||/^Windows\x20NT\x206\.2/.test(http.oscpu),1,20) fuzzy-if(d2d,98,157) fuzzy-if(Android,166,400) fuzzy-if(skiaContent,59,146) == scroll-1.html scroll-1-ref.html # see bug 732535 #Bug 959166
 
 == transforms-1.html transforms-1-ref.html
 
 == zero-radius-clip-1.html zero-radius-clip-ref.html
 
 == iframe-1.html iframe-1-ref.html
 
 # Test for antialiasing gaps between background and border
--- a/layout/reftests/box-shadow/reftest.list
+++ b/layout/reftests/box-shadow/reftest.list
@@ -10,23 +10,23 @@ random != boxshadow-blur-2.html boxshado
 == tableboxshadow-tdshadow.html tableboxshadow-tdshadow-ref.html
 == boxshadow-rounding.html boxshadow-rounding-ref.html
 # One uses old path, one uses WR box shadow.
 fails-if(Android) == boxshadow-button.html boxshadow-button-ref.html
 fuzzy-if(OSX==1010,1,24) fuzzy-if(d2d,16,999) fuzzy-if(skiaContent,1,12) fuzzy-if(webrender,5-9,1560-1680) == boxshadow-large-border-radius.html boxshadow-large-border-radius-ref.html # Bug 1209649
 
 fails-if(Android) == boxshadow-fileupload.html boxshadow-fileupload-ref.html
 fuzzy-if(/^Windows\x20NT\x2010\.0/.test(http.oscpu),98,152) fuzzy-if(skiaContent,13,28) fuzzy-if(webrender,19-19,50-50) == boxshadow-inner-basic.html boxshadow-inner-basic-ref.svg
-random-if(layersGPUAccelerated) == boxshadow-mixed.html boxshadow-mixed-ref.html
-== boxshadow-mixed-2.html boxshadow-mixed-2-ref.html
-random-if(d2d) fuzzy-if(skiaContent,1,100) fuzzy-if(webrender,127,3528) == boxshadow-rounded-spread.html boxshadow-rounded-spread-ref.html
+fuzzy-if(skiaContent,1,17) random-if(layersGPUAccelerated) == boxshadow-mixed.html boxshadow-mixed-ref.html
+fuzzy-if(skiaContent,1,17) == boxshadow-mixed-2.html boxshadow-mixed-2-ref.html
+random-if(d2d) fuzzy-if(skiaContent,1,212) fuzzy-if(webrender,127,3528) == boxshadow-rounded-spread.html boxshadow-rounded-spread-ref.html
 fuzzy-if(skiaContent,1,50) == boxshadow-dynamic.xul boxshadow-dynamic-ref.xul
-random-if(d2d) == boxshadow-onecorner.html boxshadow-onecorner-ref.html
-random-if(d2d) == boxshadow-twocorners.html boxshadow-twocorners-ref.html
-random-if(d2d) == boxshadow-threecorners.html boxshadow-threecorners-ref.html
+random-if(d2d) fuzzy-if(skiaContent,1,14) == boxshadow-onecorner.html boxshadow-onecorner-ref.html
+random-if(d2d) fuzzy-if(skiaContent,1,22) == boxshadow-twocorners.html boxshadow-twocorners-ref.html
+random-if(d2d) fuzzy-if(skiaContent,1,36) == boxshadow-threecorners.html boxshadow-threecorners-ref.html
 fuzzy(2,440) fails-if(webrender) == boxshadow-skiprect.html boxshadow-skiprect-ref.html
 == boxshadow-opacity.html boxshadow-opacity-ref.html
 == boxshadow-color-rounding.html boxshadow-color-rounding-ref.html
 == boxshadow-color-rounding-middle.html boxshadow-color-rounding-middle-ref.html
 fuzzy(3,500) fuzzy-if(d2d,2,1080) == boxshadow-border-radius-int.html boxshadow-border-radius-int-ref.html
 == boxshadow-inset-neg-spread.html about:blank
 == boxshadow-inset-neg-spread2.html boxshadow-inset-neg-spread2-ref.html
 fuzzy(26,3610) fuzzy-if(d2d,26,5910) == boxshadow-rotated.html boxshadow-rotated-ref.html # Bug 1211264
--- a/layout/reftests/bugs/reftest.list
+++ b/layout/reftests/bugs/reftest.list
@@ -1435,17 +1435,17 @@ fuzzy-if(skiaContent,1,3) == 521525-1.ht
 == 521539-1.html 521539-1-ref.html
 == 521542-1.xhtml 521542-1-ref.xhtml
 == 521602.html 521602-ref.html
 == 521685-1.html 521685-1-ref.html
 == 522632-1.html 522632-1-ref.html
 == 523096-1.html 523096-1-ref.html
 random-if(d2d) == 523468-1.html 523468-1-ref.html
 == 524175-1.html 524175-1-ref.html
-fuzzy-if(skiaContent,1,50) == 526463-1.html 526463-1-ref.html
+fuzzy-if(skiaContent,5,50) == 526463-1.html 526463-1-ref.html
 == 527464-1.html 527464-ref.html
 == 528038-1a.html 528038-1-ref.html
 == 528038-1b.html 528038-1-ref.html
 == 528038-1c.html 528038-1-ref.html
 == 528038-1d.html 528038-1-ref.html
 == 528038-1e.html 528038-1-ref.html
 == 528038-1f.html 528038-1-ref.html
 == 528038-2.html 528038-2-ref.html
@@ -2065,17 +2065,17 @@ fuzzy-if(!(webrender&&gtkWidget),1-2,175
 test-pref(font.size.systemFontScale,200) == 1412743.html 1412743-ref.html
 == 1419820-1.html 1419820-1-ref.html
 == 1420946-1.html 1420946-1-ref.html
 == 1422393.html 1422393-ref.html
 == 1424177.html 1424177-ref.html
 == 1424680.html 1424680-ref.html
 == 1424798-1.html 1424798-ref.html
 fuzzy(74,2234) random-if(webrender) == 1425243-1.html 1425243-1-ref.html
-fuzzy-if(Android,66,574) fuzzy-if(d2d,89,777) fuzzy-if(!Android&&!d2d,1,31219) == 1425243-2.html 1425243-2-ref.html
+fuzzy-if(Android,66,574) fuzzy-if(d2d,89,777) fuzzy-if(!Android&&!d2d,1,31341) == 1425243-2.html 1425243-2-ref.html
 == 1430869.html 1430869-ref.html
 == 1432541.html 1432541-ref.html
 pref(layout.css.moz-document.url-prefix-hack.enabled,true) == 1446470.html 1035091-ref.html
 pref(layout.css.moz-document.url-prefix-hack.enabled,false) == 1446470-2.html 1035091-ref.html
 test-pref(layout.css.prefixes.gradients,false) == 1451874.html 1451874-ref.html
 == 1456111-1.html about:blank
 test-pref(layout.css.contain.enabled,false) == 1466008.html 1466008-ref.html
 fuzzy(1,625) == 1466638-1.html 1466638-1-ref.html
--- a/layout/reftests/css-shapes/reftest.list
+++ b/layout/reftests/css-shapes/reftest.list
@@ -1,9 +1,9 @@
-fuzzy-if(/^Windows\x20NT\x2010\.0/.test(http.oscpu),16,4) pref(layout.css.shape-outside.enabled,true) == dynamic-shape-outside-1.html dynamic-shape-outside-1-ref.html
+fuzzy-if(skiaContent,1,161) fuzzy-if(/^Windows\x20NT\x2010\.0/.test(http.oscpu),16,161) pref(layout.css.shape-outside.enabled,true) == dynamic-shape-outside-1.html dynamic-shape-outside-1-ref.html
 
 == shape-outside-empty-circle-1.html shape-outside-empty-point-ref.html
 == shape-outside-empty-circle-2.html shape-outside-empty-circle-ref.html
 == shape-outside-empty-circle-3.html shape-outside-empty-nothing-ref.html
 
 == shape-outside-empty-ellipse-1.html shape-outside-empty-point-ref.html
 == shape-outside-empty-ellipse-2.html shape-outside-empty-circle-ref.html
 == shape-outside-empty-ellipse-3.html shape-outside-empty-point-ref.html
--- a/layout/reftests/image-element/reftest.list
+++ b/layout/reftests/image-element/reftest.list
@@ -15,19 +15,19 @@ fuzzy-if(webrender&&!gtkWidget,117-129,5
 random-if(d2d) == element-paint-transform-02.html element-paint-transform-02-ref.html # bug 587133
 fuzzy-if(d2d&&/^Windows\x20NT\x206\.1/.test(http.oscpu),16,90) == element-paint-background-size-01.html element-paint-background-size-01-ref.html
 == element-paint-background-size-02.html element-paint-background-size-02-ref.html
 fuzzy-if(skiaContent,255,4) == element-paint-transform-repeated.html element-paint-transform-repeated-ref.html
 fuzzy-if(d2d,255,24) == element-paint-transform-03.html element-paint-transform-03-ref.html
 fuzzy-if(asyncPan,2,140) fuzzy-if(skiaContent,3,106) fuzzy-if(webrender&&!gtkWidget,134-222,1323-1588) == element-paint-native-widget.html element-paint-native-widget-ref.html   # in -ref the scrollframe is active and layerized differently with APZ
 fails-if(usesRepeatResampling&&!(webrender&&winWidget)) == element-paint-subimage-sampling-restriction.html about:blank
 == element-paint-clippath.html element-paint-clippath-ref.html
-fuzzy-if(webrender,35-35,706-706) == element-paint-sharpness-01a.html element-paint-sharpness-01b.html
+fuzzy-if(webrender,36-36,702-702) == element-paint-sharpness-01a.html element-paint-sharpness-01b.html
 fuzzy-if(skiaContent,1,326) == element-paint-sharpness-01b.html element-paint-sharpness-01c.html
-fuzzy-if(webrender,35-35,706-706) == element-paint-sharpness-01c.html element-paint-sharpness-01d.html
+fuzzy-if(webrender,36-36,702-702) == element-paint-sharpness-01c.html element-paint-sharpness-01d.html
 == element-paint-sharpness-02a.html element-paint-sharpness-02b.html
 == element-paint-sharpness-02b.html element-paint-sharpness-02c.html
 == element-paint-paintserversize-rounding-01.html element-paint-paintserversize-rounding-01-ref.html
 fuzzy-if(skiaContent,187,1191) == element-paint-paintserversize-rounding-02.html element-paint-paintserversize-rounding-02-ref.html # Linux32 from GCC update
 == element-paint-multiple-backgrounds-01a.html element-paint-multiple-backgrounds-01-ref.html
 == element-paint-multiple-backgrounds-01b.html element-paint-multiple-backgrounds-01-ref.html
 == element-paint-multiple-backgrounds-01c.html element-paint-multiple-backgrounds-01-ref.html
 == gradient-html-01.html gradient-html-01-ref.svg
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/css/compositing/mix-blend-mode/mix-blend-mode-blended-element-overflow-hidden-and-border-radius.html.ini
@@ -0,0 +1,3 @@
+[mix-blend-mode-blended-element-overflow-hidden-and-border-radius.html]
+  expected: 
+    if os == "linux": FAIL
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/css/compositing/mix-blend-mode/mix-blend-mode-intermediate-element-overflow-hidden-and-border-radius.html.ini
@@ -0,0 +1,3 @@
+[mix-blend-mode-intermediate-element-overflow-hidden-and-border-radius.html]
+  expected: 
+    if os == "linux": FAIL
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/css/compositing/mix-blend-mode/mix-blend-mode-parent-with-border-radius.html.ini
@@ -0,0 +1,3 @@
+[mix-blend-mode-parent-with-border-radius.html]
+  expected: 
+    if os == "linux": 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,3 +1,4 @@
 [clip-path-ellipse-001.html]
   expected:
     if webrender: FAIL
+    if os == "linux": 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,4 +1,5 @@
 [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
--- 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,4 +1,5 @@
 [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
--- 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,4 +1,5 @@
 [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
--- 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,4 +1,5 @@
 [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
--- 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,4 +1,5 @@
 [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
--- 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,4 +1,5 @@
 [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
--- 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,4 +1,5 @@
 [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