Update www/firefox to version 73.0_2,1
[dports.git] / www / firefox / files / patch-bug1504834_comment9
1 https://bugzilla.mozilla.org/show_bug.cgi?id=1504834#c9
2 https://bugzilla.mozilla.org/attachment.cgi?id=9111146
3 mozilla-bmo1504834-part3.patch
4
5
6 # HG changeset patch
7 # Parent  aecb4600e5da17443b224c79eee178c1d8e155e3
8 For FF68, AntiAliasing of XULTexts seem to be broken on big endian (s390x). Text and icons of the sandwich-menu to the
9 right of the address bar, as well as plugin-windows appears transparant, which usually means unreadable (white on white).
10
11 diff -r aecb4600e5da gfx/skia/skia/include/private/SkNx.h
12 --- gfx/skia/skia/include/private/SkNx.h        Tue Aug 20 09:46:55 2019 +0200
13 +++ gfx/skia/skia/include/private/SkNx.h        Mon Sep 09 10:04:06 2019 +0200
14 @@ -238,7 +238,18 @@
15      AI SkNx operator*(const SkNx& y) const { return fVal * y.fVal; }
16      AI SkNx operator/(const SkNx& y) const { return fVal / y.fVal; }
17  
18 +    // On Big endian the commented out variant doesn't work,
19 +    // and honestly, I have no idea why it exists in the first place.
20 +    // The reason its broken is, I think, that it defaults to the double-variant of ToBits()
21 +    // which gets a 64-bit integer, and FromBits returns 32-bit,
22 +    // cutting off the wrong half again.
23 +    // Overall, I see no reason to have ToBits and FromBits at all (even for floats/doubles).
24 +    // Still we are only "fixing" this for big endian and leave little endian alone (never touch a running system)
25 +#ifdef SK_CPU_BENDIAN
26 +    AI SkNx operator&(const SkNx& y) const { return fVal & y.fVal; }
27 +#else
28      AI SkNx operator&(const SkNx& y) const { return FromBits(ToBits(fVal) & ToBits(y.fVal)); }
29 +#endif
30      AI SkNx operator|(const SkNx& y) const { return FromBits(ToBits(fVal) | ToBits(y.fVal)); }
31      AI SkNx operator^(const SkNx& y) const { return FromBits(ToBits(fVal) ^ ToBits(y.fVal)); }
32  
33 diff -r aecb4600e5da gfx/skia/skia/src/opts/SkBlitMask_opts.h
34 --- gfx/skia/skia/src/opts/SkBlitMask_opts.h    Tue Aug 20 09:46:55 2019 +0200
35 +++ gfx/skia/skia/src/opts/SkBlitMask_opts.h    Mon Sep 09 10:04:06 2019 +0200
36 @@ -203,7 +203,13 @@
37              //   ~~~>
38              // a = 1*aa + d(1-1*aa) = aa + d(1-aa)
39              // c = 0*aa + d(1-1*aa) =      d(1-aa)
40 +
41 +            // For big endian we have to swap the alpha-mask from 0,0,0,255 to 255,0,0,0
42 +#ifdef SK_CPU_BENDIAN
43 +            return Sk4px(Sk16b(aa) & Sk16b(255,0,0,0, 255,0,0,0, 255,0,0,0, 255,0,0,0))
44 +#else
45              return Sk4px(Sk16b(aa) & Sk16b(0,0,0,255, 0,0,0,255, 0,0,0,255, 0,0,0,255))
46 +#endif
47                   + d.approxMulDiv255(aa.inv());
48          };
49          while (h --> 0) {