Bug 1519636 - Reformat recent changes to the Google coding style r=andi

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D98301
This commit is contained in:
Sylvestre Ledru 2020-12-07 10:17:57 +00:00
Родитель c4d12fb790
Коммит bbb5f8a339
12 изменённых файлов: 35 добавлений и 33 удалений

Просмотреть файл

@ -327,7 +327,7 @@
#include "nsIURI.h"
#include "nsIURIMutator.h"
#if defined(MOZ_THUNDERBIRD) || defined(MOZ_SUITE)
#include "nsIURIWithSpecialOrigin.h"
# include "nsIURIWithSpecialOrigin.h"
#endif
#include "nsIUUIDGenerator.h"
#include "nsIUserIdleService.h"

Просмотреть файл

@ -20,7 +20,7 @@ class DeclarationBlock;
namespace mozilla::dom {
class DocumentFragment;
class Element;
}
} // namespace mozilla::dom
/**
* See the documentation of nsIParserUtils::sanitize for documentation

Просмотреть файл

@ -1518,8 +1518,9 @@ void WebGLFramebuffer::BlitFramebuffer(WebGLContext* webgl, GLint _srcX0,
// -
// Mutually constrain src and dst rects for eldritch blits.
[&]{
using fvec2 = avec2<float>; // Switch to float, because there's no perfect solution anyway.
[&] {
using fvec2 = avec2<float>; // Switch to float, because there's no perfect
// solution anyway.
const auto zero2f = fvec2{0, 0};
const auto srcSizef = AsVec(srcSize).StaticCast<fvec2>();
@ -1535,7 +1536,7 @@ void WebGLFramebuffer::BlitFramebuffer(WebGLContext* webgl, GLint _srcX0,
// Skip if zero-sized.
if (!srcRectDiff.x || !srcRectDiff.y || !dstRectDiff.x || !dstRectDiff.y) {
srcP0 = srcP1 = dstP0 = dstP1 = {0,0};
srcP0 = srcP1 = dstP0 = dstP1 = {0, 0};
return;
}
@ -1575,12 +1576,13 @@ void WebGLFramebuffer::BlitFramebuffer(WebGLContext* webgl, GLint _srcX0,
}();
bool inBounds = true;
inBounds &= ( srcP0 == srcP0.Clamp({0,0}, AsVec(srcSize)) );
inBounds &= ( srcP1 == srcP1.Clamp({0,0}, AsVec(srcSize)) );
inBounds &= ( dstP0 == dstP0.Clamp({0,0}, AsVec(dstSize)) );
inBounds &= ( dstP1 == dstP1.Clamp({0,0}, AsVec(dstSize)) );
inBounds &= (srcP0 == srcP0.Clamp({0, 0}, AsVec(srcSize)));
inBounds &= (srcP1 == srcP1.Clamp({0, 0}, AsVec(srcSize)));
inBounds &= (dstP0 == dstP0.Clamp({0, 0}, AsVec(dstSize)));
inBounds &= (dstP1 == dstP1.Clamp({0, 0}, AsVec(dstSize)));
if (!inBounds) {
webgl->ErrorImplementationBug("Subrects still not within src and dst after constraining.");
webgl->ErrorImplementationBug(
"Subrects still not within src and dst after constraining.");
return;
}

Просмотреть файл

@ -445,12 +445,12 @@ struct avec2 {
}
};
template<typename T>
template <typename T>
avec2<T> MinExtents(const avec2<T>& a, const avec2<T>& b) {
return {std::min(a.x, b.x), std::min(a.y, b.y)};
}
template<typename T>
template <typename T>
avec2<T> MaxExtents(const avec2<T>& a, const avec2<T>& b) {
return {std::max(a.x, b.x), std::max(a.y, b.y)};
}

Просмотреть файл

@ -151,7 +151,8 @@ void JSActor::SetName(const nsACString& aName) {
mName = aName;
}
void JSActor::ThrowStateErrorForGetter(const char* aName, ErrorResult& aRv) const {
void JSActor::ThrowStateErrorForGetter(const char* aName,
ErrorResult& aRv) const {
if (mName.IsEmpty()) {
aRv.ThrowInvalidStateError(nsPrintfCString(
"Cannot access property '%s' before actor is initialized", aName));

Просмотреть файл

@ -167,8 +167,7 @@ mozilla::ipc::IPCResult RDDParent::RecvNewContentRemoteDecoderManager(
}
mozilla::ipc::IPCResult RDDParent::RecvInitVideoBridge(
Endpoint<PVideoBridgeChild>&& aEndpoint,
const bool& aCreateHardwareDevice,
Endpoint<PVideoBridgeChild>&& aEndpoint, const bool& aCreateHardwareDevice,
const ContentDeviceData& aContentDeviceData) {
if (!RemoteDecoderManagerParent::CreateVideoBridgeToOtherProcess(
std::move(aEndpoint))) {

Просмотреть файл

@ -321,6 +321,6 @@ void safevals() {
class Subcell : public Cell {
int method() {
GC();
return f; // this->f
return f; // this->f
}
};

Просмотреть файл

@ -77,9 +77,11 @@ void CodeGenerator::visitTestIAndBranch(LTestIAndBranch* test) {
// Jump to the True block if NonZero.
// Jump to the False block if Zero.
if (isNextBlock(mirFalse->lir())) {
masm.branch32(Assembler::NonZero, input, Imm32(0), getJumpLabelForBranch(mirTrue));
masm.branch32(Assembler::NonZero, input, Imm32(0),
getJumpLabelForBranch(mirTrue));
} else {
masm.branch32(Assembler::Zero, input, Imm32(0), getJumpLabelForBranch(mirFalse));
masm.branch32(Assembler::Zero, input, Imm32(0),
getJumpLabelForBranch(mirFalse));
if (!isNextBlock(mirTrue->lir())) {
jumpToBlock(mirTrue);
}

Просмотреть файл

@ -588,9 +588,8 @@ static void BuildPreviousPageOverflow(nsDisplayListBuilder* aBuilder,
// This rect represents the piece of prevPageCF's overflow that ends up on
// the current pageContentFrame (in prevPageCF's coordinate system).
// Note that we use InkOverflow here since this is for painting.
LogicalRect overflowRect(
wm, prevPageCF->InkOverflowRectRelativeToSelf(),
prevPageCF->GetSize());
LogicalRect overflowRect(wm, prevPageCF->InkOverflowRectRelativeToSelf(),
prevPageCF->GetSize());
overflowRect.BStart(wm) = offsetToCurrentPageBStart;
overflowRect.BSize(wm) = std::min(remainingOverflow, prevPageCF->BSize(wm));

Просмотреть файл

@ -101,8 +101,8 @@ class nsSplittableFrame : public nsIFrame {
* computed block size, minus the block size consumed by any previous
* continuations.
*/
nscoord GetEffectiveComputedBSize(
const ReflowInput& aReflowInput, nscoord aConsumed) const;
nscoord GetEffectiveComputedBSize(const ReflowInput& aReflowInput,
nscoord aConsumed) const;
/**
* @see nsIFrame::GetLogicalSkipSides()

Просмотреть файл

@ -57,13 +57,11 @@ nsNativeBasicThemeGTK::GetMinimumWidgetSize(nsPresContext* aPresContext,
case StyleAppearance::Scrollcorner: {
ComputedStyle* style = nsLayoutUtils::StyleForScrollbar(aFrame);
if (style->StyleUIReset()->mScrollbarWidth == StyleScrollbarWidth::Thin) {
aResult->SizeTo(
kGtkMinimumThinScrollbarSize * dpiRatio,
kGtkMinimumThinScrollbarSize * dpiRatio);
aResult->SizeTo(kGtkMinimumThinScrollbarSize * dpiRatio,
kGtkMinimumThinScrollbarSize * dpiRatio);
} else {
aResult->SizeTo(
kGtkMinimumScrollbarSize * dpiRatio,
kGtkMinimumScrollbarSize * dpiRatio);
aResult->SizeTo(kGtkMinimumScrollbarSize * dpiRatio,
kGtkMinimumScrollbarSize * dpiRatio);
}
break;
}

Просмотреть файл

@ -1762,10 +1762,11 @@ const nsTArray<GfxDriverInfo>& GfxInfo::GetGfxDriverInfo() {
"FEATURE_UNQUALIFIED_WEBRENDER_NVIDIA_BLOCKED");
// Block 8.56.1.15/16
APPEND_TO_DRIVER_BLOCKLIST2(
OperatingSystem::Windows, DeviceFamily::AtiAll,
nsIGfxInfo::FEATURE_WEBRENDER, nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION,
DRIVER_LESS_THAN_OR_EQUAL, V(8, 56, 1, 16), "CRASHY_DRIVERS_BUG_1678808");
APPEND_TO_DRIVER_BLOCKLIST2(OperatingSystem::Windows, DeviceFamily::AtiAll,
nsIGfxInfo::FEATURE_WEBRENDER,
nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION,
DRIVER_LESS_THAN_OR_EQUAL, V(8, 56, 1, 16),
"CRASHY_DRIVERS_BUG_1678808");
////////////////////////////////////
// FEATURE_WEBRENDER - ALLOWLIST