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

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D41559

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Sylvestre Ledru 2019-08-13 07:15:25 +00:00
parent 609348ba4d
commit 645f2d5773
68 changed files with 228 additions and 239 deletions

View File

@ -148,7 +148,7 @@ class OriginAttributesPattern : public dom::OriginAttributesPatternDictionary {
if (mGeckoViewSessionContextId.WasPassed() &&
mGeckoViewSessionContextId.Value() !=
aAttrs.mGeckoViewSessionContextId) {
aAttrs.mGeckoViewSessionContextId) {
return false;
}
@ -181,7 +181,7 @@ class OriginAttributesPattern : public dom::OriginAttributesPatternDictionary {
if (mGeckoViewSessionContextId.WasPassed() &&
aOther.mGeckoViewSessionContextId.WasPassed() &&
mGeckoViewSessionContextId.Value() !=
aOther.mGeckoViewSessionContextId.Value()) {
aOther.mGeckoViewSessionContextId.Value()) {
return false;
}

View File

@ -554,8 +554,7 @@ bool BrowsingContext::CanAccess(BrowsingContext* aTarget,
// A frame can navigate any frame with a same-origin ancestor.
for (BrowsingContext* bc = aTarget; bc; bc = bc->GetParent()) {
if (bc->mDocShell &&
nsDocShell::ValidateOrigin(mDocShell, bc->mDocShell)) {
if (bc->mDocShell && nsDocShell::ValidateOrigin(mDocShell, bc->mDocShell)) {
return true;
}
}

View File

@ -757,7 +757,6 @@ void Location::Reload(bool aForceget, ErrorResult& aRv) {
}
}
uint32_t reloadFlags = nsIWebNavigation::LOAD_FLAGS_NONE;
if (aForceget) {

View File

@ -1483,12 +1483,11 @@ nsresult nsContentSink::WillParseImpl(void) {
uint32_t lastEventTime;
vm->GetLastUserEventTime(lastEventTime);
bool newDynLower =
mDocument->IsInBackgroundWindow() ||
((currentTime - mBeginLoadTime) >
StaticPrefs::content_sink_initial_perf_time() &&
(currentTime - lastEventTime) <
StaticPrefs::content_sink_interactive_time());
bool newDynLower = mDocument->IsInBackgroundWindow() ||
((currentTime - mBeginLoadTime) >
StaticPrefs::content_sink_initial_perf_time() &&
(currentTime - lastEventTime) <
StaticPrefs::content_sink_interactive_time());
if (mDynamicLowerValue != newDynLower) {
FavorPerformanceHint(!newDynLower, 0);

View File

@ -772,8 +772,8 @@ nsresult HTMLInputElement::InitFilePicker(FilePickerType aType) {
SetFilePickerFiltersFromAccept(filePicker);
if (StaticPrefs::dom_capture_enabled()) {
const nsAttrValue* captureVal = GetParsedAttr(nsGkAtoms::capture,
kNameSpaceID_None);
const nsAttrValue* captureVal =
GetParsedAttr(nsGkAtoms::capture, kNameSpaceID_None);
if (captureVal) {
filePicker->SetCapture(captureVal->GetEnumValue());
}
@ -1341,8 +1341,8 @@ nsresult HTMLInputElement::AfterSetAttr(int32_t aNameSpaceID, nsAtom* aName,
AsyncEventDispatcher* dispatcher = new AsyncEventDispatcher(
dateTimeBoxElement,
aName == nsGkAtoms::value
? NS_LITERAL_STRING("MozDateTimeValueChanged")
: NS_LITERAL_STRING("MozDateTimeAttributeChanged"),
? NS_LITERAL_STRING("MozDateTimeValueChanged")
: NS_LITERAL_STRING("MozDateTimeAttributeChanged"),
CanBubble::eNo, ChromeOnlyDispatch::eNo);
dispatcher->RunDOMEventWhenSafe();
}
@ -5254,7 +5254,8 @@ bool HTMLInputElement::ParseAttribute(int32_t aNamespaceID, nsAtom* aAttribute,
return aResult.ParseEnumValue(aValue, kInputInputmodeTable, false);
}
if (aAttribute == nsGkAtoms::capture) {
return aResult.ParseEnumValue(aValue, kCaptureTable, false, kCaptureDefault);
return aResult.ParseEnumValue(aValue, kCaptureTable, false,
kCaptureDefault);
}
if (ParseImageAttribute(aAttribute, aValue, aResult)) {
// We have to call |ParseImageAttribute| unconditionally since we

View File

@ -2682,9 +2682,8 @@ nsresult nsGenericHTMLElement::NewURIFromString(const nsAString& aURISpec,
nsCOMPtr<Document> doc = OwnerDoc();
nsresult rv =
nsContentUtils::NewURIWithDocumentCharset(aURI, aURISpec, doc,
GetBaseURI());
nsresult rv = nsContentUtils::NewURIWithDocumentCharset(aURI, aURISpec, doc,
GetBaseURI());
NS_ENSURE_SUCCESS(rv, rv);
bool equal;

View File

@ -114,7 +114,8 @@ class nsHTMLDocument : public mozilla::dom::Document {
mozilla::ErrorResult& rv) {
JS::Rooted<JS::Value> v(cx);
if ((aFound = ResolveName(cx, aName, &v, rv))) {
SetDocumentAndPageUseCounter(mozilla::eUseCounter_custom_HTMLDocumentNamedGetterHit);
SetDocumentAndPageUseCounter(
mozilla::eUseCounter_custom_HTMLDocumentNamedGetterHit);
aRetval.set(v.toObjectOrNull());
}
}

View File

@ -328,7 +328,8 @@ already_AddRefed<Promise> WindowGlobalParent::ChangeFrameRemoteness(
// in-process frame. For remote frames, the BrowserBridgeParent::Init
// method should've already set up the OwnerProcessId.
uint64_t childId = browserParent->Manager()->ChildID();
MOZ_ASSERT_IF(bridge, browsingContext == browserParent->GetBrowsingContext());
MOZ_ASSERT_IF(bridge,
browsingContext == browserParent->GetBrowsingContext());
MOZ_ASSERT_IF(bridge, browsingContext->IsOwnedByProcess(childId));
browsingContext->SetOwnerProcessId(childId);

View File

@ -572,8 +572,7 @@ void MediaDecoder::SetStateMachineParameters() {
mOnNextFrameStatus = mDecoderStateMachine->OnNextFrameStatus().Connect(
mAbstractMainThread, this, &MediaDecoder::OnNextFrameStatus);
mOnStoreDecoderBenchmark = mReader->OnStoreDecoderBenchmark().Connect(
mAbstractMainThread, this,
&MediaDecoder::OnStoreDecoderBenchmark);
mAbstractMainThread, this, &MediaDecoder::OnStoreDecoderBenchmark);
mOnEncrypted = mReader->OnEncrypted().Connect(
mAbstractMainThread, GetOwner(), &MediaDecoderOwner::DispatchEncrypted);

View File

@ -42,7 +42,7 @@ static int FuzzingInitMedia(int* argc, char*** argv) {
#define MOZ_MEDIA_FUZZER(_name) \
static int FuzzingRunMedia##_name(const uint8_t* data, size_t size) { \
if (!size) { \
return 0; \
return 0; \
} \
RefPtr<BufferMediaResource> resource = \
new BufferMediaResource(data, size); \

View File

@ -235,6 +235,7 @@ already_AddRefed<Promise> MediaCapabilities::DecodingInfo(
RefPtr<layers::KnowsCompositor> compositor = GetCompositor();
double frameRate = videoContainer->ExtendedType().GetFramerate().ref();
// clang-format off
promises.AppendElement(InvokeAsync(
taskQueue, __func__,
[taskQueue, frameRate, compositor,
@ -375,6 +376,7 @@ already_AddRefed<Promise> MediaCapabilities::DecodingInfo(
return p;
});
}));
// clang-format on
}
auto holder = MakeRefPtr<

View File

@ -127,7 +127,8 @@ WebBrowserPersistLocalDocument::GetTitle(nsAString& aTitle) {
}
NS_IMETHODIMP
WebBrowserPersistLocalDocument::GetReferrerInfo(nsIReferrerInfo** aReferrerInfo) {
WebBrowserPersistLocalDocument::GetReferrerInfo(
nsIReferrerInfo** aReferrerInfo) {
*aReferrerInfo = mDocument->GetReferrerInfo();
NS_IF_ADDREF(*aReferrerInfo);
return NS_OK;

View File

@ -73,7 +73,8 @@ WebBrowserPersistRemoteDocument::GetTitle(nsAString& aTitle) {
}
NS_IMETHODIMP
WebBrowserPersistRemoteDocument::GetReferrerInfo(nsIReferrerInfo** aReferrerInfo) {
WebBrowserPersistRemoteDocument::GetReferrerInfo(
nsIReferrerInfo** aReferrerInfo) {
*aReferrerInfo = mAttrs.referrerInfo();
NS_IF_ADDREF(*aReferrerInfo);
return NS_OK;

View File

@ -2711,7 +2711,8 @@ RecordedDrawSurfaceWithShadow::RecordedDrawSurfaceWithShadow(S& aStream)
ReadElement(aStream, mColor);
ReadElement(aStream, mOffset);
ReadElement(aStream, mSigma);
ReadElementConstrained(aStream, mOp, CompositionOp::OP_OVER, CompositionOp::OP_COUNT);
ReadElementConstrained(aStream, mOp, CompositionOp::OP_OVER,
CompositionOp::OP_COUNT);
}
inline void RecordedDrawSurfaceWithShadow::OutputSimpleEventInfo(

View File

@ -35,9 +35,8 @@ class ScaledFontDWrite final : public ScaledFontBase {
const RefPtr<UnscaledFont>& aUnscaledFont, Float aSize,
bool aUseEmbeddedBitmap,
DWRITE_RENDERING_MODE aRenderingMode,
IDWriteRenderingParams* aParams,
Float aGamma, Float aContrast,
const gfxFontStyle* aStyle = nullptr);
IDWriteRenderingParams* aParams, Float aGamma,
Float aContrast, const gfxFontStyle* aStyle = nullptr);
FontType GetType() const override { return FontType::DWRITE; }
@ -64,7 +63,9 @@ class ScaledFontDWrite final : public ScaledFontBase {
AntialiasMode GetDefaultAAMode() override;
bool UseEmbeddedBitmaps() const { return mUseEmbeddedBitmap; }
bool ForceGDIMode() const { return mRenderingMode == DWRITE_RENDERING_MODE_GDI_CLASSIC; }
bool ForceGDIMode() const {
return mRenderingMode == DWRITE_RENDERING_MODE_GDI_CLASSIC;
}
DWRITE_RENDERING_MODE GetRenderingMode() const { return mRenderingMode; }
#ifdef USE_SKIA

View File

@ -156,11 +156,7 @@ enum class ColorDepth : uint8_t {
UNKNOWN
};
enum class ColorRange : uint8_t {
LIMITED,
FULL,
UNKNOWN
};
enum class ColorRange : uint8_t { LIMITED, FULL, UNKNOWN };
static inline SurfaceFormat SurfaceFormatForColorDepth(ColorDepth aColorDepth) {
SurfaceFormat format = SurfaceFormat::A8;

View File

@ -7,7 +7,7 @@
#ifndef GFX_FRAMEMETRICS_H
#define GFX_FRAMEMETRICS_H
#include <stdint.h> // for uint8_t, uint32_t, uint64_t
#include <stdint.h> // for uint8_t, uint32_t, uint64_t
#include "Units.h" // for CSSRect, CSSPixel, etc
#include "mozilla/DefineEnum.h" // for MOZ_DEFINE_ENUM
#include "mozilla/HashFunctions.h" // for HashGeneric

View File

@ -25,7 +25,7 @@
#include "mozilla/layers/TextureClient.h" // for TextureClient
#include "mozilla/Move.h" // for Move
#include "mozilla/StaticPrefs_layers.h"
#include "mozilla/gfx/Point.h" // for IntSize
#include "mozilla/gfx/Point.h" // for IntSize
#include "gfx2DGlue.h"
#include "nsLayoutUtils.h" // for invalidation debugging
#include "PaintThread.h"

View File

@ -2601,15 +2601,15 @@ already_AddRefed<AsyncPanZoomController> APZCTreeManager::GetAPZCAtPointWR(
ScrollableLayerGuid guid{layersId, 0, scrollId};
if (RefPtr<HitTestingTreeNode> node =
GetTargetNode(guid, &GuidComparatorIgnoringPresShell)) {
MOZ_ASSERT(node->GetApzc()); // any node returned must have an APZC
MOZ_ASSERT(node->GetApzc()); // any node returned must have an APZC
result = node->GetApzc();
EventRegionsOverride flags = node->GetEventRegionsOverride();
if (flags & EventRegionsOverride::ForceDispatchToContent) {
hitInfo += CompositorHitTestFlags::eApzAwareListeners;
}
}
APZCTM_LOG("Successfully matched APZC %p (hit result 0x%x)\n",
result.get(), hitInfo.serialize());
APZCTM_LOG("Successfully matched APZC %p (hit result 0x%x)\n", result.get(),
hitInfo.serialize());
if (!result) {
// It falls back to the root
MOZ_ASSERT(scrollId == ScrollableLayerGuid::NULL_SCROLL_ID);

View File

@ -14,10 +14,10 @@
#include "mozilla/StaticPrefs_apz.h"
#include "mozilla/StaticPrefs_general.h"
#include "mozilla/StaticPrefs_test.h"
#include "mozilla/TextEvents.h" // for WidgetKeyboardEvent
#include "mozilla/TouchEvents.h" // for WidgetTouchEvent
#include "mozilla/WheelHandlingHelper.h" // for WheelDeltaHorizontalizer,
// WheelDeltaAdjustmentStrategy
#include "mozilla/TextEvents.h" // for WidgetKeyboardEvent
#include "mozilla/TouchEvents.h" // for WidgetTouchEvent
#include "mozilla/WheelHandlingHelper.h" // for WheelDeltaHorizontalizer,
// WheelDeltaAdjustmentStrategy
namespace mozilla {
namespace layers {

View File

@ -54,8 +54,8 @@
#include "mozilla/StaticPrefs_slider.h"
#include "mozilla/StaticPrefs_test.h"
#include "mozilla/StaticPrefs_toolkit.h"
#include "mozilla/Telemetry.h" // for Telemetry
#include "mozilla/TimeStamp.h" // for TimeDuration, TimeStamp
#include "mozilla/Telemetry.h" // for Telemetry
#include "mozilla/TimeStamp.h" // for TimeDuration, TimeStamp
#include "mozilla/dom/CheckerboardReportService.h" // for CheckerboardEventStorage
// note: CheckerboardReportService.h actually lives in gfx/layers/apz/util/
#include "mozilla/dom/Touch.h" // for Touch

View File

@ -12,8 +12,8 @@
#include "mozilla/EventDispatcher.h" // for EventDispatcher
#include "mozilla/PresShell.h" // For PresShell
#include "mozilla/StaticPrefs_apz.h"
#include "nsIContentInlines.h" // for nsINode::IsEditable()
#include "nsLayoutUtils.h" // for nsLayoutUtils
#include "nsIContentInlines.h" // for nsINode::IsEditable()
#include "nsLayoutUtils.h" // for nsLayoutUtils
#define ENABLE_FT_LOGGING 0
// #define ENABLE_FT_LOGGING 1

View File

@ -13,8 +13,8 @@
#include "InputBlockState.h" // for TouchBlockState
#include "mozilla/StaticPrefs_apz.h"
#include "mozilla/StaticPrefs_ui.h"
#include "nsDebug.h" // for NS_WARNING
#include "nsMathUtils.h" // for NS_hypot
#include "nsDebug.h" // for NS_WARNING
#include "nsMathUtils.h" // for NS_hypot
#define GEL_LOG(...)
// #define GEL_LOG(...) printf_stderr("GEL: " __VA_ARGS__)

View File

@ -257,7 +257,8 @@ nsEventStatus InputQueue::ReceiveScrollWheelInput(
if (!block) {
block = new WheelBlockState(aTarget, aFlags, aEvent);
INPQ_LOG("started new scroll wheel block %p id %" PRIu64 " for %starget %p\n",
INPQ_LOG("started new scroll wheel block %p id %" PRIu64
" for %starget %p\n",
block, block->GetBlockId(),
aFlags.mTargetConfirmed ? "confirmed " : "", aTarget.get());

View File

@ -24,11 +24,11 @@
#include "gfxMatrix.h" // for gfxMatrix
#include "gfxPlatform.h" // for gfxPlatform
#include "gfxPoint.h" // for IntSize, gfxPoint
#include "gfxRect.h" // for gfxRect
#include "gfxUtils.h" // for gfxUtils
#include "gfx2DGlue.h" // for thebes --> moz2d transition
#include "mozilla/Assertions.h" // for MOZ_ASSERT, etc
#include "gfxPoint.h" // for IntSize, gfxPoint
#include "gfxRect.h" // for gfxRect
#include "gfxUtils.h" // for gfxUtils
#include "gfx2DGlue.h" // for thebes --> moz2d transition
#include "mozilla/Assertions.h" // for MOZ_ASSERT, etc
#include "mozilla/StaticPrefs_nglayout.h"
#include "mozilla/WidgetUtils.h" // for ScreenRotation
#include "mozilla/gfx/2D.h" // for DrawTarget

View File

@ -9,9 +9,9 @@
#include <stdint.h> // for int32_t
#include "Layers.h"
#include "gfxContext.h" // for gfxContext
#include "mozilla/Attributes.h" // for override
#include "mozilla/LinkedList.h" // for LinkedList
#include "gfxContext.h" // for gfxContext
#include "mozilla/Attributes.h" // for override
#include "mozilla/LinkedList.h" // for LinkedList
#include "mozilla/StaticPrefs_apz.h"
#include "mozilla/WidgetUtils.h" // for ScreenRotation
#include "mozilla/gfx/Rect.h" // for Rect

View File

@ -5,13 +5,13 @@
* You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "ClientTiledPaintedLayer.h"
#include "FrameMetrics.h" // for FrameMetrics
#include "Units.h" // for ScreenIntRect, CSSPoint, etc
#include "UnitTransforms.h" // for TransformTo
#include "ClientLayerManager.h" // for ClientLayerManager, etc
#include "gfxPlatform.h" // for gfxPlatform
#include "gfxRect.h" // for gfxRect
#include "mozilla/Assertions.h" // for MOZ_ASSERT, etc
#include "FrameMetrics.h" // for FrameMetrics
#include "Units.h" // for ScreenIntRect, CSSPoint, etc
#include "UnitTransforms.h" // for TransformTo
#include "ClientLayerManager.h" // for ClientLayerManager, etc
#include "gfxPlatform.h" // for gfxPlatform
#include "gfxRect.h" // for gfxRect
#include "mozilla/Assertions.h" // for MOZ_ASSERT, etc
#include "mozilla/StaticPrefs_layers.h"
#include "mozilla/StaticPrefs_layout.h"
#include "mozilla/gfx/BaseSize.h" // for BaseSize

View File

@ -15,9 +15,9 @@
#include "gfxRect.h" // for gfxRect
#include "mozilla/MathAlgorithms.h" // for Abs
#include "mozilla/StaticPrefs_apz.h"
#include "mozilla/gfx/Point.h" // for IntSize
#include "mozilla/gfx/Rect.h" // for Rect
#include "mozilla/gfx/Tools.h" // for BytesPerPixel
#include "mozilla/gfx/Point.h" // for IntSize
#include "mozilla/gfx/Rect.h" // for Rect
#include "mozilla/gfx/Tools.h" // for BytesPerPixel
#include "mozilla/layers/CompositableForwarder.h"
#include "mozilla/layers/CompositorBridgeChild.h" // for CompositorBridgeChild
#include "mozilla/layers/LayerMetricsWrapper.h"

View File

@ -12,10 +12,10 @@
#include "mozilla/ServoBindings.h" // for Servo_AnimationValue_GetOpacity, etc
#include "mozilla/StaticPrefs_apz.h"
#include "mozilla/StaticPrefs_gfx.h"
#include "mozilla/WidgetUtils.h" // for ComputeTransformForRotation
#include "mozilla/gfx/BaseRect.h" // for BaseRect
#include "mozilla/gfx/Point.h" // for RoundedToInt, PointTyped
#include "mozilla/gfx/Rect.h" // for RoundedToInt, RectTyped
#include "mozilla/WidgetUtils.h" // for ComputeTransformForRotation
#include "mozilla/gfx/BaseRect.h" // for BaseRect
#include "mozilla/gfx/Point.h" // for RoundedToInt, PointTyped
#include "mozilla/gfx/Rect.h" // for RoundedToInt, RectTyped
#include "mozilla/gfx/ScaleFactor.h" // for ScaleFactor
#include "mozilla/layers/AnimationHelper.h"
#include "mozilla/layers/APZSampler.h" // for APZSampler

View File

@ -5,13 +5,13 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "ContainerLayerComposite.h"
#include <algorithm> // for min
#include "FrameMetrics.h" // for FrameMetrics
#include "Units.h" // for LayerRect, LayerPixel, etc
#include "CompositableHost.h" // for CompositableHost
#include "gfxEnv.h" // for gfxEnv
#include "mozilla/Assertions.h" // for MOZ_ASSERT, etc
#include "mozilla/RefPtr.h" // for RefPtr
#include <algorithm> // for min
#include "FrameMetrics.h" // for FrameMetrics
#include "Units.h" // for LayerRect, LayerPixel, etc
#include "CompositableHost.h" // for CompositableHost
#include "gfxEnv.h" // for gfxEnv
#include "mozilla/Assertions.h" // for MOZ_ASSERT, etc
#include "mozilla/RefPtr.h" // for RefPtr
#include "mozilla/StaticPrefs_apz.h"
#include "mozilla/StaticPrefs_layers.h"
#include "mozilla/UniquePtr.h" // for UniquePtr

View File

@ -18,9 +18,9 @@
#include "mozilla/DebugOnly.h" // for DebugOnly
#include "mozilla/StaticPrefs_gfx.h"
#include "mozilla/StaticPrefs_layers.h"
#include "mozilla/gfx/2D.h" // for DrawTarget
#include "mozilla/gfx/Point.h" // for IntSize
#include "mozilla/gfx/Rect.h" // for IntSize
#include "mozilla/gfx/2D.h" // for DrawTarget
#include "mozilla/gfx/Point.h" // for IntSize
#include "mozilla/gfx/Rect.h" // for IntSize
#include "mozilla/layers/CompositorThread.h"
#include "mozilla/layers/CompositorVsyncSchedulerOwner.h"
#include "mozilla/mozalloc.h" // for operator new, etc

View File

@ -31,7 +31,7 @@ bool IPDLParamTraits<mozilla::layers::RenderRootDisplayListData>::Read(
const IPC::Message* aMsg, PickleIterator* aIter, IProtocol* aActor,
paramType* aResult) {
if (ReadIPDLParam(aMsg, aIter, aActor, &aResult->mRenderRoot) &&
ReadIPDLParam(aMsg, aIter, aActor, &aResult->mIdNamespace) &&
ReadIPDLParam(aMsg, aIter, aActor, &aResult->mIdNamespace) &&
ReadIPDLParam(aMsg, aIter, aActor, &aResult->mRect) &&
ReadIPDLParam(aMsg, aIter, aActor, &aResult->mCommands) &&
ReadIPDLParam(aMsg, aIter, aActor, &aResult->mContentSize) &&

View File

@ -131,9 +131,9 @@ void WebRenderBridgeChild::EndTransaction(
}
this->SendSetDisplayList(
std::move(aRenderRoots), mDestroyedActors, GetFwdTransactionId(),
aTransactionId, aContainsSVGGroup, aVsyncId, aVsyncStartTime,
aRefreshStartTime, aTxnStartTime, aTxnURL, fwdTime, payloads);
std::move(aRenderRoots), mDestroyedActors, GetFwdTransactionId(),
aTransactionId, aContainsSVGGroup, aVsyncId, aVsyncStartTime,
aRefreshStartTime, aTxnStartTime, aTxnURL, fwdTime, payloads);
// With multiple render roots, we may not have sent all of our
// mParentCommands, so go ahead and go through our mParentCommands and ensure

View File

@ -3118,7 +3118,8 @@ void gfxPlatform::InitWebRenderConfig() {
#endif
// Set features that affect WR's RendererOptions
gfxVars::SetUseGLSwizzle(IsFeatureSupported(nsIGfxInfo::FEATURE_GL_SWIZZLE, true));
gfxVars::SetUseGLSwizzle(
IsFeatureSupported(nsIGfxInfo::FEATURE_GL_SWIZZLE, true));
// The RemoveShaderCacheFromDiskIfNecessary() needs to be called after
// WebRenderConfig initialization.

View File

@ -60,8 +60,8 @@ struct gfxFontFaceSrc {
// see FLAG_FORMAT_* enum values below
uint32_t mFormatFlags;
nsCString mLocalName; // full font name if local
RefPtr<gfxFontSrcURI> mURI; // uri if url
nsCString mLocalName; // full font name if local
RefPtr<gfxFontSrcURI> mURI; // uri if url
nsCOMPtr<nsIReferrerInfo> mReferrerInfo; // referrer info if url
RefPtr<gfxFontSrcPrincipal> mOriginPrincipal; // principal if url

View File

@ -1384,10 +1384,9 @@ void gfxWindowsPlatform::InitializeAdvancedLayersConfig() {
}
FeatureState& al = gfxConfig::GetFeature(Feature::ADVANCED_LAYERS);
al.SetDefaultFromPref(
StaticPrefs::GetPrefName_layers_mlgpu_enabled(),
true /* aIsEnablePref */,
StaticPrefs::GetPrefDefault_layers_mlgpu_enabled());
al.SetDefaultFromPref(StaticPrefs::GetPrefName_layers_mlgpu_enabled(),
true /* aIsEnablePref */,
StaticPrefs::GetPrefDefault_layers_mlgpu_enabled());
// Windows 7 has an extra pref since it uses totally different buffer paths
// that haven't been performance tested yet.
@ -1544,9 +1543,9 @@ void gfxWindowsPlatform::InitializeD2DConfig() {
return;
}
d2d1.SetDefaultFromPref(
StaticPrefs::GetPrefName_gfx_direct2d_disabled(), false,
StaticPrefs::GetPrefDefault_gfx_direct2d_disabled());
d2d1.SetDefaultFromPref(StaticPrefs::GetPrefName_gfx_direct2d_disabled(),
false,
StaticPrefs::GetPrefDefault_gfx_direct2d_disabled());
nsCString message;
nsCString failureId;

View File

@ -61,24 +61,24 @@ namespace mscom {
nsCOMPtr<nsIThread> EnsureMTA::GetMTAThread() {
static StaticLocalAutoPtr<BackgroundMTAData> sMTAData(
[]() -> BackgroundMTAData* {
BackgroundMTAData* bgData = new BackgroundMTAData();
BackgroundMTAData* bgData = new BackgroundMTAData();
auto setClearOnShutdown = [ptr = &sMTAData]() -> void {
ClearOnShutdown(ptr, ShutdownPhase::ShutdownThreads);
};
auto setClearOnShutdown = [ptr = &sMTAData]() -> void {
ClearOnShutdown(ptr, ShutdownPhase::ShutdownThreads);
};
if (NS_IsMainThread()) {
setClearOnShutdown();
return bgData;
}
if (NS_IsMainThread()) {
setClearOnShutdown();
return bgData;
}
SystemGroup::Dispatch(
TaskCategory::Other,
NS_NewRunnableFunction("mscom::EnsureMTA::GetMTAThread",
setClearOnShutdown));
SystemGroup::Dispatch(
TaskCategory::Other,
NS_NewRunnableFunction("mscom::EnsureMTA::GetMTAThread",
setClearOnShutdown));
return bgData;
}());
return bgData;
}());
MOZ_ASSERT(sMTAData);

View File

@ -2748,7 +2748,8 @@ bool RestyleManager::ProcessPostTraversal(Element* aElement,
if (changeHint & nsChangeHint_ReconstructFrame) {
if (wasRestyled) {
const bool wasAbsPos =
styleFrame && styleFrame->StyleDisplay()->IsAbsolutelyPositionedStyle();
styleFrame &&
styleFrame->StyleDisplay()->IsAbsolutelyPositionedStyle();
auto* newDisp = upToDateStyleIfRestyled->StyleDisplay();
// https://drafts.csswg.org/css-scroll-anchoring/#suppression-triggers
//

View File

@ -6142,9 +6142,9 @@ nsIFrame* nsCSSFrameConstructor::FindSiblingInternal(
auto getInsideMarkerFrame = [](const nsIContent* aContent) -> nsIFrame* {
auto* marker = nsLayoutUtils::GetMarkerFrame(aContent);
const bool isInsideMarker = marker &&
marker->GetInFlowParent()->StyleList()->mListStylePosition ==
NS_STYLE_LIST_STYLE_POSITION_INSIDE;
const bool isInsideMarker =
marker && marker->GetInFlowParent()->StyleList()->mListStylePosition ==
NS_STYLE_LIST_STYLE_POSITION_INSIDE;
return isInsideMarker ? marker : nullptr;
};

View File

@ -474,7 +474,8 @@ class MergeState {
} // aNewItem can't be the glass item on the builder yet.
if (destItem->IsGlassItem()) {
if (destItem != oldItem || destItem != mBuilder->Builder()->GetGlassDisplayItem()) {
if (destItem != oldItem ||
destItem != mBuilder->Builder()->GetGlassDisplayItem()) {
mBuilder->Builder()->SetGlassDisplayItem(destItem);
}
}

View File

@ -843,7 +843,8 @@ nsresult Loader::CreateSheet(
css::SheetParsingMode aParsingMode, CORSMode aCORSMode,
nsIReferrerInfo* aLoadingReferrerInfo, const nsAString& aIntegrity,
bool aSyncLoad, StyleSheetState& aSheetState, RefPtr<StyleSheet>* aSheet) {
LOG(("css::Loader::CreateSheet(%s)", aURI ? aURI->GetSpecOrDefault().get() : "inline"));
LOG(("css::Loader::CreateSheet(%s)",
aURI ? aURI->GetSpecOrDefault().get() : "inline"));
MOZ_ASSERT(aSheet, "Null out param!");
if (!mSheets) {

View File

@ -44,7 +44,6 @@ class PreloadedStyleSheet : public nsIPreloadedStyleSheet {
virtual ~PreloadedStyleSheet() {}
private:
class StylesheetPreloadObserver final : public nsICSSLoaderObserver {
public:
NS_DECL_ISUPPORTS

View File

@ -142,9 +142,7 @@ struct StyleBox {
return *(*this) == *aOther;
}
bool operator!=(const StyleBox<T>& aOther) const {
return *this != *aOther;
}
bool operator!=(const StyleBox<T>& aOther) const { return *this != *aOther; }
private:
T* mRaw;

View File

@ -1194,10 +1194,9 @@ void StyleSheet::DeleteRuleInternal(uint32_t aIndex, ErrorResult& aRv) {
if (aIndex >= mRuleList->Length()) {
aRv.ThrowDOMException(
NS_ERROR_DOM_INDEX_SIZE_ERR,
nsPrintfCString(
"Cannot delete rule at index %u"
" because the number of rules is only %u",
aIndex, mRuleList->Length()));
nsPrintfCString("Cannot delete rule at index %u"
" because the number of rules is only %u",
aIndex, mRuleList->Length()));
return;
}

View File

@ -302,8 +302,7 @@ nsComputedDOMStyle::nsComputedDOMStyle(dom::Element* aElement,
mPresShell(nullptr),
mStyleType(aStyleType),
mExposeVisitedStyle(false),
mResolvedComputedStyle(false)
{
mResolvedComputedStyle(false) {
MOZ_ASSERT(aElement);
MOZ_ASSERT(aDocument);
// TODO(emilio, bug 548397, https://github.com/w3c/csswg-drafts/issues/2403):
@ -800,7 +799,7 @@ static nsIFrame* StyleFrame(nsIFrame* aOuterFrame) {
static bool IsNonReplacedInline(nsIFrame* aFrame) {
return aFrame->StyleDisplay()->mDisplay == StyleDisplay::Inline &&
!aFrame->IsFrameOfType(nsIFrame::eReplaced);
!aFrame->IsFrameOfType(nsIFrame::eReplaced);
}
static Side SideForPaddingOrMarginOrInsetProperty(nsCSSPropertyID aPropID) {
@ -890,8 +889,8 @@ bool nsComputedDOMStyle::NeedsToFlushLayout(nsCSSPropertyID aPropID) const {
// TODO(emilio): If we make GetUsedPadding() stop returning 0 for an
// unreflowed frame, or something of that sort, then we can stop flushing
// layout for themed frames.
return PaddingNeedsUsedValue(
style->StylePadding()->mPadding.Get(side), *style);
return PaddingNeedsUsedValue(style->StylePadding()->mPadding.Get(side),
*style);
}
case eCSSProperty_margin_top:
case eCSSProperty_margin_right:
@ -1004,8 +1003,7 @@ void nsComputedDOMStyle::UpdateCurrentStyleSources(nsCSSPropertyID aPropID) {
uint64_t currentGeneration =
mPresShell->GetPresContext()->GetUndisplayedRestyleGeneration();
if (mComputedStyle &&
mComputedStyleGeneration == currentGeneration &&
if (mComputedStyle && mComputedStyleGeneration == currentGeneration &&
mPresShellId == mPresShell->GetPresShellId()) {
// Our cached style is still valid.
return;
@ -1031,8 +1029,7 @@ void nsComputedDOMStyle::UpdateCurrentStyleSources(nsCSSPropertyID aPropID) {
// Need to resolve a style.
RefPtr<ComputedStyle> resolvedComputedStyle = DoGetComputedStyleNoFlush(
mElement, mPseudo,
presShellForContent ? presShellForContent : mPresShell,
mStyleType);
presShellForContent ? presShellForContent : mPresShell, mStyleType);
if (!resolvedComputedStyle) {
ClearComputedStyle();
return;

View File

@ -189,9 +189,12 @@ class nsComputedDOMStyle final : public nsDOMCSSDeclaration,
already_AddRefed<CSSValue> GetTransformValue(const mozilla::StyleTransform&);
already_AddRefed<nsROCSSPrimitiveValue> GetGridTrackSize(const mozilla::StyleTrackSize&);
already_AddRefed<nsROCSSPrimitiveValue> GetGridTrackBreadth(const mozilla::StyleTrackBreadth&);
void SetValueToTrackBreadth(nsROCSSPrimitiveValue*, const mozilla::StyleTrackBreadth&);
already_AddRefed<nsROCSSPrimitiveValue> GetGridTrackSize(
const mozilla::StyleTrackSize&);
already_AddRefed<nsROCSSPrimitiveValue> GetGridTrackBreadth(
const mozilla::StyleTrackBreadth&);
void SetValueToTrackBreadth(nsROCSSPrimitiveValue*,
const mozilla::StyleTrackBreadth&);
already_AddRefed<CSSValue> GetGridTemplateColumnsRows(
const mozilla::StyleGridTemplateComponent& aTrackList,
const mozilla::ComputedGridTrackInfo* aTrackInfo);

View File

@ -863,7 +863,7 @@ nsresult NrIceCtx::StartGathering(bool default_route_only, bool proxy_only) {
SetGatheringState(ICE_CTX_GATHER_STARTED);
SetCtxFlags(default_route_only, proxy_only);
proxy_only_ = proxy_only;
// This might start gathering for the first time, or again after

View File

@ -139,9 +139,7 @@ class StackTrace : public phc::StackTrace {
public:
StackTrace() : phc::StackTrace() {}
void Clear() {
mLength = 0;
}
void Clear() { mLength = 0; }
void Fill();

View File

@ -20,20 +20,20 @@
// https://github.com/Microsoft/GSL/blob/3819df6e378ffccf0e29465afe99c3b324c2aa70/include/gsl/gsl_util
#ifndef mozilla_Span_h
# define mozilla_Span_h
#define mozilla_Span_h
# include "mozilla/Array.h"
# include "mozilla/Assertions.h"
# include "mozilla/Casting.h"
# include "mozilla/IntegerTypeTraits.h"
# include "mozilla/Move.h"
# include "mozilla/TypeTraits.h"
# include "mozilla/UniquePtr.h"
#include "mozilla/Array.h"
#include "mozilla/Assertions.h"
#include "mozilla/Casting.h"
#include "mozilla/IntegerTypeTraits.h"
#include "mozilla/Move.h"
#include "mozilla/TypeTraits.h"
#include "mozilla/UniquePtr.h"
# include <algorithm>
# include <array>
# include <cstring>
# include <iterator>
#include <algorithm>
#include <array>
#include <cstring>
#include <iterator>
namespace mozilla {

View File

@ -181,7 +181,7 @@ int main(int argc, char** argv) {
argc -= 2;
}
#if !defined(NO_SIGN_VERIFY)
#if (!defined(MAR_NSS) && defined(XP_WIN)) || defined(XP_MACOSX)
# if (!defined(MAR_NSS) && defined(XP_WIN)) || defined(XP_MACOSX)
/* -D DERFilePath, also matches -D[index] DERFilePath
We allow an index for verifying to be symmetric
with the import and export command line arguments. */
@ -195,7 +195,7 @@ int main(int argc, char** argv) {
argv += 2;
argc -= 2;
}
#endif
# endif
/* -d NSSConfigdir */
else if (argv[1][0] == '-' && argv[1][1] == 'd') {
NSSConfigDir = argv[2];

View File

@ -87,7 +87,6 @@ static inline constexpr uint64_t MAKE_VERSION(uint16_t a, uint16_t b,
#define DLL_BLOCKLIST_DEFINITIONS_BEGIN_NAMED(name) \
using DllBlockInfo = mozilla::DllBlockInfoT<DLL_BLOCKLIST_STRING_TYPE>; \
static const DllBlockInfo name[] = {
#define DLL_BLOCKLIST_DEFINITIONS_BEGIN \
DLL_BLOCKLIST_DEFINITIONS_BEGIN_NAMED(gWindowsDllBlocklist)

View File

@ -2902,8 +2902,9 @@ nsresult NS_ShouldSecureUpgrade(
return rv;
}
nsresult rv = sss->IsSecureURI(nsISiteSecurityService::HEADER_HSTS, aURI, flags,
aOriginAttributes, nullptr, &hstsSource, &isStsHost);
nsresult rv =
sss->IsSecureURI(nsISiteSecurityService::HEADER_HSTS, aURI, flags,
aOriginAttributes, nullptr, &hstsSource, &isStsHost);
// if the SSS check fails, it's likely because this load is on a
// malformed URI or something else in the setup is wrong, so any error

View File

@ -337,7 +337,8 @@ nsresult nsAboutCacheEntry::Channel::WriteCacheEntryDescription(
// javascript: and data: URLs should not be linkified
// since clicking them can cause scripts to run - bug 162584
if (NS_SUCCEEDED(rv) && !(uri->SchemeIs("javascript") || uri->SchemeIs("data"))) {
if (NS_SUCCEEDED(rv) &&
!(uri->SchemeIs("javascript") || uri->SchemeIs("data"))) {
buffer.AppendLiteral("<a href=\"");
buffer.Append(escapedStr);
buffer.AppendLiteral("\">");

View File

@ -15,7 +15,7 @@
inline MOZ_MUST_USE nsresult NS_GetAboutModuleName(nsIURI* aAboutURI,
nsCString& aModule) {
NS_ASSERTION(aAboutURI->SchemeIs("about"),
"should be used only on about: URIs");
"should be used only on about: URIs");
nsresult rv = aAboutURI->GetPathQueryRef(aModule);
NS_ENSURE_SUCCESS(rv, rv);

View File

@ -2903,7 +2903,7 @@ already_AddRefed<nsILoadInfo> HttpBaseChannel::CloneLoadInfoForRedirect(
docShellAttrs.mPrivateBrowsingId == attrs.mPrivateBrowsingId,
"docshell and necko should have the same privateBrowsingId attribute.");
MOZ_ASSERT(docShellAttrs.mGeckoViewSessionContextId ==
attrs.mGeckoViewSessionContextId,
attrs.mGeckoViewSessionContextId,
"docshell and necko should have the same "
"geckoViewSessionContextId attribute");

View File

@ -3935,9 +3935,9 @@ bool HttpChannelChild::ShouldInterceptURI(nsIURI* aURI, bool& aShouldUpgrade) {
OriginAttributes originAttributes;
NS_ENSURE_TRUE(NS_GetOriginAttributes(this, originAttributes), false);
bool notused = false;
nsresult rv = NS_ShouldSecureUpgrade(aURI, mLoadInfo, resultPrincipal,
mPrivateBrowsing, mAllowSTS, originAttributes,
aShouldUpgrade, nullptr, notused);
nsresult rv = NS_ShouldSecureUpgrade(
aURI, mLoadInfo, resultPrincipal, mPrivateBrowsing, mAllowSTS,
originAttributes, aShouldUpgrade, nullptr, notused);
NS_ENSURE_SUCCESS(rv, false);
nsCOMPtr<nsIURI> upgradedURI;

View File

@ -1700,8 +1700,7 @@ nsresult nsHttpConnection::ResumeRecv() {
mLastReadTime = PR_IntervalNow();
if (mSocketIn) {
if (!mTLSFilter || !mTLSFilter->HasDataToRecv() ||
NS_FAILED(ForceRecv())) {
if (!mTLSFilter || !mTLSFilter->HasDataToRecv() || NS_FAILED(ForceRecv())) {
return mSocketIn->AsyncWait(this, 0, 0, nullptr);
}
return NS_OK;

View File

@ -873,18 +873,16 @@ class AddContentRunnable : public Runnable {
inline void nsHtml5StreamParser::OnNewContent(Span<const char16_t> aData) {
if (mURIToSendToDevtools) {
NS_DispatchToMainThread(new AddContentRunnable(mUUIDForDevtools,
mURIToSendToDevtools,
aData,
mURIToSendToDevtools, aData,
/* aComplete */ false));
}
}
inline void nsHtml5StreamParser::OnContentComplete() {
if (mURIToSendToDevtools) {
NS_DispatchToMainThread(new AddContentRunnable(mUUIDForDevtools,
mURIToSendToDevtools,
Span<const char16_t>(),
/* aComplete */ true));
NS_DispatchToMainThread(new AddContentRunnable(
mUUIDForDevtools, mURIToSendToDevtools, Span<const char16_t>(),
/* aComplete */ true));
mURIToSendToDevtools = nullptr;
}
}
@ -1193,9 +1191,7 @@ void nsHtml5StreamParser::DoStopRequest() {
"Stream ended without being open.");
mTokenizerMutex.AssertCurrentThreadOwns();
auto guard = MakeScopeExit([&] {
OnContentComplete();
});
auto guard = MakeScopeExit([&] { OnContentComplete(); });
if (IsTerminated()) {
return;

View File

@ -1209,7 +1209,8 @@ nsNSSCertificate::Write(nsIObjectOutputStream* aStream) {
if (NS_FAILED(rv)) {
return rv;
}
return aStream->WriteBytes(AsBytes(MakeSpan(mCert->derCert.data, mCert->derCert.len)));
return aStream->WriteBytes(
AsBytes(MakeSpan(mCert->derCert.data, mCert->derCert.len)));
}
NS_IMETHODIMP

View File

@ -141,8 +141,8 @@ static SECStatus AddKeyFromFile(const std::string& path,
SECKEYPrivateKey* privateKey = nullptr;
if (PK11_ImportDERPrivateKeyInfoAndReturnKey(
slot.get(), &item, nullptr, nullptr, true, false, KU_ALL,
&privateKey, nullptr) != SECSuccess) {
slot.get(), &item, nullptr, nullptr, true, false, KU_ALL, &privateKey,
nullptr) != SECSuccess) {
PrintPRError("PK11_ImportDERPrivateKeyInfoAndReturnKey failed");
return SECFailure;
}

View File

@ -348,9 +348,7 @@ void ReportFatalError(const Maybe<MinidumpInfo>& aMinidump, const char* aFormat,
Thread::WaitForeverNoIdle();
}
size_t GetId() {
return gChannel->GetId();
}
size_t GetId() { return gChannel->GetId(); }
///////////////////////////////////////////////////////////////////////////////
// Vsyncs
@ -572,13 +570,10 @@ bool Repaint(nsAString& aData) {
nsCOMPtr<imgIEncoder> encoder = do_CreateInstance(encoderCID.get());
nsString options;
nsresult rv = encoder->InitFromData((const uint8_t*) gDrawTargetBuffer,
gPaintWidth * gPaintHeight * 4,
gPaintWidth,
gPaintHeight,
gPaintWidth * 4,
imgIEncoder::INPUT_FORMAT_HOSTARGB,
options);
nsresult rv = encoder->InitFromData(
(const uint8_t*)gDrawTargetBuffer, gPaintWidth * gPaintHeight * 4,
gPaintWidth, gPaintHeight, gPaintWidth * 4,
imgIEncoder::INPUT_FORMAT_HOSTARGB, options);
if (NS_FAILED(rv)) {
return false;
}

View File

@ -263,7 +263,7 @@ static bool Middleman_HadRepaint(JSContext* aCx, unsigned aArgc, Value* aVp) {
return false;
}
nsDependentCString dataCString((const char*) dataChars, dataLength);
nsDependentCString dataCString((const char*)dataChars, dataLength);
nsresult rv = Base64Decode(dataCString, dataBinary);
decodeFailed = NS_FAILED(rv);
}
@ -336,8 +336,7 @@ static bool Middleman_WaitUntilPaused(JSContext* aCx, unsigned aArgc,
return true;
}
static bool Middleman_Atomize(JSContext* aCx, unsigned aArgc,
Value* aVp) {
static bool Middleman_Atomize(JSContext* aCx, unsigned aArgc, Value* aVp) {
CallArgs args = CallArgsFromVp(aArgc, aVp);
if (!args.get(0).isString()) {
@ -401,7 +400,7 @@ MOZ_EXPORT bool RecordReplayInterface_ShouldUpdateProgressCounter(
// Scripts in this file are internal to the record/replay infrastructure and
// run non-deterministically between recording and replaying.
return aURL && strcmp(aURL, ReplayScriptURL) &&
strcmp(aURL, "resource://devtools/shared/execution-point-utils.js");
strcmp(aURL, "resource://devtools/shared/execution-point-utils.js");
} else {
return aURL && strncmp(aURL, "resource:", 9) && strncmp(aURL, "chrome:", 7);
}
@ -875,7 +874,8 @@ static bool RecordReplay_Repaint(JSContext* aCx, unsigned aArgc, Value* aVp) {
return true;
}
static bool RecordReplay_MemoryUsage(JSContext* aCx, unsigned aArgc, Value* aVp) {
static bool RecordReplay_MemoryUsage(JSContext* aCx, unsigned aArgc,
Value* aVp) {
CallArgs args = CallArgsFromVp(aArgc, aVp);
if (!args.get(0).isNumber()) {
@ -885,12 +885,12 @@ static bool RecordReplay_MemoryUsage(JSContext* aCx, unsigned aArgc, Value* aVp)
size_t kind = args.get(0).toNumber();
if (kind >= (size_t) MemoryKind::Count) {
if (kind >= (size_t)MemoryKind::Count) {
JS_ReportErrorASCII(aCx, "Memory kind out of range");
return false;
}
args.rval().setDouble(GetMemoryUsage((MemoryKind) kind));
args.rval().setDouble(GetMemoryUsage((MemoryKind)kind));
return true;
}
@ -963,8 +963,8 @@ struct ScriptHitInfo {
}
static bool match(const ScriptHitKey& aFirst, const ScriptHitKey& aSecond) {
return aFirst.mScript == aSecond.mScript
&& aFirst.mOffset == aSecond.mOffset;
return aFirst.mScript == aSecond.mScript &&
aFirst.mOffset == aSecond.mOffset;
}
};
@ -997,13 +997,15 @@ struct ScriptHitInfo {
mInfo.append(nullptr);
}
if (!mInfo[aCheckpoint]) {
void* mem = AllocateMemory(sizeof(CheckpointInfo), MemoryKind::ScriptHits);
mInfo[aCheckpoint] = new(mem) CheckpointInfo();
void* mem =
AllocateMemory(sizeof(CheckpointInfo), MemoryKind::ScriptHits);
mInfo[aCheckpoint] = new (mem) CheckpointInfo();
}
return mInfo[aCheckpoint];
}
ScriptHitChunk* FindHits(uint32_t aCheckpoint, uint32_t aScript, uint32_t aOffset) {
ScriptHitChunk* FindHits(uint32_t aCheckpoint, uint32_t aScript,
uint32_t aOffset) {
CheckpointInfo* info = GetInfo(aCheckpoint);
ScriptHitKey key(aScript, aOffset);
@ -1053,9 +1055,8 @@ struct ScriptHitInfo {
return result;
}
void AddChangeFrame(uint32_t aCheckpoint, uint32_t aWhich,
uint32_t aScript, uint32_t aFrameIndex,
ProgressCounter aProgress) {
void AddChangeFrame(uint32_t aCheckpoint, uint32_t aWhich, uint32_t aScript,
uint32_t aFrameIndex, ProgressCounter aProgress) {
CheckpointInfo* info = GetInfo(aCheckpoint);
MOZ_RELEASE_ASSERT(aWhich < NumChangeFrameKinds);
info->mChangeFrames[aWhich].emplaceBack(aScript, aFrameIndex, aProgress);
@ -1157,8 +1158,8 @@ static bool RecordReplay_OnScriptHit(JSContext* aCx, unsigned aArgc,
return true;
}
gScriptHits->AddHit(GetLastCheckpoint(), script, offset,
frameIndex, gProgressCounter);
gScriptHits->AddHit(GetLastCheckpoint(), script, offset, frameIndex,
gProgressCounter);
args.rval().setUndefined();
return true;
}
@ -1186,8 +1187,8 @@ static bool RecordReplay_OnChangeFrame(JSContext* aCx, unsigned aArgc,
}
uint32_t frameIndex = gFrameDepth - 1;
gScriptHits->AddChangeFrame(GetLastCheckpoint(), Kind,
script, frameIndex, gProgressCounter);
gScriptHits->AddChangeFrame(GetLastCheckpoint(), Kind, script, frameIndex,
gProgressCounter);
if (Kind == ChangeFrameExit) {
gFrameDepth--;
@ -1244,8 +1245,7 @@ static bool RecordReplay_FindScriptHits(JSContext* aCx, unsigned aArgc,
Value* aVp) {
CallArgs args = CallArgsFromVp(aArgc, aVp);
if (!args.get(0).isNumber() ||
!args.get(1).isNumber() ||
if (!args.get(0).isNumber() || !args.get(1).isNumber() ||
!args.get(2).isNumber()) {
JS_ReportErrorASCII(aCx, "Bad parameters");
return false;
@ -1265,9 +1265,9 @@ static bool RecordReplay_FindScriptHits(JSContext* aCx, unsigned aArgc,
RootedObject hitObject(aCx, JS_NewObject(aCx, nullptr));
if (!hitObject ||
!JS_DefineProperty(aCx, hitObject, "progress",
(double) hit.mProgress, JSPROP_ENUMERATE) ||
!JS_DefineProperty(aCx, hitObject, "frameIndex",
hit.mFrameIndex, JSPROP_ENUMERATE) ||
(double)hit.mProgress, JSPROP_ENUMERATE) ||
!JS_DefineProperty(aCx, hitObject, "frameIndex", hit.mFrameIndex,
JSPROP_ENUMERATE) ||
!values.append(ObjectValue(*hitObject))) {
return false;
}
@ -1286,7 +1286,7 @@ static bool RecordReplay_FindScriptHits(JSContext* aCx, unsigned aArgc,
}
static bool RecordReplay_FindChangeFrames(JSContext* aCx, unsigned aArgc,
Value* aVp) {
Value* aVp) {
CallArgs args = CallArgsFromVp(aArgc, aVp);
if (!args.get(0).isNumber() || !args.get(1).isNumber()) {
@ -1310,12 +1310,12 @@ static bool RecordReplay_FindChangeFrames(JSContext* aCx, unsigned aArgc,
for (const ScriptHitInfo::AnyScriptHit& hit : *hits) {
RootedObject hitObject(aCx, JS_NewObject(aCx, nullptr));
if (!hitObject ||
!JS_DefineProperty(aCx, hitObject, "script",
hit.mScript, JSPROP_ENUMERATE) ||
!JS_DefineProperty(aCx, hitObject, "progress",
(double) hit.mProgress, JSPROP_ENUMERATE) ||
!JS_DefineProperty(aCx, hitObject, "frameIndex",
hit.mFrameIndex, JSPROP_ENUMERATE) ||
!JS_DefineProperty(aCx, hitObject, "script", hit.mScript,
JSPROP_ENUMERATE) ||
!JS_DefineProperty(aCx, hitObject, "progress", (double)hit.mProgress,
JSPROP_ENUMERATE) ||
!JS_DefineProperty(aCx, hitObject, "frameIndex", hit.mFrameIndex,
JSPROP_ENUMERATE) ||
!values.append(ObjectValue(*hitObject))) {
return false;
}

View File

@ -280,8 +280,9 @@ class MiddlemanProtocol : public ipc::IToplevelProtocol {
MOZ_RELEASE_ASSERT(!mSyncMessageReply);
mSyncMessageReply = new Message();
if (mSyncMessageIsCall
? !mOpposite->GetIPCChannel()->Call(mSyncMessage, mSyncMessageReply)
: !mOpposite->GetIPCChannel()->Send(mSyncMessage, mSyncMessageReply)) {
? !mOpposite->GetIPCChannel()->Call(mSyncMessage, mSyncMessageReply)
: !mOpposite->GetIPCChannel()->Send(mSyncMessage,
mSyncMessageReply)) {
MOZ_RELEASE_ASSERT(mSide == ipc::ChildSide);
BeginShutdown();
}
@ -295,15 +296,16 @@ class MiddlemanProtocol : public ipc::IToplevelProtocol {
aProtocol->MaybeSendSyncMessage(false);
}
void HandleSyncMessage(const Message& aMessage, Message*& aReply, bool aCall) {
void HandleSyncMessage(const Message& aMessage, Message*& aReply,
bool aCall) {
MOZ_RELEASE_ASSERT(mOppositeMessageLoop);
mSyncMessage = new Message();
mSyncMessage->CopyFrom(aMessage);
mSyncMessageIsCall = aCall;
mOppositeMessageLoop->PostTask(
NewRunnableFunction("StaticMaybeSendSyncMessage", StaticMaybeSendSyncMessage, this));
mOppositeMessageLoop->PostTask(NewRunnableFunction(
"StaticMaybeSendSyncMessage", StaticMaybeSendSyncMessage, this));
if (mSide == ipc::ChildSide) {
AutoMarkMainThreadWaitingForIPDLReply blocked;

View File

@ -160,9 +160,8 @@ void UpdateGraphicsAfterPaint(const PaintMessage& aMsg) {
InitGraphicsSandbox();
}
size_t stride =
layers::ImageDataSerializer::ComputeRGBStride(gSurfaceFormat,
aMsg.mWidth);
size_t stride = layers::ImageDataSerializer::ComputeRGBStride(gSurfaceFormat,
aMsg.mWidth);
UpdateMiddlemanCanvas(aMsg.mWidth, aMsg.mHeight, stride, gGraphicsMemory);
}
@ -171,9 +170,8 @@ void UpdateGraphicsAfterRepaint(const nsACString& aImageData) {
nsresult rv = NS_NewCStringInputStream(getter_AddRefs(stream), aImageData);
MOZ_RELEASE_ASSERT(NS_SUCCEEDED(rv));
RefPtr<gfx::SourceSurface> surface =
image::ImageOps::DecodeToSurface(stream.forget(),
NS_LITERAL_CSTRING("image/png"), 0);
RefPtr<gfx::SourceSurface> surface = image::ImageOps::DecodeToSurface(
stream.forget(), NS_LITERAL_CSTRING("image/png"), 0);
MOZ_RELEASE_ASSERT(surface);
RefPtr<gfx::DataSourceSurface> dataSurface = surface->GetDataSurface();
@ -181,8 +179,7 @@ void UpdateGraphicsAfterRepaint(const nsACString& aImageData) {
gfx::DataSourceSurface::ScopedMap map(dataSurface,
gfx::DataSourceSurface::READ);
UpdateMiddlemanCanvas(surface->GetSize().width,
surface->GetSize().height,
UpdateMiddlemanCanvas(surface->GetSize().width, surface->GetSize().height,
map.GetStride(), map.GetData());
}
@ -191,9 +188,8 @@ void RestoreMainGraphics() {
return;
}
size_t stride =
layers::ImageDataSerializer::ComputeRGBStride(gSurfaceFormat,
gLastPaintWidth);
size_t stride = layers::ImageDataSerializer::ComputeRGBStride(
gSurfaceFormat, gLastPaintWidth);
UpdateMiddlemanCanvas(gLastPaintWidth, gLastPaintHeight, stride,
gGraphicsMemory);
}

View File

@ -573,7 +573,6 @@ nsresult nsPrefetchService::CheckURIScheme(nsIURI* aURI,
return NS_ERROR_ABORT;
}
if (!referrer->SchemeIs("http") && !referrer->SchemeIs("https")) {
LOG(("rejected: referrer URL is neither http nor https\n"));
return NS_ERROR_ABORT;

View File

@ -214,10 +214,12 @@ const GfxDeviceFamily* GfxDriverInfo::GetDeviceFamily(DeviceFamily id) {
break;
case IntelHDGraphicsIvyBridge:
APPEND_DEVICE(0x015A); /* IntelIvyBridge_GT1_1 (HD Graphics) */
// clang-format off
APPEND_DEVICE(0x0152); /* IntelIvyBridge_GT1_2 (HD Graphics 2500, desktop) */
APPEND_DEVICE(0x0162); /* IntelIvyBridge_GT2_1 (HD Graphics 4000, desktop) */
APPEND_DEVICE(0x0166); /* IntelIvyBridge_GT2_2 (HD Graphics 4000, mobile) */
APPEND_DEVICE(0x016A); /* IntelIvyBridge_GT2_3 (HD Graphics P4000, workstation) */
// clang-format on
break;
case IntelMobileHDGraphics:
APPEND_DEVICE(0x0046); /* IntelMobileHDGraphics */

View File

@ -136,7 +136,7 @@ void nsToolkit::RemoveSleepWakeNotifications() {
void nsToolkit::MonitorAllProcessMouseEvents() {
NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
// Don't do this for apps that use native context menus.
// Don't do this for apps that use native context menus.
#ifdef MOZ_USE_NATIVE_POPUP_WINDOWS
return;
#endif /* MOZ_USE_NATIVE_POPUP_WINDOWS */

View File

@ -17,7 +17,7 @@ using namespace mozilla::dom;
NS_IMPL_ISUPPORTS(nsFilePickerProxy, nsIFilePicker)
nsFilePickerProxy::nsFilePickerProxy()
nsFilePickerProxy::nsFilePickerProxy()
: mSelectedType(0), mCapture(captureNone), mIPCActive(false) {}
nsFilePickerProxy::~nsFilePickerProxy() {}