Bug 1458121 - Don't try to layerize when we have a clip-path mask as well as rounded rect clipping. r=mstange
authorMatt Woodrow <mwoodrow@mozilla.com>
Thu, 21 Jun 2018 12:43:22 +1200
changeset 815588 78e841de1a73cc8a234810e791475d95b2956d48
parent 815516 ffb7b5015fc331bdc4c5e6ab52b9de669faa8864
child 815589 dfc8ad9b2244b8112340e44368a8e43b523c82e6
push id115563
push userbmo:ntim.bugs@gmail.com
push dateMon, 09 Jul 2018 12:45:57 +0000
reviewersmstange
bugs1458121
milestone63.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
@@ -533,16 +533,17 @@ 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 1467688.html
 load 1467964.html
--- a/layout/painting/nsDisplayList.cpp
+++ b/layout/painting/nsDisplayList.cpp
@@ -9245,16 +9245,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.