Bug 1519636 - Reformat recent changes to the Google coding style r=geckoview-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,nalexander,gstoll,tcampbell,janv,julienw

Updated with clang-format version 19.1.7 (taskcluster-DYvBxDZJRVqTi8E7pTSJAQ)

Differential Revision: https://phabricator.services.mozilla.com/D249880
This commit is contained in:
Sylvestre Ledru
2025-05-17 19:07:22 +00:00
committed by sledru@mozilla.com
parent 1df22ac023
commit 8ae54ea4f9
331 changed files with 2084 additions and 2460 deletions

View File

@@ -12,12 +12,12 @@ namespace mozilla {
namespace image {
#define IMAGEBLOCKER_CONTRACTID "@mozilla.org/image-blocker-content-policy;1"
#define IMAGEBLOCKER_CID \
{ /* f6fcd651-164b-4416-b001-9c8c393fd93b */ \
0xf6fcd651, 0x164b, 0x4416, { \
0xb0, 0x01, 0x9c, 0x8c, 0x39, 0x3f, 0xd9, 0x3b \
} \
}
#define IMAGEBLOCKER_CID \
{/* f6fcd651-164b-4416-b001-9c8c393fd93b */ \
0xf6fcd651, \
0x164b, \
0x4416, \
{0xb0, 0x01, 0x9c, 0x8c, 0x39, 0x3f, 0xd9, 0x3b}}
class ImageBlocker final : public nsIContentPolicy {
~ImageBlocker() = default;

View File

@@ -47,12 +47,12 @@
class nsIInputStream;
class nsIRequest;
#define NS_RASTERIMAGE_CID \
{ /* 376ff2c1-9bf6-418a-b143-3340c00112f7 */ \
0x376ff2c1, 0x9bf6, 0x418a, { \
0xb1, 0x43, 0x33, 0x40, 0xc0, 0x01, 0x12, 0xf7 \
} \
}
#define NS_RASTERIMAGE_CID \
{/* 376ff2c1-9bf6-418a-b143-3340c00112f7 */ \
0x376ff2c1, \
0x9bf6, \
0x418a, \
{0xb1, 0x43, 0x33, 0x40, 0xc0, 0x01, 0x12, 0xf7}}
/**
* Handles static and animated image containers.

View File

@@ -120,15 +120,15 @@ static GdkRGBA GetForegroundColor(nsIMozIconURI* aIconURI) {
}
return dark ? mozilla::ColorScheme::Dark : mozilla::ColorScheme::Light;
}();
auto color = mozilla::LookAndFeel::Color(mozilla::LookAndFeel::ColorID::Windowtext, scheme, mozilla::LookAndFeel::UseStandins::No);
auto ToGdk = [](uint8_t aGecko) {
return aGecko / 255.0;
};
return GdkRGBA {
.red = ToGdk(NS_GET_R(color)),
.green = ToGdk(NS_GET_G(color)),
.blue = ToGdk(NS_GET_B(color)),
.alpha = ToGdk(NS_GET_A(color)),
auto color = mozilla::LookAndFeel::Color(
mozilla::LookAndFeel::ColorID::Windowtext, scheme,
mozilla::LookAndFeel::UseStandins::No);
auto ToGdk = [](uint8_t aGecko) { return aGecko / 255.0; };
return GdkRGBA{
.red = ToGdk(NS_GET_R(color)),
.green = ToGdk(NS_GET_G(color)),
.blue = ToGdk(NS_GET_B(color)),
.alpha = ToGdk(NS_GET_A(color)),
};
}
@@ -353,5 +353,4 @@ nsresult nsIconChannel::Init(nsIURI* aURI) {
return StreamToChannel(stream.forget(), aURI, getter_AddRefs(mRealChannel));
}
void nsIconChannel::Shutdown() {
}
void nsIconChannel::Shutdown() {}

View File

@@ -94,7 +94,6 @@ nsMozIconURI::GetSpec(nsACString& aSpec) {
aSpec.Append(buf);
}
if (!mContentType.IsEmpty()) {
aSpec += "&contentType=";
aSpec += mContentType.get();

View File

@@ -14,12 +14,12 @@
#include "nsIURIMutator.h"
#include "nsISerializable.h"
#define NS_THIS_ICONURI_IMPLEMENTATION_CID \
{ /* 0b9bb0c2-fee6-470b-b9b9-9fd9462b5e19 */ \
0x5c3e417f, 0xb686, 0x4105, { \
0x86, 0xe7, 0xf9, 0x1b, 0xac, 0x97, 0x4d, 0x5c \
} \
}
#define NS_THIS_ICONURI_IMPLEMENTATION_CID \
{/* 0b9bb0c2-fee6-470b-b9b9-9fd9462b5e19 */ \
0x5c3e417f, \
0xb686, \
0x4105, \
{0x86, 0xe7, 0xf9, 0x1b, 0xac, 0x97, 0x4d, 0x5c}}
namespace mozilla {
class Encoding;

View File

@@ -14,12 +14,12 @@
#include "nsCOMPtr.h"
#define NS_BMPENCODER_CID \
{ /* 13a5320c-4c91-4FA4-bd16-b081a3ba8c0b */ \
0x13a5320c, 0x4c91, 0x4fa4, { \
0xbd, 0x16, 0xb0, 0x81, 0xa3, 0Xba, 0x8c, 0x0b \
} \
}
#define NS_BMPENCODER_CID \
{/* 13a5320c-4c91-4FA4-bd16-b081a3ba8c0b */ \
0x13a5320c, \
0x4c91, \
0x4fa4, \
{0xbd, 0x16, 0xb0, 0x81, 0xa3, 0Xba, 0x8c, 0x0b}}
namespace mozilla {
namespace image {

View File

@@ -13,12 +13,12 @@
#include "nsCOMPtr.h"
#define NS_ICOENCODER_CID \
{ /*92AE3AB2-8968-41B1-8709-B6123BCEAF21 */ \
0x92ae3ab2, 0x8968, 0x41b1, { \
0x87, 0x09, 0xb6, 0x12, 0x3b, 0Xce, 0xaf, 0x21 \
} \
}
#define NS_ICOENCODER_CID \
{/*92AE3AB2-8968-41B1-8709-B6123BCEAF21 */ \
0x92ae3ab2, \
0x8968, \
0x41b1, \
{0x87, 0x09, 0xb6, 0x12, 0x3b, 0Xce, 0xaf, 0x21}}
// Provides ICO encoding functionality. Use InitFromData() to do the
// encoding. See that function definition for encoding options.

View File

@@ -16,13 +16,12 @@
struct jpeg_compress_struct;
struct jpeg_common_struct;
#define NS_JPEGENCODER_CID \
{ \
/* ac2bb8fe-eeeb-4572-b40f-be03932b56e0 */ \
0xac2bb8fe, 0xeeeb, 0x4572, { \
0xb4, 0x0f, 0xbe, 0x03, 0x93, 0x2b, 0x56, 0xe0 \
} \
}
#define NS_JPEGENCODER_CID \
{/* ac2bb8fe-eeeb-4572-b40f-be03932b56e0 */ \
0xac2bb8fe, \
0xeeeb, \
0x4572, \
{0xb4, 0x0f, 0xbe, 0x03, 0x93, 0x2b, 0x56, 0xe0}}
// Provides JPEG encoding functionality. Use InitFromData() to do the
// encoding. See that function definition for encoding options.

View File

@@ -14,12 +14,12 @@
#include "mozilla/Attributes.h"
#include "mozilla/ReentrantMonitor.h"
#define NS_PNGENCODER_CID \
{ /* 38d1592e-b81e-432b-86f8-471878bbfe07 */ \
0x38d1592e, 0xb81e, 0x432b, { \
0x86, 0xf8, 0x47, 0x18, 0x78, 0xbb, 0xfe, 0x07 \
} \
}
#define NS_PNGENCODER_CID \
{/* 38d1592e-b81e-432b-86f8-471878bbfe07 */ \
0x38d1592e, \
0xb81e, \
0x432b, \
{0x86, 0xf8, 0x47, 0x18, 0x78, 0xbb, 0xfe, 0x07}}
// Provides PNG encoding functionality. Use InitFromData() to do the
// encoding. See that function definition for encoding options.

View File

@@ -14,12 +14,12 @@
#include "mozilla/Attributes.h"
#include "mozilla/ReentrantMonitor.h"
#define NS_WEBPENCODER_CID \
{ /* a8e5a8e5-bebf-4512-9f50-e41e4748ce28 */ \
0xa8e5a8e5, 0xbebf, 0x4512, { \
0x9f, 0x50, 0xe4, 0x1e, 0x47, 0x48, 0xce, 0x28 \
} \
}
#define NS_WEBPENCODER_CID \
{/* a8e5a8e5-bebf-4512-9f50-e41e4748ce28 */ \
0xa8e5a8e5, \
0xbebf, \
0x4512, \
{0x9f, 0x50, 0xe4, 0x1e, 0x47, 0x48, 0xce, 0x28}}
// Provides WEBP encoding functionality. Use InitFromData() to do the
// encoding. See that function definition for encoding options.

View File

@@ -9,12 +9,12 @@
#include "imgITools.h"
#define NS_IMGTOOLS_CID \
{ /* 3d8fa16d-c9e1-4b50-bdef-2c7ae249967a */ \
0x3d8fa16d, 0xc9e1, 0x4b50, { \
0xbd, 0xef, 0x2c, 0x7a, 0xe2, 0x49, 0x96, 0x7a \
} \
}
#define NS_IMGTOOLS_CID \
{/* 3d8fa16d-c9e1-4b50-bdef-2c7ae249967a */ \
0x3d8fa16d, \
0xc9e1, \
0x4b50, \
{0xbd, 0xef, 0x2c, 0x7a, 0xe2, 0x49, 0x96, 0x7a}}
namespace mozilla {
namespace image {

View File

@@ -431,37 +431,59 @@ void CheckADAM7InterpolatingWritePixels(const IntSize& aSize) {
}
TEST(ImageADAM7InterpolatingFilter, WritePixels100_100)
{ CheckADAM7InterpolatingWritePixels(IntSize(100, 100)); }
{
CheckADAM7InterpolatingWritePixels(IntSize(100, 100));
}
TEST(ImageADAM7InterpolatingFilter, WritePixels99_99)
{ CheckADAM7InterpolatingWritePixels(IntSize(99, 99)); }
{
CheckADAM7InterpolatingWritePixels(IntSize(99, 99));
}
TEST(ImageADAM7InterpolatingFilter, WritePixels66_33)
{ CheckADAM7InterpolatingWritePixels(IntSize(66, 33)); }
{
CheckADAM7InterpolatingWritePixels(IntSize(66, 33));
}
TEST(ImageADAM7InterpolatingFilter, WritePixels33_66)
{ CheckADAM7InterpolatingWritePixels(IntSize(33, 66)); }
{
CheckADAM7InterpolatingWritePixels(IntSize(33, 66));
}
TEST(ImageADAM7InterpolatingFilter, WritePixels15_15)
{ CheckADAM7InterpolatingWritePixels(IntSize(15, 15)); }
{
CheckADAM7InterpolatingWritePixels(IntSize(15, 15));
}
TEST(ImageADAM7InterpolatingFilter, WritePixels9_9)
{ CheckADAM7InterpolatingWritePixels(IntSize(9, 9)); }
{
CheckADAM7InterpolatingWritePixels(IntSize(9, 9));
}
TEST(ImageADAM7InterpolatingFilter, WritePixels8_8)
{ CheckADAM7InterpolatingWritePixels(IntSize(8, 8)); }
{
CheckADAM7InterpolatingWritePixels(IntSize(8, 8));
}
TEST(ImageADAM7InterpolatingFilter, WritePixels7_7)
{ CheckADAM7InterpolatingWritePixels(IntSize(7, 7)); }
{
CheckADAM7InterpolatingWritePixels(IntSize(7, 7));
}
TEST(ImageADAM7InterpolatingFilter, WritePixels3_3)
{ CheckADAM7InterpolatingWritePixels(IntSize(3, 3)); }
{
CheckADAM7InterpolatingWritePixels(IntSize(3, 3));
}
TEST(ImageADAM7InterpolatingFilter, WritePixels1_1)
{ CheckADAM7InterpolatingWritePixels(IntSize(1, 1)); }
{
CheckADAM7InterpolatingWritePixels(IntSize(1, 1));
}
TEST(ImageADAM7InterpolatingFilter, TrivialInterpolation48_48)
{ CheckInterpolation(IntSize(48, 48), {BGRAColor::Green()}); }
{
CheckInterpolation(IntSize(48, 48), {BGRAColor::Green()});
}
TEST(ImageADAM7InterpolatingFilter, InterpolationOutput33_17)
{
@@ -580,7 +602,9 @@ TEST(ImageADAM7InterpolatingFilter, InterpolationOutput3_3)
}
TEST(ImageADAM7InterpolatingFilter, InterpolationOutput1_1)
{ CheckInterpolation(IntSize(1, 1), {BGRAColor::Blue()}); }
{
CheckInterpolation(IntSize(1, 1), {BGRAColor::Blue()});
}
TEST(ImageADAM7InterpolatingFilter, ADAM7InterpolationFailsFor0_0)
{

View File

@@ -167,10 +167,14 @@ static void TestWithBlendAnimationFilterClear(BlendMethod aBlendMethod) {
}
TEST(ImageBlendAnimationFilter, ClearWithOver)
{ TestWithBlendAnimationFilterClear(BlendMethod::OVER); }
{
TestWithBlendAnimationFilterClear(BlendMethod::OVER);
}
TEST(ImageBlendAnimationFilter, ClearWithSource)
{ TestWithBlendAnimationFilterClear(BlendMethod::SOURCE); }
{
TestWithBlendAnimationFilterClear(BlendMethod::SOURCE);
}
TEST(ImageBlendAnimationFilter, KeepWithSource)
{