зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1519636 - Reformat recent changes to the Google coding style r=andi
# ignore-this-changeset Differential Revision: https://phabricator.services.mozilla.com/D73347
This commit is contained in:
Родитель
ac1ef7b1a2
Коммит
1929dd1ab3
|
@ -152,7 +152,8 @@ nsMacShellService::SetDesktopBackground(Element* aElement, int32_t aPosition,
|
|||
loadContext = do_QueryInterface(docShell);
|
||||
}
|
||||
|
||||
auto referrerInfo = mozilla::MakeRefPtr<mozilla::dom::ReferrerInfo>(*aElement);
|
||||
auto referrerInfo =
|
||||
mozilla::MakeRefPtr<mozilla::dom::ReferrerInfo>(*aElement);
|
||||
return wbp->SaveURI(imageURI, aElement->NodePrincipal(), 0, referrerInfo,
|
||||
nullptr, nullptr, mBackgroundFile,
|
||||
nsIContentPolicy::TYPE_IMAGE, loadContext);
|
||||
|
|
|
@ -2596,8 +2596,7 @@ void nsFocusManager::FireFocusOrBlurEvent(EventMessage aEventMessage,
|
|||
EventMessage focusInOrOutMessage =
|
||||
aEventMessage == eFocus ? eFocusIn : eFocusOut;
|
||||
FireFocusInOrOutEvent(focusInOrOutMessage, aPresShell, aTarget,
|
||||
currentWindow, currentFocusedContent,
|
||||
aRelatedTarget);
|
||||
currentWindow, currentFocusedContent, aRelatedTarget);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -487,7 +487,7 @@ class AutoSequence : public AutoTArray<T, 16> {
|
|||
AutoSequence() : AutoTArray<T, 16>() {}
|
||||
|
||||
// Allow converting to const sequences as needed
|
||||
operator const Sequence<T> &() const {
|
||||
operator const Sequence<T>&() const {
|
||||
return *reinterpret_cast<const Sequence<T>*>(this);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -114,7 +114,7 @@ void JSActorService::LoadJSActorInfos(nsTArray<JSProcessActorInfo>& aProcess,
|
|||
MOZ_ASSERT(NS_IsMainThread());
|
||||
MOZ_ASSERT(XRE_IsContentProcess());
|
||||
|
||||
for (auto& info: aProcess) {
|
||||
for (auto& info : aProcess) {
|
||||
// Create our JSProcessActorProtocol, register it in
|
||||
// mProcessActorDescriptors.
|
||||
auto name = info.name();
|
||||
|
@ -126,7 +126,7 @@ void JSActorService::LoadJSActorInfos(nsTArray<JSProcessActorInfo>& aProcess,
|
|||
proto->AddObservers();
|
||||
}
|
||||
|
||||
for (auto& info: aWindow) {
|
||||
for (auto& info : aWindow) {
|
||||
auto name = info.name();
|
||||
RefPtr<JSWindowActorProtocol> proto =
|
||||
JSWindowActorProtocol::FromIPC(std::move(info));
|
||||
|
|
|
@ -100,8 +100,7 @@ void ProcessActor::ConstructActor(const nsACString& aName,
|
|||
ctorName.Append(actorType == JSActor::Type::Parent
|
||||
? NS_LITERAL_CSTRING("Parent")
|
||||
: NS_LITERAL_CSTRING("Child"));
|
||||
if (!JS_GetProperty(cx, exports, ctorName.get(),
|
||||
&ctor)) {
|
||||
if (!JS_GetProperty(cx, exports, ctorName.get(), &ctor)) {
|
||||
aRv.NoteJSContextException(cx);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -1090,22 +1090,17 @@ void AudioCallbackDriver::PanOutputIfNeeded(bool aMicrophoneActive) {
|
|||
return;
|
||||
}
|
||||
|
||||
int major,minor;
|
||||
int major, minor;
|
||||
for (uint32_t i = 0; i < length; i++) {
|
||||
// skip the model name
|
||||
if (isalpha(name[i])) {
|
||||
continue;
|
||||
}
|
||||
sscanf(name+i, "%d,%d", &major, &minor);
|
||||
sscanf(name + i, "%d,%d", &major, &minor);
|
||||
break;
|
||||
}
|
||||
|
||||
enum MacbookModel {
|
||||
MacBook,
|
||||
MacBookPro,
|
||||
MacBookAir,
|
||||
NotAMacbook
|
||||
};
|
||||
enum MacbookModel { MacBook, MacBookPro, MacBookAir, NotAMacbook };
|
||||
|
||||
MacbookModel model;
|
||||
|
||||
|
|
|
@ -133,7 +133,8 @@ already_AddRefed<XRViewerPose> XRFrame::GetViewerPose(
|
|||
return viewerPose.forget();
|
||||
}
|
||||
|
||||
already_AddRefed<XRPose> XRFrame::GetPose(const XRSpace& aSpace, const XRSpace& aBaseSpace,
|
||||
already_AddRefed<XRPose> XRFrame::GetPose(const XRSpace& aSpace,
|
||||
const XRSpace& aBaseSpace,
|
||||
ErrorResult& aRv) {
|
||||
if (!mActive) {
|
||||
aRv.ThrowInvalidStateError(
|
||||
|
|
|
@ -45,8 +45,8 @@ class XRFrame final : public nsWrapperCache {
|
|||
XRSession* Session();
|
||||
already_AddRefed<XRViewerPose> GetViewerPose(
|
||||
const XRReferenceSpace& aReferenceSpace, ErrorResult& aRv);
|
||||
already_AddRefed<XRPose> GetPose(const XRSpace& aSpace, const XRSpace& aBaseSpace,
|
||||
ErrorResult& aRv);
|
||||
already_AddRefed<XRPose> GetPose(const XRSpace& aSpace,
|
||||
const XRSpace& aBaseSpace, ErrorResult& aRv);
|
||||
gfx::Matrix4x4 ConstructInlineProjection(float aFov, float aAspect,
|
||||
float aNear, float aFar);
|
||||
|
||||
|
|
|
@ -43,10 +43,10 @@ void gfxConfigManager::Init() {
|
|||
StaticPrefs::gfx_webrender_max_partial_present_rects_AtStartup() > 0;
|
||||
#ifdef XP_WIN
|
||||
mWrForceAngle = StaticPrefs::gfx_webrender_force_angle_AtStartup();
|
||||
#ifdef NIGHTLY_BUILD
|
||||
# ifdef NIGHTLY_BUILD
|
||||
mWrForceAngleNoGPUProcess = StaticPrefs::
|
||||
gfx_webrender_enabled_no_gpu_process_with_angle_win_AtStartup();
|
||||
#endif
|
||||
# endif
|
||||
mWrDCompWinEnabled =
|
||||
Preferences::GetBool("gfx.webrender.dcomp-win.enabled", false);
|
||||
#endif
|
||||
|
|
|
@ -37,7 +37,8 @@ void RemoteContentController::NotifyLayerTransforms(
|
|||
const nsTArray<MatrixMessage>& aTransforms) {
|
||||
if (!mCompositorThread->IsOnCurrentThread()) {
|
||||
// We have to send messages from the compositor thread
|
||||
mCompositorThread->Dispatch(NewRunnableMethod<CopyableTArray<MatrixMessage>>(
|
||||
mCompositorThread->Dispatch(
|
||||
NewRunnableMethod<CopyableTArray<MatrixMessage>>(
|
||||
"layers::RemoteContentController::NotifyLayerTransforms", this,
|
||||
&RemoteContentController::NotifyLayerTransforms, aTransforms));
|
||||
return;
|
||||
|
|
|
@ -1054,8 +1054,7 @@ void gfxDWriteFontList::AppendFamiliesFromCollection(
|
|||
if (key.EqualsLiteral("gill sans") && allFacesUltraBold(family)) {
|
||||
visibility = FontVisibility::Hidden;
|
||||
} else {
|
||||
visibility = aCollection == mSystemFonts
|
||||
? GetVisibilityForFamily(name)
|
||||
visibility = aCollection == mSystemFonts ? GetVisibilityForFamily(name)
|
||||
: FontVisibility::Base;
|
||||
}
|
||||
aFamilies.AppendElement(fontlist::Family::InitData(
|
||||
|
|
|
@ -377,8 +377,7 @@ struct MOZ_STACK_CLASS StackingContextParams : public WrStackingContextParams {
|
|||
nullptr,
|
||||
/* prim_flags = */ wr::PrimitiveFlags::IS_BACKFACE_VISIBLE,
|
||||
wr::MixBlendMode::Normal,
|
||||
wr::StackingContextFlags { 0 }
|
||||
} {}
|
||||
wr::StackingContextFlags{0}} {}
|
||||
|
||||
void SetPreserve3D(bool aPreserve) {
|
||||
transform_style =
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#include "nsIconDecoder.h"
|
||||
#include "nsWebPDecoder.h"
|
||||
#ifdef MOZ_AV1
|
||||
#include "nsAVIFDecoder.h"
|
||||
# include "nsAVIFDecoder.h"
|
||||
#endif
|
||||
|
||||
namespace mozilla {
|
||||
|
|
|
@ -242,7 +242,9 @@ class Nursery {
|
|||
return allocateCell(zone, size, JS::TraceKind::String);
|
||||
}
|
||||
|
||||
static size_t nurseryCellHeaderSize() { return sizeof(gc::NurseryCellHeader); }
|
||||
static size_t nurseryCellHeaderSize() {
|
||||
return sizeof(gc::NurseryCellHeader);
|
||||
}
|
||||
|
||||
// Allocate a buffer for a given zone, using the nursery if possible.
|
||||
void* allocateBuffer(JS::Zone* zone, size_t nbytes);
|
||||
|
|
|
@ -181,7 +181,6 @@ static bool IsDescendant(nsIFrame* aFrame, nsIContent* aAncestor,
|
|||
static nsIContent* GetClickableAncestor(
|
||||
nsIFrame* aFrame, nsAtom* stopAt = nullptr,
|
||||
nsAutoString* aLabelTargetId = nullptr) {
|
||||
|
||||
// If the frame is `cursor:pointer` or inherits `cursor:pointer` from an
|
||||
// ancestor, treat it as clickable. This is a heuristic to deal with pages
|
||||
// where the click event listener is on the <body> or <html> element but it
|
||||
|
|
|
@ -3039,9 +3039,9 @@ void nsBlockFrame::ReflowDirtyLines(BlockReflowInput& aState) {
|
|||
fm, aState.mMinLineHeight, wm.IsLineInverted());
|
||||
nscoord minDescent = aState.mMinLineHeight - minAscent;
|
||||
|
||||
aState.mBCoord += std::max(minAscent, metrics.BlockStartAscent()) +
|
||||
std::max(minDescent, metrics.BSize(wm) -
|
||||
metrics.BlockStartAscent());
|
||||
aState.mBCoord +=
|
||||
std::max(minAscent, metrics.BlockStartAscent()) +
|
||||
std::max(minDescent, metrics.BSize(wm) - metrics.BlockStartAscent());
|
||||
|
||||
nscoord offset = minAscent - metrics.BlockStartAscent();
|
||||
if (offset > 0) {
|
||||
|
|
|
@ -413,8 +413,7 @@ bool nsHTMLScrollFrame::TryLayout(ScrollReflowInput* aState,
|
|||
|
||||
nsSize vScrollbarPrefSize(0, 0);
|
||||
if (mHelper.mVScrollbarBox) {
|
||||
GetScrollbarMetrics(aState->mBoxState, mHelper.mVScrollbarBox,
|
||||
nullptr,
|
||||
GetScrollbarMetrics(aState->mBoxState, mHelper.mVScrollbarBox, nullptr,
|
||||
aAssumeVScroll ? &vScrollbarPrefSize : nullptr);
|
||||
nsScrollbarFrame* scrollbar = do_QueryFrame(mHelper.mVScrollbarBox);
|
||||
scrollbar->SetScrollbarMediatorContent(mContent);
|
||||
|
@ -424,8 +423,7 @@ bool nsHTMLScrollFrame::TryLayout(ScrollReflowInput* aState,
|
|||
|
||||
nsSize hScrollbarPrefSize(0, 0);
|
||||
if (mHelper.mHScrollbarBox) {
|
||||
GetScrollbarMetrics(aState->mBoxState, mHelper.mHScrollbarBox,
|
||||
nullptr,
|
||||
GetScrollbarMetrics(aState->mBoxState, mHelper.mHScrollbarBox, nullptr,
|
||||
aAssumeHScroll ? &hScrollbarPrefSize : nullptr);
|
||||
nsScrollbarFrame* scrollbar = do_QueryFrame(mHelper.mHScrollbarBox);
|
||||
scrollbar->SetScrollbarMediatorContent(mContent);
|
||||
|
|
|
@ -23,7 +23,8 @@ MediaPipelineFilter::MediaPipelineFilter(
|
|||
const std::vector<webrtc::RtpExtension>& aExtMap)
|
||||
: mExtMap(aExtMap) {}
|
||||
|
||||
void MediaPipelineFilter::SetRemoteMediaStreamId(const Maybe<std::string>& aMid) {
|
||||
void MediaPipelineFilter::SetRemoteMediaStreamId(
|
||||
const Maybe<std::string>& aMid) {
|
||||
if (aMid != mRemoteMid) {
|
||||
DEBUG_LOG(("MediaPipelineFilter added new remote RTP MID: '%s'.",
|
||||
aMid.valueOr("").c_str()));
|
||||
|
|
|
@ -897,8 +897,7 @@ nsNavHistory::CanAddURI(nsIURI* aURI, bool* canAdd) {
|
|||
// Helper for nsNavHistory::CanAddURI to be callable from a child process
|
||||
|
||||
// static
|
||||
nsresult
|
||||
nsNavHistory::CanAddURIToHistory(nsIURI* aURI, bool* aCanAdd) {
|
||||
nsresult nsNavHistory::CanAddURIToHistory(nsIURI* aURI, bool* aCanAdd) {
|
||||
// Default to false.
|
||||
*aCanAdd = false;
|
||||
|
||||
|
|
|
@ -1805,12 +1805,11 @@ const nsTArray<GfxDriverInfo>& GfxInfo::GetGfxDriverInfo() {
|
|||
"FEATURE_ROLLOUT_BATTERY_S_SCRN_NV_RECENT");
|
||||
|
||||
APPEND_TO_DRIVER_BLOCKLIST2_EXT(
|
||||
OperatingSystem::Windows, ScreenSizeStatus::Small,
|
||||
BatteryStatus::None, DesktopEnvironment::All, WindowProtocol::All,
|
||||
DriverVendor::All, DeviceFamily::IntelRolloutWebRender,
|
||||
nsIGfxInfo::FEATURE_WEBRENDER, nsIGfxInfo::FEATURE_ALLOW_ALWAYS,
|
||||
DRIVER_COMPARISON_IGNORED, V(0, 0, 0, 0),
|
||||
"FEATURE_ROLLOUT_DESKTOP_INTEL_S_SCRN");
|
||||
OperatingSystem::Windows, ScreenSizeStatus::Small, BatteryStatus::None,
|
||||
DesktopEnvironment::All, WindowProtocol::All, DriverVendor::All,
|
||||
DeviceFamily::IntelRolloutWebRender, nsIGfxInfo::FEATURE_WEBRENDER,
|
||||
nsIGfxInfo::FEATURE_ALLOW_ALWAYS, DRIVER_COMPARISON_IGNORED,
|
||||
V(0, 0, 0, 0), "FEATURE_ROLLOUT_DESKTOP_INTEL_S_SCRN");
|
||||
|
||||
APPEND_TO_DRIVER_BLOCKLIST2_EXT(
|
||||
OperatingSystem::RecentWindows10, ScreenSizeStatus::Small,
|
||||
|
|
Загрузка…
Ссылка в новой задаче