summaryrefslogtreecommitdiffstats
path: root/gfx/cairo/quartz-mask-non-OVER.patch
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /gfx/cairo/quartz-mask-non-OVER.patch
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'gfx/cairo/quartz-mask-non-OVER.patch')
-rw-r--r--gfx/cairo/quartz-mask-non-OVER.patch80
1 files changed, 80 insertions, 0 deletions
diff --git a/gfx/cairo/quartz-mask-non-OVER.patch b/gfx/cairo/quartz-mask-non-OVER.patch
new file mode 100644
index 000000000..a6d94be12
--- /dev/null
+++ b/gfx/cairo/quartz-mask-non-OVER.patch
@@ -0,0 +1,80 @@
+From: Robert O'Callahan <robert@ocallahan.org>
+Bug 579985. Using CGContextSetAlpha to implement mask alpha doesn't work for some operators. r=jrmuizel,a=blocking
+
+diff --git a/gfx/cairo/cairo/src/cairo-quartz-surface.c b/gfx/cairo/cairo/src/cairo-quartz-surface.c
+--- a/gfx/cairo/cairo/src/cairo-quartz-surface.c
++++ b/gfx/cairo/cairo/src/cairo-quartz-surface.c
+@@ -2734,17 +2734,19 @@ _cairo_quartz_surface_mask (void *abstra
+
+ if (IS_EMPTY(surface))
+ return CAIRO_STATUS_SUCCESS;
+
+ rv = _cairo_surface_clipper_set_clip (&surface->clipper, clip);
+ if (unlikely (rv))
+ return rv;
+
+- if (mask->type == CAIRO_PATTERN_TYPE_SOLID) {
++ /* Using CGContextSetAlpha to implement mask alpha doesn't work for all operators. */
++ if (mask->type == CAIRO_PATTERN_TYPE_SOLID &&
++ op == CAIRO_OPERATOR_OVER) {
+ /* This is easy; we just need to paint with the alpha. */
+ cairo_solid_pattern_t *solid_mask = (cairo_solid_pattern_t *) mask;
+
+ CGContextSetAlpha (surface->cgContext, solid_mask->color.alpha);
+ rv = _cairo_quartz_surface_paint (surface, op, source, clip);
+ CGContextSetAlpha (surface->cgContext, 1.0);
+
+ return rv;
+diff --git a/layout/reftests/bugs/579985-1-ref.html b/layout/reftests/bugs/579985-1-ref.html
+new file mode 100644
+--- /dev/null
++++ b/layout/reftests/bugs/579985-1-ref.html
+@@ -0,0 +1,6 @@
++<!DOCTYPE HTML>
++<html>
++<body>
++<div style="width:100px; height:100px; background:blue; opacity:0.5;">Hello</div>
++</body>
++</html>
+diff --git a/layout/reftests/bugs/579985-1.html b/layout/reftests/bugs/579985-1.html
+new file mode 100644
+--- /dev/null
++++ b/layout/reftests/bugs/579985-1.html
+@@ -0,0 +1,16 @@
++<!DOCTYPE HTML>
++<html class="reftest-wait">
++<head>
++<script>
++function doTest() {
++ var d = document.getElementById("d");
++ d.style.opacity = 0.75;
++ document.documentElement.removeAttribute("class");
++}
++window.addEventListener("MozReftestInvalidate", doTest, false);
++</script>
++</head>
++<body>
++<div id="d" style="width:100px; height:100px; background:blue;">Hello</div>
++</body>
++</html>
+diff --git a/layout/reftests/bugs/reftest.list b/layout/reftests/bugs/reftest.list
+--- a/layout/reftests/bugs/reftest.list
++++ b/layout/reftests/bugs/reftest.list
+@@ -1499,16 +1499,17 @@ random-if(layersGPUAccelerated) == 56499
+ == 571347-3.html 571347-3-ref.html
+ == 572598-1.html 572598-ref.html
+ == 574898-1.html 574898-ref.html
+ == 579655-1.html 579655-1-ref.html
+ == 577838-1.html 577838-1-ref.html
+ == 577838-2.html 577838-2-ref.html
+ random-if(layersGPUAccelerated) == 579323-1.html 579323-1-ref.html
+ == 579349-1.html 579349-1-ref.html
++== 579985-1.html 579985-1-ref.html
+ == 580160-1.html 580160-1-ref.html
+ HTTP(..) == 580863-1.html 580863-1-ref.html
+ random-if(layersGPUAccelerated) == 581317-1.html 581317-1-ref.html
+ == 581579-1.html 581579-1-ref.html
+ == 582037-1a.html 582037-1-ref.html
+ == 582037-1b.html 582037-1-ref.html
+ == 582037-2a.html 582037-2-ref.html
+ == 582037-2b.html 582037-2-ref.html