Bug 1454105 - Do not flatten opacity for IB splits r=mattwoodrow
authorMiko Mynttinen <mikokm@gmail.com>
Tue, 24 Apr 2018 17:17:04 +0200
changeset 469261 e561ff49b7cdd86d4cf437b98c986de76847f0dd
parent 469260 85a3c207b99e3cbf3c3d4fd81906f823920bb1c1
child 469262 f9c00fb269a09a7944eb0be45eafc719f621d129
push id9165
push userasasaki@mozilla.com
push dateThu, 26 Apr 2018 21:04:54 +0000
treeherdermozilla-beta@064c3804de2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow
bugs1454105
milestone61.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1454105 - Do not flatten opacity for IB splits r=mattwoodrow MozReview-Commit-ID: 67nBRgzdSZ6
layout/painting/crashtests/1454105-1.html
layout/painting/crashtests/crashtests.list
layout/painting/nsDisplayList.cpp
layout/reftests/bugs/reftest.list
new file mode 100644
--- /dev/null
+++ b/layout/painting/crashtests/1454105-1.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="UTF-8">
+<style>
+#a {
+  filter: brightness(1);
+  border-style: solid;
+}
+#b {
+  opacity: 0.2;
+}
+</style>
+</head>
+<body>
+<span id="b">
+	<span id="a">
+		<div></div>
+	</span>
+</span>
+</body>
+</html>
--- a/layout/painting/crashtests/crashtests.list
+++ b/layout/painting/crashtests/crashtests.list
@@ -4,8 +4,9 @@ load 1413073-1.html
 load 1413073-2.html
 load 1405881-1.html
 load 1418177-1.html
 load 1418722-1.html
 load 1419917.html
 load 1425271-1.html
 load 1428906-1.html
 skip-if(webrender) load 1430589-1.html # bug 1421825 for webrender
+load 1454105-1.html
--- a/layout/painting/nsDisplayList.cpp
+++ b/layout/painting/nsDisplayList.cpp
@@ -6592,18 +6592,18 @@ nsDisplayOpacity::ApplyOpacityToChildren
 }
 
 bool
 nsDisplayOpacity::ShouldFlattenAway(nsDisplayListBuilder* aBuilder)
 {
   // ShouldFlattenAway() should be called only once during painting.
   MOZ_ASSERT(!mOpacityAppliedToChildren);
 
-  if (mFrame->GetPrevContinuation() ||
-      mFrame->GetNextContinuation()) {
+  if (mFrame->GetPrevContinuation() || mFrame->GetNextContinuation() ||
+      mFrame->HasAnyStateBits(NS_FRAME_PART_OF_IBSPLIT)) {
     // If we've been split, then we might need to merge, so
     // don't flatten us away.
     return false;
   }
 
   if (NeedsActiveLayer(aBuilder, mFrame) || mOpacity == 0.0) {
     // If our opacity is zero then we'll discard all descendant display items
     // except for layer event regions, so there's no point in doing this
--- a/layout/reftests/bugs/reftest.list
+++ b/layout/reftests/bugs/reftest.list
@@ -1682,17 +1682,17 @@ HTTP == 652991-3.html 652991-3-ref.html
 HTTP == 652991-4.html 652991-4-ref.html
 fuzzy-if(skiaContent,1,5) == 653930-1.html 653930-1-ref.html
 == 654057-1.html 654057-1-ref.html
 fuzzy-if(skiaContent,1,65536) == 654950-1.html 654950-1-ref.html # Quartz alpha blending doesn't match GL alpha blending
 == 655549-1.html 655549-1-ref.html
 == 655836-1.html 655836-1-ref.html
 != 656875.html about:blank
 == 658952.html 658952-ref.html
-fuzzy-if(skiaContent,7,3500) fuzzy-if(webrender&&winWidget,37-37,777-777) == 660682-1.html 660682-1-ref.html
+fuzzy-if(skiaContent,10,919) == 660682-1.html 660682-1-ref.html
 fuzzy-if(d2d,1,256) skip-if(Android) fuzzy-if(skiaContent,1,68000) == 664127-1.xul 664127-1-ref.xul # Android: Intermittent failures - bug 1019131
 == 665597-1.html 665597-1-ref.html
 == 665597-2.html 665597-2-ref.html
 == 667079-1.html 667079-1-ref.html
 == 668319-1.xul about:blank
 != 669015-1.xul 669015-1-notref.xul
 skip-if(azureSkiaGL) == 670442-1.html 670442-1-ref.html
 == 670467-1.html 670467-1-ref.html