Bug 1519636 - First reformat with clang-format 13.0.0. r=firefox-build-system-reviewers,sylvestre,mhentges

Updated with clang-format version 13.0.0 (taskcluster-OgjH5lasS5K_fvefdRcJVg)

Depends on D131114

Differential Revision: https://phabricator.services.mozilla.com/D129119
This commit is contained in:
Andi-Bogdan Postelnicu 2021-11-16 08:07:30 +00:00
parent 1faa3d40cf
commit c8e0f87391
31 changed files with 101 additions and 122 deletions

View file

@ -143,9 +143,10 @@ void HyperTextAccessibleBase::TextSubstring(int32_t aStartOffset,
} }
bool HyperTextAccessibleBase::CharAt(int32_t aOffset, nsAString& aChar, bool HyperTextAccessibleBase::CharAt(int32_t aOffset, nsAString& aChar,
int32_t* aStartOffset, int32_t* aEndOffset) { int32_t* aStartOffset,
int32_t* aEndOffset) {
MOZ_ASSERT(!aStartOffset == !aEndOffset, MOZ_ASSERT(!aStartOffset == !aEndOffset,
"Offsets should be both defined or both undefined!"); "Offsets should be both defined or both undefined!");
int32_t childIdx = GetChildIndexAtOffset(aOffset); int32_t childIdx = GetChildIndexAtOffset(aOffset);
if (childIdx == -1) { if (childIdx == -1) {

View file

@ -110,9 +110,9 @@ using namespace mozilla::a11y;
static const uint64_t kCachedStates = static const uint64_t kCachedStates =
states::CHECKED | states::PRESSED | states::MIXED | states::EXPANDED | states::CHECKED | states::PRESSED | states::MIXED | states::EXPANDED |
states::EXPANDABLE | states::CURRENT | states::SELECTED | states::TRAVERSED | states::EXPANDABLE | states::CURRENT | states::SELECTED |
states::LINKED | states::HASPOPUP | states::BUSY | states::MULTI_LINE | states::TRAVERSED | states::LINKED | states::HASPOPUP | states::BUSY |
states::CHECKABLE; states::MULTI_LINE | states::CHECKABLE;
static const uint64_t kCacheInitialized = ((uint64_t)0x1) << 63; static const uint64_t kCacheInitialized = ((uint64_t)0x1) << 63;
- (uint64_t)state { - (uint64_t)state {

View file

@ -123,7 +123,6 @@ class FlattenedChildIterator : public ExplicitChildIterator {
const nsIContent* Parent() const { return mOriginalContent; } const nsIContent* Parent() const { return mOriginalContent; }
protected: protected:
const nsIContent* mOriginalContent; const nsIContent* mOriginalContent;
private: private:

View file

@ -80,8 +80,7 @@ class ProducerView {
public: public:
using Producer = _Producer; using Producer = _Producer;
explicit ProducerView(Producer* aProducer) explicit ProducerView(Producer* aProducer) : mProducer(aProducer) {}
: mProducer(aProducer) {}
template <typename T> template <typename T>
bool WriteFromRange(const Range<const T>& src) { bool WriteFromRange(const Range<const T>& src) {
@ -133,8 +132,7 @@ class ConsumerView {
public: public:
using Consumer = _Consumer; using Consumer = _Consumer;
explicit ConsumerView(Consumer* aConsumer) explicit ConsumerView(Consumer* aConsumer) : mConsumer(aConsumer) {}
: mConsumer(aConsumer) {}
/** /**
* Read bytes from the consumer if there is enough data. aBuffer may * Read bytes from the consumer if there is enough data. aBuffer may
@ -223,8 +221,7 @@ struct QueueParamTraits<bool> {
using ParamType = bool; using ParamType = bool;
template <typename U> template <typename U>
static auto Write(ProducerView<U>& aProducerView, static auto Write(ProducerView<U>& aProducerView, const ParamType& aArg) {
const ParamType& aArg) {
uint8_t temp = aArg ? 1 : 0; uint8_t temp = aArg ? 1 : 0;
return aProducerView.WriteParam(temp); return aProducerView.WriteParam(temp);
} }
@ -251,8 +248,7 @@ struct EnumSerializer {
using DataType = typename std::underlying_type<E>::type; using DataType = typename std::underlying_type<E>::type;
template <typename U> template <typename U>
static auto Write(ProducerView<U>& aProducerView, static auto Write(ProducerView<U>& aProducerView, const ParamType& aValue) {
const ParamType& aValue) {
MOZ_RELEASE_ASSERT( MOZ_RELEASE_ASSERT(
EnumValidator::IsLegalValue(static_cast<DataType>(aValue))); EnumValidator::IsLegalValue(static_cast<DataType>(aValue)));
return aProducerView.WriteParam(DataType(aValue)); return aProducerView.WriteParam(DataType(aValue));
@ -372,8 +368,7 @@ struct QueueParamTraits<nsACString> {
using ParamType = nsACString; using ParamType = nsACString;
template <typename U> template <typename U>
static bool Write(ProducerView<U>& aProducerView, static bool Write(ProducerView<U>& aProducerView, const ParamType& aArg) {
const ParamType& aArg) {
if ((!aProducerView.WriteParam(aArg.IsVoid())) || aArg.IsVoid()) { if ((!aProducerView.WriteParam(aArg.IsVoid())) || aArg.IsVoid()) {
return false; return false;
} }
@ -425,8 +420,7 @@ struct QueueParamTraits<nsAString> {
using ParamType = nsAString; using ParamType = nsAString;
template <typename U> template <typename U>
static bool Write(ProducerView<U>& aProducerView, static bool Write(ProducerView<U>& aProducerView, const ParamType& aArg) {
const ParamType& aArg) {
if ((!aProducerView.WriteParam(aArg.IsVoid())) || (aArg.IsVoid())) { if ((!aProducerView.WriteParam(aArg.IsVoid())) || (aArg.IsVoid())) {
return false; return false;
} }
@ -503,8 +497,7 @@ struct NSArrayQueueParamTraits<nsTArray<_ElementType>, false> {
using ParamType = nsTArray<ElementType>; using ParamType = nsTArray<ElementType>;
template <typename U> template <typename U>
static bool Write(ProducerView<U>& aProducerView, static bool Write(ProducerView<U>& aProducerView, const ParamType& aArg) {
const ParamType& aArg) {
aProducerView.WriteParam(aArg.Length()); aProducerView.WriteParam(aArg.Length());
for (auto& elt : aArg) { for (auto& elt : aArg) {
aProducerView.WriteParam(elt); aProducerView.WriteParam(elt);
@ -539,8 +532,7 @@ struct NSArrayQueueParamTraits<nsTArray<_ElementType>, true> {
// TODO: Are there alignment issues? // TODO: Are there alignment issues?
template <typename U> template <typename U>
static bool Write(ProducerView<U>& aProducerView, static bool Write(ProducerView<U>& aProducerView, const ParamType& aArg) {
const ParamType& aArg) {
size_t arrayLen = aArg.Length(); size_t arrayLen = aArg.Length();
aProducerView.WriteParam(arrayLen); aProducerView.WriteParam(arrayLen);
return aProducerView.Write(&aArg[0], aArg.Length() * sizeof(ElementType)); return aProducerView.Write(&aArg[0], aArg.Length() * sizeof(ElementType));
@ -581,8 +573,7 @@ struct ArrayQueueParamTraits<Array<_ElementType, Length>, false> {
using ParamType = Array<ElementType, Length>; using ParamType = Array<ElementType, Length>;
template <typename U> template <typename U>
static auto Write(ProducerView<U>& aProducerView, static auto Write(ProducerView<U>& aProducerView, const ParamType& aArg) {
const ParamType& aArg) {
for (const auto& elt : aArg) { for (const auto& elt : aArg) {
aProducerView.WriteParam(elt); aProducerView.WriteParam(elt);
} }
@ -605,8 +596,7 @@ struct ArrayQueueParamTraits<Array<_ElementType, Length>, true> {
using ParamType = Array<ElementType, Length>; using ParamType = Array<ElementType, Length>;
template <typename U> template <typename U>
static auto Write(ProducerView<U>& aProducerView, static auto Write(ProducerView<U>& aProducerView, const ParamType& aArg) {
const ParamType& aArg) {
return aProducerView.Write(aArg.begin(), sizeof(ElementType[Length])); return aProducerView.Write(aArg.begin(), sizeof(ElementType[Length]));
} }
@ -629,8 +619,7 @@ struct QueueParamTraits<Maybe<ElementType>> {
using ParamType = Maybe<ElementType>; using ParamType = Maybe<ElementType>;
template <typename U> template <typename U>
static bool Write(ProducerView<U>& aProducerView, static bool Write(ProducerView<U>& aProducerView, const ParamType& aArg) {
const ParamType& aArg) {
aProducerView.WriteParam(static_cast<bool>(aArg)); aProducerView.WriteParam(static_cast<bool>(aArg));
if (aArg) { if (aArg) {
aProducerView.WriteParam(aArg.ref()); aProducerView.WriteParam(aArg.ref());
@ -662,8 +651,7 @@ struct QueueParamTraits<std::pair<TypeA, TypeB>> {
using ParamType = std::pair<TypeA, TypeB>; using ParamType = std::pair<TypeA, TypeB>;
template <typename U> template <typename U>
static bool Write(ProducerView<U>& aProducerView, static bool Write(ProducerView<U>& aProducerView, const ParamType& aArg) {
const ParamType& aArg) {
aProducerView.WriteParam(aArg.first()); aProducerView.WriteParam(aArg.first());
return aProducerView.WriteParam(aArg.second()); return aProducerView.WriteParam(aArg.second());
} }

View file

@ -25,9 +25,7 @@ class RangeConsumerView final : public webgl::ConsumerView<RangeConsumerView> {
auto Remaining() const { return *MaybeAs<size_t>(mSrcEnd - mSrcItr); } auto Remaining() const { return *MaybeAs<size_t>(mSrcEnd - mSrcItr); }
explicit RangeConsumerView(const Range<const uint8_t> range) explicit RangeConsumerView(const Range<const uint8_t> range)
: ConsumerView(this), : ConsumerView(this), mSrcItr(range.begin()), mSrcEnd(range.end()) {
mSrcItr(range.begin()),
mSrcEnd(range.end()) {
(void)Remaining(); // assert size non-negative (void)Remaining(); // assert size non-negative
} }

View file

@ -1264,7 +1264,7 @@ ScopedDrawCallWrapper::ScopedDrawCallWrapper(WebGLContext& webgl)
if (!fb) { if (!fb) {
if (mWebGL.mDefaultFB_DrawBuffer0 == LOCAL_GL_NONE) { if (mWebGL.mDefaultFB_DrawBuffer0 == LOCAL_GL_NONE) {
driverColorMask0 = 0; // Is this well-optimized enough for depth-first driverColorMask0 = 0; // Is this well-optimized enough for depth-first
// rendering? // rendering?
} else { } else {
driverColorMask0 &= ~(uint8_t(mWebGL.mNeedsFakeNoAlpha) << 3); driverColorMask0 &= ~(uint8_t(mWebGL.mNeedsFakeNoAlpha) << 3);
} }

View file

@ -16,7 +16,7 @@
#include "audio_thread_priority.h" #include "audio_thread_priority.h"
#ifdef MOZ_WIDGET_ANDROID #ifdef MOZ_WIDGET_ANDROID
# include "AndroidProcess.h" # include "AndroidProcess.h"
#endif // MOZ_WIDGET_ANDROID #endif // MOZ_WIDGET_ANDROID
namespace mozilla { namespace mozilla {
@ -110,8 +110,8 @@ void PromoteRenderingThreadAndroid() {
("GraphRunner promoted thread priority: %d", ("GraphRunner promoted thread priority: %d",
java::sdk::Process::GetThreadPriority(java::sdk::Process::MyTid()))); java::sdk::Process::GetThreadPriority(java::sdk::Process::MyTid())));
} }
}; // namespace }; // namespace
#endif // MOZ_WIDGET_ANDROID #endif // MOZ_WIDGET_ANDROID
NS_IMETHODIMP GraphRunner::Run() { NS_IMETHODIMP GraphRunner::Run() {
#ifndef XP_LINUX #ifndef XP_LINUX
@ -121,7 +121,7 @@ NS_IMETHODIMP GraphRunner::Run() {
#ifdef MOZ_WIDGET_ANDROID #ifdef MOZ_WIDGET_ANDROID
PromoteRenderingThreadAndroid(); PromoteRenderingThreadAndroid();
#endif // MOZ_WIDGET_ANDROID #endif // MOZ_WIDGET_ANDROID
nsCOMPtr<nsIThreadInternal> threadInternal = do_QueryInterface(mThread); nsCOMPtr<nsIThreadInternal> threadInternal = do_QueryInterface(mThread);
threadInternal->SetObserver(mGraph); threadInternal->SetObserver(mGraph);

View file

@ -259,7 +259,8 @@ void DesktopDeviceInfoImpl::InitializeWindowList() {
_snprintf_s(idStr, sizeof(idStr), sizeof(idStr) - 1, "%ld", _snprintf_s(idStr, sizeof(idStr), sizeof(idStr) - 1, "%ld",
static_cast<long>(pWinDevice->getScreenId())); static_cast<long>(pWinDevice->getScreenId()));
#else #else
SprintfLiteral(idStr, "%ld", static_cast<long>(pWinDevice->getScreenId())); SprintfLiteral(idStr, "%ld",
static_cast<long>(pWinDevice->getScreenId()));
#endif #endif
pWinDevice->setUniqueIdName(idStr); pWinDevice->setUniqueIdName(idStr);
desktop_window_list_[pWinDevice->getScreenId()] = pWinDevice; desktop_window_list_[pWinDevice->getScreenId()] = pWinDevice;

View file

@ -242,8 +242,8 @@ void AnalyserNode::GetByteFrequencyData(const Uint8Array& aArray) {
WebAudioUtils::ConvertLinearToDecibels(mOutputBuffer[i], mMinDecibels); WebAudioUtils::ConvertLinearToDecibels(mOutputBuffer[i], mMinDecibels);
// scale down the value to the range of [0, UCHAR_MAX] // scale down the value to the range of [0, UCHAR_MAX]
const double scaled = std::max( const double scaled = std::max(
0.0, std::min(double(UCHAR_MAX), 0.0, std::min(double(UCHAR_MAX), UCHAR_MAX * (decibels - mMinDecibels) *
UCHAR_MAX*(decibels - mMinDecibels) * rangeScaleFactor)); rangeScaleFactor));
buffer[i] = static_cast<unsigned char>(scaled); buffer[i] = static_cast<unsigned char>(scaled);
} }
} }

View file

@ -64,17 +64,17 @@ nsresult AudioWorkletImpl::SendControlMessage(
void AudioWorkletImpl::OnAddModuleStarted() const { void AudioWorkletImpl::OnAddModuleStarted() const {
#ifdef MOZ_GECKO_PROFILER #ifdef MOZ_GECKO_PROFILER
profiler_add_marker( profiler_add_marker(ProfilerStringView("AudioWorklet.addModule"),
ProfilerStringView("AudioWorklet.addModule"), geckoprofiler::category::MEDIA_RT,
geckoprofiler::category::MEDIA_RT, {MarkerTiming::IntervalStart()}); {MarkerTiming::IntervalStart()});
#endif #endif
} }
void AudioWorkletImpl::OnAddModulePromiseSettled() const { void AudioWorkletImpl::OnAddModulePromiseSettled() const {
#ifdef MOZ_GECKO_PROFILER #ifdef MOZ_GECKO_PROFILER
profiler_add_marker( profiler_add_marker(ProfilerStringView("AudioWorklet.addModule"),
ProfilerStringView("AudioWorklet.addModule"), geckoprofiler::category::MEDIA_RT,
geckoprofiler::category::MEDIA_RT, {MarkerTiming::IntervalEnd()}); {MarkerTiming::IntervalEnd()});
#endif #endif
} }

View file

@ -64,7 +64,7 @@ JSObject* SourceElementCallback(JSContext* aCx, JS::HandleValue aPrivateValue) {
JS::Rooted<JS::Value> elementValue(aCx); JS::Rooted<JS::Value> elementValue(aCx);
{ {
nsCOMPtr<Element> domElement = script->GetFetchOptions()->mElement; nsCOMPtr<Element> domElement = script->GetFetchOptions()->mElement;
if (!domElement) { if (!domElement) {
return nullptr; return nullptr;
} }
@ -73,7 +73,7 @@ JSObject* SourceElementCallback(JSContext* aCx, JS::HandleValue aPrivateValue) {
JSAutoRealm ar(aCx, globalObject); JSAutoRealm ar(aCx, globalObject);
nsresult rv = nsContentUtils::WrapNative(aCx, domElement, &elementValue, nsresult rv = nsContentUtils::WrapNative(aCx, domElement, &elementValue,
/* aAllowWrapping = */ true); /* aAllowWrapping = */ true);
if (NS_FAILED(rv)) { if (NS_FAILED(rv)) {
return nullptr; return nullptr;
} }

View file

@ -2420,9 +2420,8 @@ RecordedFillGlyphs::RecordedFillGlyphs(S& aStream)
mGlyphs = new (fallible) Glyph[mNumGlyphs]; mGlyphs = new (fallible) Glyph[mNumGlyphs];
if (!mGlyphs) { if (!mGlyphs) {
gfxCriticalNote gfxCriticalNote << "RecordedFillGlyphs failed to allocate glyphs of size "
<< "RecordedFillGlyphs failed to allocate glyphs of size " << mNumGlyphs;
<< mNumGlyphs;
aStream.SetIsBad(); aStream.SetIsBad();
} else { } else {
aStream.read((char*)mGlyphs, sizeof(Glyph) * mNumGlyphs); aStream.read((char*)mGlyphs, sizeof(Glyph) * mNumGlyphs);

View file

@ -80,11 +80,11 @@ interface DWRITE_DECLARE_INTERFACE("27F2A904-4EB8-441D-9678-0563F53E3E2F")
STDMETHOD_(DWRITE_GLYPH_IMAGE_FORMATS, GetGlyphImageFormats)() PURE; STDMETHOD_(DWRITE_GLYPH_IMAGE_FORMATS, GetGlyphImageFormats)() PURE;
STDMETHOD(GetGlyphImageFormats) STDMETHOD(GetGlyphImageFormats)
(UINT16 glyphId, UINT32 pixelsPerEmFirst, UINT32 pixelsPerEmLast, (UINT16 glyphId, UINT32 pixelsPerEmFirst, UINT32 pixelsPerEmLast,
_Out_ DWRITE_GLYPH_IMAGE_FORMATS * glyphImageFormats) PURE; _Out_ DWRITE_GLYPH_IMAGE_FORMATS* glyphImageFormats) PURE;
STDMETHOD(GetGlyphImageData) STDMETHOD(GetGlyphImageData)
(_In_ UINT16 glyphId, UINT32 pixelsPerEm, (_In_ UINT16 glyphId, UINT32 pixelsPerEm,
DWRITE_GLYPH_IMAGE_FORMATS glyphImageFormat, DWRITE_GLYPH_IMAGE_FORMATS glyphImageFormat,
_Out_ DWRITE_GLYPH_IMAGE_DATA * glyphData, _Out_ DWRITE_GLYPH_IMAGE_DATA* glyphData,
_Outptr_result_maybenull_ void** glyphDataContext) PURE; _Outptr_result_maybenull_ void** glyphDataContext) PURE;
STDMETHOD_(void, ReleaseGlyphImageData)(void* glyphDataContext) PURE; STDMETHOD_(void, ReleaseGlyphImageData)(void* glyphDataContext) PURE;
}; };
@ -93,34 +93,34 @@ interface DWRITE_DECLARE_INTERFACE("98EFF3A5-B667-479A-B145-E2FA5B9FDC29")
IDWriteFontFace5 : public IDWriteFontFace4 { IDWriteFontFace5 : public IDWriteFontFace4 {
STDMETHOD_(UINT32, GetFontAxisValueCount)() PURE; STDMETHOD_(UINT32, GetFontAxisValueCount)() PURE;
STDMETHOD(GetFontAxisValues) STDMETHOD(GetFontAxisValues)
(_Out_writes_(fontAxisValueCount) DWRITE_FONT_AXIS_VALUE * fontAxisValues, (_Out_writes_(fontAxisValueCount) DWRITE_FONT_AXIS_VALUE* fontAxisValues,
UINT32 fontAxisValueCount) PURE; UINT32 fontAxisValueCount) PURE;
STDMETHOD_(BOOL, HasVariations)() PURE; STDMETHOD_(BOOL, HasVariations)() PURE;
STDMETHOD(GetFontResource) STDMETHOD(GetFontResource)
(_COM_Outptr_ IDWriteFontResource * *fontResource) PURE; (_COM_Outptr_ IDWriteFontResource** fontResource) PURE;
STDMETHOD_(BOOL, Equals)(IDWriteFontFace * fontFace) PURE; STDMETHOD_(BOOL, Equals)(IDWriteFontFace* fontFace) PURE;
}; };
interface DWRITE_DECLARE_INTERFACE("1F803A76-6871-48E8-987F-B975551C50F2") interface DWRITE_DECLARE_INTERFACE("1F803A76-6871-48E8-987F-B975551C50F2")
IDWriteFontResource : public IUnknown { IDWriteFontResource : public IUnknown {
STDMETHOD(GetFontFile)(_COM_Outptr_ IDWriteFontFile * *fontFile) PURE; STDMETHOD(GetFontFile)(_COM_Outptr_ IDWriteFontFile** fontFile) PURE;
STDMETHOD_(UINT32, GetFontFaceIndex)() PURE; STDMETHOD_(UINT32, GetFontFaceIndex)() PURE;
STDMETHOD_(UINT32, GetFontAxisCount)() PURE; STDMETHOD_(UINT32, GetFontAxisCount)() PURE;
STDMETHOD(GetDefaultFontAxisValues) STDMETHOD(GetDefaultFontAxisValues)
(_Out_writes_(fontAxisValueCount) DWRITE_FONT_AXIS_VALUE * fontAxisValues, (_Out_writes_(fontAxisValueCount) DWRITE_FONT_AXIS_VALUE* fontAxisValues,
UINT32 fontAxisValueCount) PURE; UINT32 fontAxisValueCount) PURE;
STDMETHOD(GetFontAxisRanges) STDMETHOD(GetFontAxisRanges)
(_Out_writes_(fontAxisRangeCount) DWRITE_FONT_AXIS_RANGE * fontAxisRanges, (_Out_writes_(fontAxisRangeCount) DWRITE_FONT_AXIS_RANGE* fontAxisRanges,
UINT32 fontAxisRangeCount) PURE; UINT32 fontAxisRangeCount) PURE;
STDMETHOD_(DWRITE_FONT_AXIS_ATTRIBUTES, GetFontAxisAttributes) STDMETHOD_(DWRITE_FONT_AXIS_ATTRIBUTES, GetFontAxisAttributes)
(UINT32 axisIndex) PURE; (UINT32 axisIndex) PURE;
STDMETHOD(GetAxisNames) STDMETHOD(GetAxisNames)
(UINT32 axisIndex, _COM_Outptr_ IDWriteLocalizedStrings * *names) PURE; (UINT32 axisIndex, _COM_Outptr_ IDWriteLocalizedStrings** names) PURE;
STDMETHOD_(UINT32, GetAxisValueNameCount)(UINT32 axisIndex) PURE; STDMETHOD_(UINT32, GetAxisValueNameCount)(UINT32 axisIndex) PURE;
STDMETHOD(GetAxisValueNames) STDMETHOD(GetAxisValueNames)
(UINT32 axisIndex, UINT32 axisValueIndex, (UINT32 axisIndex, UINT32 axisValueIndex,
_Out_ DWRITE_FONT_AXIS_RANGE * fontAxisRange, _Out_ DWRITE_FONT_AXIS_RANGE* fontAxisRange,
_COM_Outptr_ IDWriteLocalizedStrings * *names) PURE; _COM_Outptr_ IDWriteLocalizedStrings** names) PURE;
STDMETHOD_(BOOL, HasVariations)() PURE; STDMETHOD_(BOOL, HasVariations)() PURE;
STDMETHOD(CreateFontFace) STDMETHOD(CreateFontFace)
(DWRITE_FONT_SIMULATIONS fontSimulations, (DWRITE_FONT_SIMULATIONS fontSimulations,

View file

@ -50,12 +50,9 @@ namespace gl {
// should match the order of EGLExtensions, and be null-terminated. // should match the order of EGLExtensions, and be null-terminated.
static const char* sEGLLibraryExtensionNames[] = { static const char* sEGLLibraryExtensionNames[] = {
"EGL_ANDROID_get_native_client_buffer", "EGL_ANDROID_get_native_client_buffer", "EGL_ANGLE_device_creation",
"EGL_ANGLE_device_creation", "EGL_ANGLE_device_creation_d3d11", "EGL_ANGLE_platform_angle",
"EGL_ANGLE_device_creation_d3d11", "EGL_ANGLE_platform_angle_d3d", "EGL_EXT_device_query"};
"EGL_ANGLE_platform_angle",
"EGL_ANGLE_platform_angle_d3d",
"EGL_EXT_device_query"};
// should match the order of EGLExtensions, and be null-terminated. // should match the order of EGLExtensions, and be null-terminated.
static const char* sEGLExtensionNames[] = { static const char* sEGLExtensionNames[] = {

View file

@ -121,8 +121,7 @@ bool AnimationInfo::StartPendingAnimations(const TimeStamp& aReadyTime) {
return updated; return updated;
} }
void AnimationInfo::TransferMutatedFlagToLayer(Layer* aLayer) { void AnimationInfo::TransferMutatedFlagToLayer(Layer* aLayer) {}
}
bool AnimationInfo::ApplyPendingUpdatesForThisTransaction() { bool AnimationInfo::ApplyPendingUpdatesForThisTransaction() {
if (mPendingAnimations) { if (mPendingAnimations) {

View file

@ -23,11 +23,11 @@
#include "mozilla/TimeStamp.h" // for TimeStamp #include "mozilla/TimeStamp.h" // for TimeStamp
#include "mozilla/UniquePtr.h" // for UniquePtr, MakeUnique #include "mozilla/UniquePtr.h" // for UniquePtr, MakeUnique
#include "mozilla/gfx/BasePoint.h" // for BasePoint<>::(anonymous union)::(anonymous), BasePoin... #include "mozilla/gfx/BasePoint.h" // for BasePoint<>::(anonymous union)::(anonymous), BasePoin...
#include "mozilla/gfx/BaseSize.h" // for BaseSize #include "mozilla/gfx/BaseSize.h" // for BaseSize
#include "mozilla/gfx/Matrix.h" // for Matrix4x4, Matrix, Matrix4x4Typed #include "mozilla/gfx/Matrix.h" // for Matrix4x4, Matrix, Matrix4x4Typed
#include "mozilla/gfx/Point.h" // for Point, PointTyped #include "mozilla/gfx/Point.h" // for Point, PointTyped
#include "mozilla/gfx/Polygon.h" // for Polygon #include "mozilla/gfx/Polygon.h" // for Polygon
#include "mozilla/gfx/Rect.h" // for IntRectTyped, IntRect #include "mozilla/gfx/Rect.h" // for IntRectTyped, IntRect
#include "mozilla/gfx/Types.h" // for CompositionOp, DeviceColor, SamplingFilter, SideBits #include "mozilla/gfx/Types.h" // for CompositionOp, DeviceColor, SamplingFilter, SideBits
#include "mozilla/gfx/UserData.h" // for UserData, UserDataKey (ptr only) #include "mozilla/gfx/UserData.h" // for UserData, UserDataKey (ptr only)
#include "mozilla/layers/AnimationInfo.h" // for AnimationInfo #include "mozilla/layers/AnimationInfo.h" // for AnimationInfo
@ -69,7 +69,7 @@ class TransformData;
struct PropertyAnimationGroup; struct PropertyAnimationGroup;
class Layer { class Layer {
public: public:
enum { enum {
/** /**
* If this is set, the caller is promising that by the end of this * If this is set, the caller is promising that by the end of this

View file

@ -31,10 +31,11 @@ class APZTaskRunnable final : public Runnable {
MOZ_CAN_RUN_SCRIPT_BOUNDARY NS_DECL_NSIRUNNABLE MOZ_CAN_RUN_SCRIPT_BOUNDARY NS_DECL_NSIRUNNABLE
// Queue a RepaintRequest. // Queue a RepaintRequest.
// If there's already a RepaintRequest having the same scroll id, the old // If there's already a RepaintRequest having the same scroll id, the old
// one will be discarded. // one will be discarded.
void QueueRequest(const RepaintRequest& aRequest); void
QueueRequest(const RepaintRequest& aRequest);
void QueueFlushCompleteNotification(); void QueueFlushCompleteNotification();
void Revoke() { void Revoke() {
mController = nullptr; mController = nullptr;

View file

@ -422,9 +422,10 @@ void AsyncImagePipelineManager::ApplyAsyncImageForPipeline(
float(aPipeline->mCurrentTexture->GetSize().width), float(aPipeline->mCurrentTexture->GetSize().width),
float(aPipeline->mCurrentTexture->GetSize().height)}; float(aPipeline->mCurrentTexture->GetSize().height)};
computedTransform.rotation = ToWrRotation(aPipeline->mRotation); computedTransform.rotation = ToWrRotation(aPipeline->mRotation);
// We don't have a frame / per-frame key here, but we can use the pipeline id and // We don't have a frame / per-frame key here, but we can use the pipeline id
// the key kind to create a unique stable key. // and the key kind to create a unique stable key.
computedTransform.key = wr::SpatialKey(aPipelineId.mNamespace, aPipelineId.mHandle, wr::SpatialKeyKind::APZ); computedTransform.key = wr::SpatialKey(
aPipelineId.mNamespace, aPipelineId.mHandle, wr::SpatialKeyKind::APZ);
params.computed_transform = &computedTransform; params.computed_transform = &computedTransform;
Maybe<wr::WrSpatialId> referenceFrameId = Maybe<wr::WrSpatialId> referenceFrameId =

View file

@ -29,10 +29,10 @@
#include "mozilla/layers/WebRenderCommandBuilder.h" // for WebRenderCommandBuilder #include "mozilla/layers/WebRenderCommandBuilder.h" // for WebRenderCommandBuilder
#include "mozilla/layers/WebRenderScrollData.h" // for WebRenderScrollData #include "mozilla/layers/WebRenderScrollData.h" // for WebRenderScrollData
#include "WindowRenderer.h" #include "WindowRenderer.h"
#include "nsHashKeys.h" // for nsRefPtrHashKey #include "nsHashKeys.h" // for nsRefPtrHashKey
#include "nsRegion.h" // for nsIntRegion #include "nsRegion.h" // for nsIntRegion
#include "nsStringFwd.h" // for nsCString, nsAString #include "nsStringFwd.h" // for nsCString, nsAString
#include "nsTArray.h" // for nsTArray #include "nsTArray.h" // for nsTArray
#include "nsTHashSet.h" #include "nsTHashSet.h"
class gfxContext; class gfxContext;

View file

@ -99,7 +99,8 @@ ID3D11Device* RenderCompositorANGLE::GetDeviceOfEGLDisplay(nsACString& aError) {
const auto& gle = gl::GLContextEGL::Cast(gl); const auto& gle = gl::GLContextEGL::Cast(gl);
const auto& egl = gle->mEgl; const auto& egl = gle->mEgl;
MOZ_ASSERT(egl); MOZ_ASSERT(egl);
if (!egl || !egl->mLib->IsExtensionSupported(gl::EGLLibExtension::EXT_device_query)) { if (!egl ||
!egl->mLib->IsExtensionSupported(gl::EGLLibExtension::EXT_device_query)) {
aError.Assign("RcANGLE(no EXT_device_query support)"_ns); aError.Assign("RcANGLE(no EXT_device_query support)"_ns);
return nullptr; return nullptr;
} }

View file

@ -103,10 +103,10 @@ inline gfx::SurfaceFormat ImageFormatToSurfaceFormat(ImageFormat aFormat) {
} }
// This extra piece of data is used to differentiate when spatial nodes that are // This extra piece of data is used to differentiate when spatial nodes that are
// created by Gecko that have the same mFrame and PerFrameKey. This currently only // created by Gecko that have the same mFrame and PerFrameKey. This currently
// occurs with sticky display list items that are also zoomable, which results in // only occurs with sticky display list items that are also zoomable, which
// Gecko creating both a sticky spatial node, and then a property animated reference // results in Gecko creating both a sticky spatial node, and then a property
// frame for APZ // animated reference frame for APZ
enum class SpatialKeyKind : uint32_t { enum class SpatialKeyKind : uint32_t {
Transform, Transform,
Perspective, Perspective,
@ -116,9 +116,10 @@ enum class SpatialKeyKind : uint32_t {
APZ, APZ,
}; };
// Construct a unique, persistent spatial key based on the frame tree pointer, per-frame key // Construct a unique, persistent spatial key based on the frame tree pointer,
// and a spatial key kind. For now, this covers all the ways Gecko creates spatial nodes. // per-frame key and a spatial key kind. For now, this covers all the ways Gecko
// In future, we may need to be more clever with the SpatialKeyKind. // creates spatial nodes. In future, we may need to be more clever with the
// SpatialKeyKind.
inline wr::SpatialTreeItemKey SpatialKey(uint64_t aFrame, uint32_t aPerFrameKey, inline wr::SpatialTreeItemKey SpatialKey(uint64_t aFrame, uint32_t aPerFrameKey,
SpatialKeyKind aKind) { SpatialKeyKind aKind) {
return wr::SpatialTreeItemKey{ return wr::SpatialTreeItemKey{

View file

@ -41,15 +41,14 @@
# define DECLARE_SYMBOL_VISIBILITY(name) # define DECLARE_SYMBOL_VISIBILITY(name)
#endif #endif
#define DEFINE_COMPILERRT_FUNCTION(name) \ #define DEFINE_COMPILERRT_FUNCTION(name) \
.globl SYMBOL_NAME(name) SEPARATOR DECLARE_SYMBOL_VISIBILITY(name) \ .globl SYMBOL_NAME(name) \
SYMBOL_NAME(name) \ SEPARATOR DECLARE_SYMBOL_VISIBILITY(name) SYMBOL_NAME(name) :
:
#define DEFINE_COMPILERRT_PRIVATE_FUNCTION(name) \ #define DEFINE_COMPILERRT_PRIVATE_FUNCTION(name) \
.globl SYMBOL_NAME(name) SEPARATOR HIDDEN_DIRECTIVE SYMBOL_NAME(name) \ .globl SYMBOL_NAME(name) \
SEPARATOR SYMBOL_NAME(name) \ SEPARATOR HIDDEN_DIRECTIVE SYMBOL_NAME(name) \
: SEPARATOR SYMBOL_NAME(name) :
#define DEFINE_COMPILERRT_PRIVATE_FUNCTION_UNMANGLED(name) \ #define DEFINE_COMPILERRT_PRIVATE_FUNCTION_UNMANGLED(name) \
.globl name SEPARATOR HIDDEN_DIRECTIVE name SEPARATOR name: .globl name SEPARATOR HIDDEN_DIRECTIVE name SEPARATOR name:

View file

@ -3623,8 +3623,8 @@ void PresShell::DoScrollContentIntoView() {
// Reuse the same line iterator across calls to AccumulateFrameBounds. // Reuse the same line iterator across calls to AccumulateFrameBounds.
// We set it every time we detect a new block (stored in prevBlock). // We set it every time we detect a new block (stored in prevBlock).
nsAutoLineIterator lines; nsAutoLineIterator lines;
// The last line we found a continuation on in |lines|. We assume that later // The last line we found a continuation on in |lines|. We assume that
// continuations cannot come on earlier lines. // later continuations cannot come on earlier lines.
int32_t curLine = 0; int32_t curLine = 0;
do { do {
AccumulateFrameBounds(container, frame, useWholeLineHeightForInlines, AccumulateFrameBounds(container, frame, useWholeLineHeightForInlines,

View file

@ -244,8 +244,7 @@ bool nsProgressFrame::ShouldUseNativeStyle() const {
// background. // background.
return StyleDisplay()->EffectiveAppearance() == return StyleDisplay()->EffectiveAppearance() ==
StyleAppearance::ProgressBar && StyleAppearance::ProgressBar &&
!Style()->HasAuthorSpecifiedBorderOrBackground() && !Style()->HasAuthorSpecifiedBorderOrBackground() && barFrame &&
barFrame &&
barFrame->StyleDisplay()->EffectiveAppearance() == barFrame->StyleDisplay()->EffectiveAppearance() ==
StyleAppearance::Progresschunk && StyleAppearance::Progresschunk &&
!barFrame->Style()->HasAuthorSpecifiedBorderOrBackground(); !barFrame->Style()->HasAuthorSpecifiedBorderOrBackground();

View file

@ -1641,9 +1641,7 @@ class nsLineIterator final : public nsILineIterator {
mIndex = 0; mIndex = 0;
} }
} }
~nsLineIterator() { ~nsLineIterator() { MOZ_DIAGNOSTIC_ASSERT(!mMutationGuard.Mutated(0)); };
MOZ_DIAGNOSTIC_ASSERT(!mMutationGuard.Mutated(0));
};
void DisposeLineIterator() final { delete this; } void DisposeLineIterator() final { delete this; }

View file

@ -95,7 +95,7 @@ const char* gInaccessibleProperties[] = {
"-x-text-zoom", "-x-text-zoom",
"-moz-default-appearance", "-moz-default-appearance",
"-moz-inert", "-moz-inert",
"-moz-script-level", // parsed by UA sheets only "-moz-script-level", // parsed by UA sheets only
"-moz-script-size-multiplier", "-moz-script-size-multiplier",
"-moz-script-min-size", "-moz-script-min-size",
"-moz-math-variant", "-moz-math-variant",

View file

@ -275,9 +275,9 @@ void SVGForeignObjectFrame::PaintSVG(gfxContext& aContext,
if (aImgParams.imageFlags & imgIContainer::FLAG_HIGH_QUALITY_SCALING) { if (aImgParams.imageFlags & imgIContainer::FLAG_HIGH_QUALITY_SCALING) {
flags |= PaintFrameFlags::UseHighQualityScaling; flags |= PaintFrameFlags::UseHighQualityScaling;
} }
nsLayoutUtils::PaintFrame( nsLayoutUtils::PaintFrame(&aContext, kid, nsRegion(kidDirtyRect),
&aContext, kid, nsRegion(kidDirtyRect), NS_RGBA(0, 0, 0, 0), NS_RGBA(0, 0, 0, 0),
nsDisplayListBuilderMode::Painting, flags); nsDisplayListBuilderMode::Painting, flags);
aContext.Restore(); aContext.Restore();
} }

View file

@ -366,9 +366,7 @@ NS_IMETHODIMP FuzzySecurityInfo::GetIsBuiltCertChainRootBuiltInRoot(
return NS_OK; return NS_OK;
} }
NS_IMETHODIMP FuzzySecurityInfo::DisableEarlyData(void) { NS_IMETHODIMP FuzzySecurityInfo::DisableEarlyData(void) { return NS_OK; }
return NS_OK;
}
NS_IMETHODIMP FuzzySecurityInfo::SetHandshakeCallbackListener( NS_IMETHODIMP FuzzySecurityInfo::SetHandshakeCallbackListener(
nsITlsHandshakeCallbackListener* callback) { nsITlsHandshakeCallbackListener* callback) {

View file

@ -2311,7 +2311,6 @@ nsresult HttpBaseChannel::ProcessCrossOriginResourcePolicyHeader() {
return NS_OK; return NS_OK;
} }
// See https://gist.github.com/annevk/6f2dd8c79c77123f39797f6bdac43f3e // See https://gist.github.com/annevk/6f2dd8c79c77123f39797f6bdac43f3e
// This method runs steps 1-4 of the algorithm to compare // This method runs steps 1-4 of the algorithm to compare
// cross-origin-opener policies // cross-origin-opener policies

View file

@ -33,8 +33,8 @@ enum {
kCharsetFromOtherComponent, kCharsetFromOtherComponent,
kCharsetFromInitialUserForcedAutoDetection, kCharsetFromInitialUserForcedAutoDetection,
kCharsetFromFinalUserForcedAutoDetection, kCharsetFromFinalUserForcedAutoDetection,
kCharsetFromXmlDeclarationUtf16, // This one is overridden by kCharsetFromXmlDeclarationUtf16, // This one is overridden by
// kCharsetFromChannel // kCharsetFromChannel
kCharsetFromByteOrderMark, kCharsetFromByteOrderMark,
kCharsetFromUtf8OnlyMime, // For JSON, WebVTT and such kCharsetFromUtf8OnlyMime, // For JSON, WebVTT and such
kCharsetFromBuiltIn, // resource: URLs kCharsetFromBuiltIn, // resource: URLs

View file

@ -102,7 +102,7 @@ inline void CommandLineArg<uint64_t>::Put(uint64_t aValue,
} }
#if defined(__GNUC__) #if defined(__GNUC__)
#pragma GCC diagnostic ignored "-Wunused-variable" # pragma GCC diagnostic ignored "-Wunused-variable"
#endif #endif
static CommandLineArg<const char*> sParentBuildID{"-parentBuildID", static CommandLineArg<const char*> sParentBuildID{"-parentBuildID",