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
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.