MozillaFirefox/mozilla-bmo1504834-part1.patch
Wolfgang Rosenauer f2f6b49a7f ------------------------------------------------------------------
- Firefox 130.0.1 Release
  * Enterprise: Added an enterprise policy to disable the
    *Firefox Labs* section in *Settings*. (bmo#1911826)
  * Fixed a recent regression causing some UI elements to
    be rendered as left-to-right instead of right-to-left for
    users of our Saraiki localization. (bmo#1917175)
  * Linux: Fixed black rendering of AVIF images when
    Firefox is built with GCC. (bmo#1916038)
- removed obsolete patches
  mozilla-bmo1916038.patch

- Mozilla Firefox 130.0
  MFSA 2024-39 (bsc#1229821)
  * CVE-2024-8385 (bmo#1911909)
    WASM type confusion involving ArrayTypes
  * CVE-2024-8381 (bmo#1912715)
    Type confusion when looking up a property name in a "with" block
  * CVE-2024-8388 (bmo#1902996, bmo#1839074, bmo#1865413, bmo#1868970,
    bmo#1873367, bmo#1877820, bmo#1884642, bmo#1886469, bmo#1894326,
    bmo#1894891, bmo#1897648)
    Fullscreen notice on Android could be hidden under various
    panels and OS prompts
  * CVE-2024-8382 (bmo#1906744)
    Internal event interfaces were exposed to web content when
    browser EventHandler listener callbacks ran
  * CVE-2024-8383 (bmo#1908496)
    Firefox did not ask before openings news: links in an
    external application
  * CVE-2024-8384 (bmo#1911288)

OBS-URL: https://build.opensuse.org/package/show/mozilla:Factory/MozillaFirefox?expand=0&rev=1174
2024-09-19 16:43:14 +00:00

130 lines
4.0 KiB
Diff

# HG changeset patch
# Parent 125a78208d2cef58191a0328ffe894dd14c6b146
Taken from https://bugzilla.mozilla.org/show_bug.cgi?id=1504834
diff --git a/gfx/2d/DrawTargetSkia.cpp b/gfx/2d/DrawTargetSkia.cpp
--- a/gfx/2d/DrawTargetSkia.cpp
+++ b/gfx/2d/DrawTargetSkia.cpp
@@ -151,17 +151,18 @@ static IntRect CalculateSurfaceBounds(co
if (!sampledBounds.ToIntRect(&bounds)) {
return surfaceBounds;
}
return surfaceBounds.Intersect(bounds);
}
static const int kARGBAlphaOffset =
- SurfaceFormat::A8R8G8B8_UINT32 == SurfaceFormat::B8G8R8A8 ? 3 : 0;
+ 0; // Skia is always BGRA SurfaceFormat::A8R8G8B8_UINT32 ==
+ // SurfaceFormat::B8G8R8A8 ? 3 : 0;
static bool VerifyRGBXFormat(uint8_t* aData, const IntSize& aSize,
const int32_t aStride, SurfaceFormat aFormat) {
if (aFormat != SurfaceFormat::B8G8R8X8 || aSize.IsEmpty()) {
return true;
}
// We should've initialized the data to be opaque already
// On debug builds, verify that this is actually true.
diff --git a/gfx/2d/Types.h b/gfx/2d/Types.h
--- a/gfx/2d/Types.h
+++ b/gfx/2d/Types.h
@@ -84,28 +84,21 @@ enum class SurfaceFormat : int8_t {
YUV422, // Single plane YUV 4:2:2 interleaved as Y`0 Cb Y`1 Cr.
HSV,
Lab,
Depth,
// This represents the unknown format.
UNKNOWN, // TODO: Replace uses with Maybe<SurfaceFormat>.
-// The following values are endian-independent synonyms. The _UINT32 suffix
-// indicates that the name reflects the layout when viewed as a uint32_t
-// value.
-#if MOZ_LITTLE_ENDIAN()
+ // The following values are endian-independent synonyms. The _UINT32 suffix
+ // indicates that the name reflects the layout when viewed as a uint32_t
+ // value.
A8R8G8B8_UINT32 = B8G8R8A8, // 0xAARRGGBB
X8R8G8B8_UINT32 = B8G8R8X8, // 0x00RRGGBB
-#elif MOZ_BIG_ENDIAN()
- A8R8G8B8_UINT32 = A8R8G8B8, // 0xAARRGGBB
- X8R8G8B8_UINT32 = X8R8G8B8, // 0x00RRGGBB
-#else
-# error "bad endianness"
-#endif
// The following values are OS and endian-independent synonyms.
//
// TODO(aosmond): When everything blocking bug 1581828 has been resolved, we
// can make this use R8B8G8A8 and R8B8G8X8 for non-Windows platforms.
OS_RGBA = A8R8G8B8_UINT32,
OS_RGBX = X8R8G8B8_UINT32
};
diff --git a/gfx/skia/skia/modules/skcms/skcms.cc b/gfx/skia/skia/modules/skcms/skcms.cc
--- a/gfx/skia/skia/modules/skcms/skcms.cc
+++ b/gfx/skia/skia/modules/skcms/skcms.cc
@@ -26,16 +26,18 @@
// it'd be a lot slower. But we want all those headers included so we
// can use their features after runtime checks later.
#include <smmintrin.h>
#include <avxintrin.h>
#include <avx2intrin.h>
#include <avx512fintrin.h>
#include <avx512dqintrin.h>
#endif
+#else
+ #define SKCMS_PORTABLE
#endif
using namespace skcms_private;
static bool sAllowRuntimeCPUDetection = true;
void skcms_DisableRuntimeCPUDetection() {
sAllowRuntimeCPUDetection = false;
@@ -319,30 +321,38 @@ enum {
skcms_Signature_sf32 = 0x73663332,
// XYZ is also a PCS signature, so it's defined in skcms.h
// skcms_Signature_XYZ = 0x58595A20,
};
static uint16_t read_big_u16(const uint8_t* ptr) {
uint16_t be;
memcpy(&be, ptr, sizeof(be));
-#if defined(_MSC_VER)
- return _byteswap_ushort(be);
+#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
+ return be;
#else
- return __builtin_bswap16(be);
+ #if defined(_MSC_VER)
+ return _byteswap_ushort(be);
+ #else
+ return __builtin_bswap16(be);
+ #endif
#endif
}
static uint32_t read_big_u32(const uint8_t* ptr) {
uint32_t be;
memcpy(&be, ptr, sizeof(be));
-#if defined(_MSC_VER)
- return _byteswap_ulong(be);
+#if __BYTE_ORDER == __ORDER_BIG_ENDIAN__
+ return be;
#else
- return __builtin_bswap32(be);
+ #if defined(_MSC_VER)
+ return _byteswap_ulong(be);
+ #else
+ return __builtin_bswap32(be);
+ #endif
#endif
}
static int32_t read_big_i32(const uint8_t* ptr) {
return (int32_t)read_big_u32(ptr);
}
static float read_big_fixed(const uint8_t* ptr) {