Bug 1458121 - Don't try to layerize when we have a clip-path mask as well as rounded rect clipping. r?mstange draft
authorMatt Woodrow <mwoodrow@mozilla.com>
Thu, 21 Jun 2018 12:43:22 +1200
changeset 808862 5fbcc8a8ffbb869c02f4af7e13315e227e7115a5
parent 808846 25c900a13a73d75034b2be78f22de85e14b4b2b7
child 808863 3edfefd36ea77575b6de517d004a0d424569f325
push id113529
push usermwoodrow@mozilla.com
push dateThu, 21 Jun 2018 00:44:05 +0000
reviewersmstange
bugs1458121
milestone62.0a1
Bug 1458121 - Don't try to layerize when we have a clip-path mask as well as rounded rect clipping. r?mstange MozReview-Commit-ID: GhOay2a6z9t
layout/base/crashtests/1458121.html
layout/base/crashtests/crashtests.list
layout/painting/nsDisplayList.cpp
new file mode 100644
--- /dev/null
+++ b/layout/base/crashtests/1458121.html
@@ -0,0 +1,23 @@
+<script>
+window.requestIdleCallback(function(){
+  document.documentElement.style.display="none";
+  document.documentElement.getBoundingClientRect();
+  document.documentElement.style.display="";
+});
+</script>
+<style>
+body {
+  -webkit-border-radius: 16px;
+  overflow-x: hidden;
+  -webkit-filter: blur(0px);
+  width: 1em;
+}
+:root {
+  scroll-snap-destination: left top 36%;
+}
+#a {
+  overflow: scroll;
+  clip-path: url(#x);
+}
+</style>
+<dl id="a">|<dialog open>
--- a/layout/base/crashtests/crashtests.list
+++ b/layout/base/crashtests/crashtests.list
@@ -530,15 +530,16 @@ load 1437155.html
 pref(dom.webcomponents.shadowdom.enabled,true) load 1439016.html
 load 1442506.html
 load 1443027-1.html
 load 1448841-1.html
 load 1452839.html
 load 1453196.html
 load 1453342.html
 load 1453702.html
+load 1458121.html
 pref(dom.webcomponents.shadowdom.enabled,true) load 1461749.html
 load 1461812.html
 load 1462412.html
 load 1463940.html
 pref(dom.webcomponents.shadowdom.enabled,true) HTTP load 1464641.html
 load 1464737.html
 load 1467964.html
--- a/layout/painting/nsDisplayList.cpp
+++ b/layout/painting/nsDisplayList.cpp
@@ -9447,16 +9447,22 @@ bool nsDisplayMask::CanPaintOnMaskLayer(
   if (!nsSVGIntegrationUtils::IsMaskResourceReady(mFrame)) {
     return false;
   }
 
   if (gfxPrefs::DrawMaskLayer()) {
     return false;
   }
 
+  // We don't currently support this item creating a mask
+  // for both the clip-path, and rounded rect clipping.
+  if (GetClip().GetRoundedRectCount() != 0) {
+    return false;
+  }
+
   return true;
 }
 
 bool nsDisplayMask::ComputeVisibility(nsDisplayListBuilder* aBuilder,
                                       nsRegion* aVisibleRegion)
 {
   // Our children may be made translucent or arbitrarily deformed so we should
   // not allow them to subtract area from aVisibleRegion.