зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset Differential Revision: https://phabricator.services.mozilla.com/D38057 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
75cbed9086
Коммит
e77bfc655d
|
@ -540,8 +540,10 @@ ipc::IPCResult DocAccessibleParent::AddChildDoc(DocAccessibleParent* aChildDoc,
|
|||
if (aChildDoc->IsTopLevelInContentProcess()) {
|
||||
// aChildDoc is an embedded document in a different content process to
|
||||
// this document.
|
||||
auto embeddedBrowser = static_cast<dom::BrowserParent*>(aChildDoc->Manager());
|
||||
dom::BrowserBridgeParent* bridge = embeddedBrowser->GetBrowserBridgeParent();
|
||||
auto embeddedBrowser =
|
||||
static_cast<dom::BrowserParent*>(aChildDoc->Manager());
|
||||
dom::BrowserBridgeParent* bridge =
|
||||
embeddedBrowser->GetBrowserBridgeParent();
|
||||
if (bridge) {
|
||||
// Send a COM proxy for the embedded document to the embedder process
|
||||
// hosting the iframe. This will be returned as the child of the
|
||||
|
|
|
@ -112,8 +112,7 @@ TEST(PrincipalSerialization, ExpandedPrincipal)
|
|||
|
||||
nsAutoCString spec2("https://mozilla.org");
|
||||
nsCOMPtr<nsIPrincipal> principal2;
|
||||
rv =
|
||||
ssm->CreateContentPrincipalFromOrigin(spec2, getter_AddRefs(principal2));
|
||||
rv = ssm->CreateContentPrincipalFromOrigin(spec2, getter_AddRefs(principal2));
|
||||
ASSERT_EQ(rv, NS_OK);
|
||||
ASSERT_EQ(BasePrincipal::Cast(principal2)->Kind(),
|
||||
BasePrincipal::eContentPrincipal);
|
||||
|
@ -142,7 +141,7 @@ TEST(PrincipalSerialization, ExpandedPrincipal)
|
|||
nsAutoCString specDev("https://mozilla.dev");
|
||||
nsCOMPtr<nsIPrincipal> principalDev;
|
||||
rv = ssm->CreateContentPrincipalFromOrigin(specDev,
|
||||
getter_AddRefs(principalDev));
|
||||
getter_AddRefs(principalDev));
|
||||
ASSERT_EQ(rv, NS_OK);
|
||||
ASSERT_EQ(BasePrincipal::Cast(principalDev)->Kind(),
|
||||
BasePrincipal::eContentPrincipal);
|
||||
|
@ -171,8 +170,7 @@ TEST(PrincipalSerialization, ExpandedPrincipalOA)
|
|||
|
||||
nsAutoCString spec2("https://mozilla.org");
|
||||
nsCOMPtr<nsIPrincipal> principal2;
|
||||
rv =
|
||||
ssm->CreateContentPrincipalFromOrigin(spec2, getter_AddRefs(principal2));
|
||||
rv = ssm->CreateContentPrincipalFromOrigin(spec2, getter_AddRefs(principal2));
|
||||
ASSERT_EQ(rv, NS_OK);
|
||||
ASSERT_EQ(BasePrincipal::Cast(principal2)->Kind(),
|
||||
BasePrincipal::eContentPrincipal);
|
||||
|
@ -206,7 +204,7 @@ TEST(PrincipalSerialization, ExpandedPrincipalOA)
|
|||
nsAutoCString specDev("https://mozilla.dev");
|
||||
nsCOMPtr<nsIPrincipal> principalDev;
|
||||
rv = ssm->CreateContentPrincipalFromOrigin(specDev,
|
||||
getter_AddRefs(principalDev));
|
||||
getter_AddRefs(principalDev));
|
||||
ASSERT_EQ(rv, NS_OK);
|
||||
ASSERT_EQ(BasePrincipal::Cast(principalDev)->Kind(),
|
||||
BasePrincipal::eContentPrincipal);
|
||||
|
|
|
@ -1412,8 +1412,7 @@ uint32_t nsGenericHTMLElement::GetDimensionAttrAsUnsignedInt(
|
|||
attrVal->ToString(val);
|
||||
nsContentUtils::ParseHTMLIntegerResultFlags result;
|
||||
int32_t parsedInt = nsContentUtils::ParseHTMLInteger(val, &result);
|
||||
if ((result & nsContentUtils::eParseHTMLInteger_Error) ||
|
||||
parsedInt < 0) {
|
||||
if ((result & nsContentUtils::eParseHTMLInteger_Error) || parsedInt < 0) {
|
||||
return aDefault;
|
||||
}
|
||||
|
||||
|
|
|
@ -2640,7 +2640,8 @@ mozilla::ipc::IPCResult BrowserParent::RecvSessionStoreUpdate(
|
|||
}
|
||||
if (aPositions.Length() != 0) {
|
||||
data.mPositions.Construct().Assign(std::move(aPositions));
|
||||
data.mPositionDescendants.Construct().Assign(std::move(aPositionDescendants));
|
||||
data.mPositionDescendants.Construct().Assign(
|
||||
std::move(aPositionDescendants));
|
||||
}
|
||||
|
||||
nsCOMPtr<nsISessionStoreFunctions> funcs =
|
||||
|
|
|
@ -46,7 +46,8 @@ class JSWindowActorChild final : public JSWindowActor {
|
|||
|
||||
static already_AddRefed<JSWindowActorChild> Constructor(GlobalObject& aGlobal,
|
||||
ErrorResult& aRv) {
|
||||
nsCOMPtr<nsIGlobalObject> global(do_QueryInterface(aGlobal.GetAsSupports()));
|
||||
nsCOMPtr<nsIGlobalObject> global(
|
||||
do_QueryInterface(aGlobal.GetAsSupports()));
|
||||
return MakeAndAddRef<JSWindowActorChild>(global);
|
||||
}
|
||||
|
||||
|
|
|
@ -632,7 +632,8 @@ void XMLHttpRequestMainThread::SetResponseType(
|
|||
|
||||
if (mState == XMLHttpRequest_Binding::LOADING ||
|
||||
mState == XMLHttpRequest_Binding::DONE) {
|
||||
aRv.Throw(NS_ERROR_DOM_INVALID_STATE_XHR_MUST_NOT_BE_LOADING_OR_DONE_RESPONSE_TYPE);
|
||||
aRv.Throw(
|
||||
NS_ERROR_DOM_INVALID_STATE_XHR_MUST_NOT_BE_LOADING_OR_DONE_RESPONSE_TYPE);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -3101,7 +3102,8 @@ void XMLHttpRequestMainThread::OverrideMimeType(const nsAString& aMimeType,
|
|||
|
||||
if (mState == XMLHttpRequest_Binding::LOADING ||
|
||||
mState == XMLHttpRequest_Binding::DONE) {
|
||||
aRv.Throw(NS_ERROR_DOM_INVALID_STATE_XHR_MUST_NOT_BE_LOADING_OR_DONE_OVERRIDE_MIME_TYPE);
|
||||
aRv.Throw(
|
||||
NS_ERROR_DOM_INVALID_STATE_XHR_MUST_NOT_BE_LOADING_OR_DONE_OVERRIDE_MIME_TYPE);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -2191,7 +2191,8 @@ void XMLHttpRequestWorker::SetResponseType(
|
|||
|
||||
if (mStateData.mReadyState == XMLHttpRequest_Binding::LOADING ||
|
||||
mStateData.mReadyState == XMLHttpRequest_Binding::DONE) {
|
||||
aRv.Throw(NS_ERROR_DOM_INVALID_STATE_XHR_MUST_NOT_BE_LOADING_OR_DONE_RESPONSE_TYPE);
|
||||
aRv.Throw(
|
||||
NS_ERROR_DOM_INVALID_STATE_XHR_MUST_NOT_BE_LOADING_OR_DONE_RESPONSE_TYPE);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -1627,7 +1627,7 @@ nsresult mozInlineSpellChecker::AddRange(Selection* aSpellCheckSelection,
|
|||
if (!SpellCheckSelectionIsFull()) {
|
||||
IgnoredErrorResult err;
|
||||
aSpellCheckSelection->AddRangeAndSelectFramesAndNotifyListeners(*aRange,
|
||||
err);
|
||||
err);
|
||||
if (err.Failed()) {
|
||||
rv = err.StealNSResult();
|
||||
} else {
|
||||
|
|
|
@ -62,9 +62,9 @@ OFFSET_COMMAND5(StrokeGlyphs, ScaledFont*, const GlyphBuffer&, const Pattern&,
|
|||
OFFSET_COMMAND3(FillRoundedRect, const RoundedRect&, const Pattern&,
|
||||
const DrawOptions&)
|
||||
|
||||
bool DrawTargetOffset::Draw3DTransformedSurface(SourceSurface *aSrc,
|
||||
bool DrawTargetOffset::Draw3DTransformedSurface(SourceSurface* aSrc,
|
||||
const Matrix4x4& aMatrix) {
|
||||
return mDrawTarget->Draw3DTransformedSurface(aSrc, aMatrix);
|
||||
return mDrawTarget->Draw3DTransformedSurface(aSrc, aMatrix);
|
||||
}
|
||||
|
||||
OFFSET_COMMAND3(Mask, const Pattern&, const Pattern&, const DrawOptions&)
|
||||
|
|
|
@ -95,9 +95,9 @@ class DrawTargetOffset : public DrawTarget {
|
|||
|
||||
virtual void FillRect(const Rect& aRect, const Pattern& aPattern,
|
||||
const DrawOptions& aOptions = DrawOptions()) override;
|
||||
virtual void FillRoundedRect(const RoundedRect& aRect,
|
||||
const Pattern& aPattern,
|
||||
const DrawOptions& aOptions = DrawOptions()) override;
|
||||
virtual void FillRoundedRect(
|
||||
const RoundedRect& aRect, const Pattern& aPattern,
|
||||
const DrawOptions& aOptions = DrawOptions()) override;
|
||||
virtual void StrokeRect(const Rect& aRect, const Pattern& aPattern,
|
||||
const StrokeOptions& aStrokeOptions = StrokeOptions(),
|
||||
const DrawOptions& aOptions = DrawOptions()) override;
|
||||
|
@ -113,10 +113,10 @@ class DrawTargetOffset : public DrawTarget {
|
|||
virtual void FillGlyphs(ScaledFont* aFont, const GlyphBuffer& aBuffer,
|
||||
const Pattern& aPattern,
|
||||
const DrawOptions& aOptions = DrawOptions()) override;
|
||||
virtual void StrokeGlyphs(ScaledFont* aFont, const GlyphBuffer& aBuffer,
|
||||
const Pattern& aPattern,
|
||||
const StrokeOptions& aStrokeOptions = StrokeOptions(),
|
||||
const DrawOptions& aOptions = DrawOptions()) override;
|
||||
virtual void StrokeGlyphs(
|
||||
ScaledFont* aFont, const GlyphBuffer& aBuffer, const Pattern& aPattern,
|
||||
const StrokeOptions& aStrokeOptions = StrokeOptions(),
|
||||
const DrawOptions& aOptions = DrawOptions()) override;
|
||||
virtual void Mask(const Pattern& aSource, const Pattern& aMask,
|
||||
const DrawOptions& aOptions = DrawOptions()) override;
|
||||
virtual void PushClip(const Path* aPath) override;
|
||||
|
|
|
@ -149,7 +149,6 @@ ScaledFontDWrite::ScaledFontDWrite(IDWriteFontFace* aFontFace,
|
|||
|
||||
already_AddRefed<Path> ScaledFontDWrite::GetPathForGlyphs(
|
||||
const GlyphBuffer& aBuffer, const DrawTarget* aTarget) {
|
||||
|
||||
RefPtr<PathBuilder> pathBuilder = aTarget->CreatePathBuilder();
|
||||
|
||||
if (pathBuilder->GetBackendType() != BackendType::DIRECT2D &&
|
||||
|
|
|
@ -977,7 +977,12 @@ void Grouper::PaintContainerItem(DIGroup* aGroup, nsDisplayItem* aItem,
|
|||
auto blendItem = static_cast<nsDisplayBlendMode*>(aItem);
|
||||
auto blendMode = blendItem->BlendMode();
|
||||
aContext->GetDrawTarget()->PushLayerWithBlend(
|
||||
<<<<<<< dest
|
||||
false, 1.0, nullptr, mozilla::gfx::Matrix(), aItemBounds, false,
|
||||
=======
|
||||
false, 1.0, nullptr, mozilla::gfx::Matrix(),
|
||||
aItemBounds + aGroup->mLayerBounds.ToUnknownRect().TopLeft(), false,
|
||||
>>>>>>> source
|
||||
blendMode);
|
||||
GP("beginGroup %s %p-%d\n", aItem->Name(), aItem->Frame(),
|
||||
aItem->GetPerFrameKey());
|
||||
|
@ -991,8 +996,14 @@ void Grouper::PaintContainerItem(DIGroup* aGroup, nsDisplayItem* aItem,
|
|||
break;
|
||||
}
|
||||
case DisplayItemType::TYPE_BLEND_CONTAINER: {
|
||||
<<<<<<< dest
|
||||
aContext->GetDrawTarget()->PushLayer(false, 1.0, nullptr,
|
||||
mozilla::gfx::Matrix(), aItemBounds);
|
||||
=======
|
||||
aContext->GetDrawTarget()->PushLayer(
|
||||
false, 1.0, nullptr, mozilla::gfx::Matrix(),
|
||||
aItemBounds + aGroup->mLayerBounds.ToUnknownRect().TopLeft());
|
||||
>>>>>>> source
|
||||
GP("beginGroup %s %p-%d\n", aItem->Name(), aItem->Frame(),
|
||||
aItem->GetPerFrameKey());
|
||||
aContext->GetDrawTarget()->FlushItem(aItemBounds);
|
||||
|
|
|
@ -18,8 +18,9 @@
|
|||
#include <cmath>
|
||||
|
||||
/* SSEv1 is only included in non-Windows or non-x86-64-bit builds. */
|
||||
#if defined(MOZILLA_MAY_SUPPORT_SSE) && (!(defined(_MSC_VER) && defined(_M_AMD64)))
|
||||
#define QCMS_MAY_SUPPORT_SSE
|
||||
#if defined(MOZILLA_MAY_SUPPORT_SSE) && \
|
||||
(!(defined(_MSC_VER) && defined(_M_AMD64)))
|
||||
# define QCMS_MAY_SUPPORT_SSE
|
||||
#endif
|
||||
|
||||
using namespace mozilla;
|
||||
|
|
|
@ -315,7 +315,7 @@ void gfxPlatformFontList::ApplyWhitelist() {
|
|||
ToLowerCase(list[i], key);
|
||||
familyNamesWhitelist.PutEntry(key);
|
||||
}
|
||||
AutoTArray<RefPtr<gfxFontFamily>,128> accepted;
|
||||
AutoTArray<RefPtr<gfxFontFamily>, 128> accepted;
|
||||
for (auto iter = mFontFamilies.Iter(); !iter.Done(); iter.Next()) {
|
||||
nsAutoCString fontFamilyName(iter.Key());
|
||||
ToLowerCase(fontFamilyName);
|
||||
|
@ -350,7 +350,7 @@ void gfxPlatformFontList::ApplyWhitelist(
|
|||
ToLowerCase(item, key);
|
||||
familyNamesWhitelist.PutEntry(key);
|
||||
}
|
||||
AutoTArray<fontlist::Family::InitData,128> accepted;
|
||||
AutoTArray<fontlist::Family::InitData, 128> accepted;
|
||||
bool keptNonHidden = false;
|
||||
for (auto& f : aFamilies) {
|
||||
if (f.mHidden || familyNamesWhitelist.Contains(f.mKey)) {
|
||||
|
|
|
@ -390,8 +390,8 @@ bool OpenVRSession::SetupContollerActions() {
|
|||
knucklesBindingFile.close();
|
||||
}
|
||||
}
|
||||
if (vrParent->GetOpenVRControllerManifestPath(
|
||||
OpenVRControllerType::Cosmos, &output)) {
|
||||
if (vrParent->GetOpenVRControllerManifestPath(OpenVRControllerType::Cosmos,
|
||||
&output)) {
|
||||
cosmosManifest = output;
|
||||
}
|
||||
if (!cosmosManifest.Length() || !FileIsExisting(cosmosManifest)) {
|
||||
|
@ -822,7 +822,8 @@ bool OpenVRSession::SetupContollerActions() {
|
|||
}
|
||||
}
|
||||
|
||||
vr::EVRInputError err = vr::VRInput()->SetActionManifestPath(controllerAction.BeginReading());
|
||||
vr::EVRInputError err =
|
||||
vr::VRInput()->SetActionManifestPath(controllerAction.BeginReading());
|
||||
if (err != vr::VRInputError_None) {
|
||||
NS_WARNING("OpenVR - SetActionManifestPath failed.");
|
||||
return false;
|
||||
|
@ -1200,8 +1201,9 @@ void OpenVRSession::EnumerateControllers(VRSystemState& aState) {
|
|||
mControllerHand[handIndex]
|
||||
.mActionFingerPinky_Value.name.BeginReading(),
|
||||
&mControllerHand[handIndex].mActionFingerPinky_Value.handle);
|
||||
vr::VRInput()->GetActionHandle(
|
||||
mControllerHand[handIndex].mActionBumper_Pressed.name.BeginReading(),
|
||||
vr::VRInput()->GetActionHandle(
|
||||
mControllerHand[handIndex]
|
||||
.mActionBumper_Pressed.name.BeginReading(),
|
||||
&mControllerHand[handIndex].mActionBumper_Pressed.handle);
|
||||
|
||||
nsCString deviceId;
|
||||
|
@ -1648,8 +1650,8 @@ void OpenVRSession::UpdateControllerButtons(VRSystemState& aState) {
|
|||
// Button 7: Bumper (Cosmos only)
|
||||
if (mControllerHand[stateIndex].mActionBumper_Pressed.handle &&
|
||||
vr::VRInput()->GetDigitalActionData(
|
||||
mControllerHand[stateIndex].mActionBumper_Pressed.handle, &actionData,
|
||||
sizeof(actionData),
|
||||
mControllerHand[stateIndex].mActionBumper_Pressed.handle,
|
||||
&actionData, sizeof(actionData),
|
||||
vr::k_ulInvalidInputValueHandle) == vr::VRInputError_None &&
|
||||
actionData.bActive) {
|
||||
bPressed = actionData.bState;
|
||||
|
|
|
@ -388,8 +388,14 @@ static bool Moz2DRenderCallback(const Range<const uint8_t> aBlob,
|
|||
auto bounds = gfx::IntRect(origin, aSize);
|
||||
|
||||
if (aDirtyRect) {
|
||||
<<<<<<< dest
|
||||
Rect dirty(aDirtyRect->origin.x, aDirtyRect->origin.y,
|
||||
aDirtyRect->size.width, aDirtyRect->size.height);
|
||||
=======
|
||||
Rect dirty(aDirtyRect->origin.x + recordingOrigin.x,
|
||||
aDirtyRect->origin.y + recordingOrigin.y, aDirtyRect->size.width,
|
||||
aDirtyRect->size.height);
|
||||
>>>>>>> source
|
||||
dt->PushClipRect(dirty);
|
||||
bounds = bounds.Intersect(
|
||||
IntRect(aDirtyRect->origin.x, aDirtyRect->origin.y,
|
||||
|
|
|
@ -70,7 +70,7 @@ extern const twb_t _TwbType[0x100 - 0xa0];
|
|||
/////////////////////////////////////////////////
|
||||
*/
|
||||
|
||||
int TrbWordBreakPos(const th_char *pstr, int left, const th_char *rstr,
|
||||
int TrbWordBreakPos(const th_char* pstr, int left, const th_char* rstr,
|
||||
int right)
|
||||
/* const ThBreakIterator *it, const th_char **p)*/
|
||||
{
|
||||
|
@ -78,7 +78,7 @@ int TrbWordBreakPos(const th_char *pstr, int left, const th_char *rstr,
|
|||
//int left, right;
|
||||
//const th_char *s = *p;
|
||||
*/
|
||||
const th_char *lstr = pstr + left;
|
||||
const th_char* lstr = pstr + left;
|
||||
th_char _c[6];
|
||||
twb_t _t[6];
|
||||
#define c(i) (_c[(i) + 3])
|
||||
|
@ -243,13 +243,13 @@ int TrbWordBreakPos(const th_char *pstr, int left, const th_char *rstr,
|
|||
return -1;
|
||||
}
|
||||
|
||||
int TrbFollowing(const th_char *begin, int length, int offset)
|
||||
int TrbFollowing(const th_char* begin, int length, int offset)
|
||||
/*
|
||||
//(ThBreakIterator *this, int offset)
|
||||
*/
|
||||
{
|
||||
const th_char *w = begin + offset;
|
||||
const th_char *end = begin + length;
|
||||
const th_char* w = begin + offset;
|
||||
const th_char* end = begin + length;
|
||||
while (w < end && *w && !th_isthai(*w) && th_isspace(*w)) w++;
|
||||
|
||||
if (w < end && *w && !th_isthai(*w)) {
|
||||
|
|
|
@ -13190,7 +13190,8 @@ mozilla::Maybe<ScopeKind> DebuggerEnvironment::scopeKind() const {
|
|||
if (!referent()->is<DebugEnvironmentProxy>()) {
|
||||
return Nothing();
|
||||
}
|
||||
EnvironmentObject& env = referent()->as<DebugEnvironmentProxy>().environment();
|
||||
EnvironmentObject& env =
|
||||
referent()->as<DebugEnvironmentProxy>().environment();
|
||||
Scope* scope = GetEnvironmentScope(env);
|
||||
return scope ? Some(scope->kind()) : Nothing();
|
||||
}
|
||||
|
|
|
@ -832,8 +832,8 @@ class FullParseHandler {
|
|||
return new_<ModuleNode>(pos);
|
||||
}
|
||||
|
||||
LexicalScopeNodeType newLexicalScope(LexicalScope::Data* bindings,
|
||||
Node body, ScopeKind kind = ScopeKind::Lexical) {
|
||||
LexicalScopeNodeType newLexicalScope(LexicalScope::Data* bindings, Node body,
|
||||
ScopeKind kind = ScopeKind::Lexical) {
|
||||
return new_<LexicalScopeNode>(bindings, body, kind);
|
||||
}
|
||||
|
||||
|
|
|
@ -7320,8 +7320,8 @@ GeneralParser<ParseHandler, Unit>::synthesizeConstructor(
|
|||
handler_.addStatementToList(stmtList, exprStatement);
|
||||
}
|
||||
|
||||
auto initializerBody = finishLexicalScope(pc_->varScope(), stmtList,
|
||||
ScopeKind::FunctionLexical);
|
||||
auto initializerBody =
|
||||
finishLexicalScope(pc_->varScope(), stmtList, ScopeKind::FunctionLexical);
|
||||
if (!initializerBody) {
|
||||
return null();
|
||||
}
|
||||
|
@ -7528,9 +7528,8 @@ GeneralParser<ParseHandler, Unit>::fieldInitializerOpt(
|
|||
handler_.addStatementToList(statementList, exprStatement);
|
||||
|
||||
// Set the function's body to the field assignment.
|
||||
LexicalScopeNodeType initializerBody =
|
||||
finishLexicalScope(pc_->varScope(), statementList,
|
||||
ScopeKind::FunctionLexical);
|
||||
LexicalScopeNodeType initializerBody = finishLexicalScope(
|
||||
pc_->varScope(), statementList, ScopeKind::FunctionLexical);
|
||||
if (!initializerBody) {
|
||||
return null();
|
||||
}
|
||||
|
|
|
@ -548,8 +548,7 @@ class MOZ_STACK_CLASS PerHandlerParser : public ParserBase {
|
|||
bool propagateFreeNamesAndMarkClosedOverBindings(ParseContext::Scope& scope);
|
||||
|
||||
bool finishFunctionScopes(bool isStandaloneFunction);
|
||||
LexicalScopeNodeType finishLexicalScope(ParseContext::Scope& scope,
|
||||
Node body,
|
||||
LexicalScopeNodeType finishLexicalScope(ParseContext::Scope& scope, Node body,
|
||||
ScopeKind kind = ScopeKind::Lexical);
|
||||
bool finishFunction(
|
||||
bool isStandaloneFunction = false,
|
||||
|
|
|
@ -6654,8 +6654,7 @@ static UniquePtr<SweepAction> ForEachAllocKind(AllocKinds kinds,
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
using Action =
|
||||
SweepActionForEach<ContainerIter<AllocKinds>, AllocKinds>;
|
||||
using Action = SweepActionForEach<ContainerIter<AllocKinds>, AllocKinds>;
|
||||
return js::MakeUnique<Action>(kinds, kindOut, std::move(action));
|
||||
}
|
||||
|
||||
|
|
|
@ -26,8 +26,8 @@
|
|||
#include "js/Utility.h" // JS::FreePolicy
|
||||
#include "js/Value.h" // JS::NullValue, JS::ObjectValue, JS::Value
|
||||
#include "jsapi-tests/tests.h"
|
||||
#include "vm/Compression.h" // js::Compressor::CHUNK_SIZE
|
||||
#include "vm/JSFunction.h" // JSFunction::getOrCreateScript
|
||||
#include "vm/Compression.h" // js::Compressor::CHUNK_SIZE
|
||||
#include "vm/JSFunction.h" // JSFunction::getOrCreateScript
|
||||
#include "vm/JSScript.h" // JSScript, js::ScriptSource::MinimumCompressibleLength, js::SynchronouslyCompressSource
|
||||
|
||||
using mozilla::ArrayLength;
|
||||
|
|
|
@ -453,7 +453,7 @@ void NativeObject::shrinkSlots(JSContext* cx, uint32_t oldCount,
|
|||
ReallocateObjectBuffer<HeapSlot>(cx, this, slots_, oldCount, newCount);
|
||||
if (!newslots) {
|
||||
cx->recoverFromOutOfMemory();
|
||||
return; // Leave slots at its old size.
|
||||
return; // Leave slots at its old size.
|
||||
}
|
||||
|
||||
slots_ = newslots;
|
||||
|
|
|
@ -3906,7 +3906,8 @@ nsresult nsCSSFrameConstructor::GetAnonymousContent(
|
|||
// cached styles
|
||||
bool allowStyleCaching =
|
||||
StaticPrefs::layout_css_cached_scrollbar_styles_enabled() &&
|
||||
aParentFrame->StyleVisibility()->mVisible == NS_STYLE_VISIBILITY_VISIBLE &&
|
||||
aParentFrame->StyleVisibility()->mVisible ==
|
||||
NS_STYLE_VISIBILITY_VISIBLE &&
|
||||
mPresShell->GetPresContext()->Medium() == nsGkAtoms::screen;
|
||||
|
||||
// Compute styles for the anonymous content tree.
|
||||
|
|
|
@ -4179,9 +4179,7 @@ void nsDocumentViewer::DestroyPresShell() {
|
|||
mPresShell = nullptr;
|
||||
}
|
||||
|
||||
void nsDocumentViewer::DestroyPresContext() {
|
||||
mPresContext = nullptr;
|
||||
}
|
||||
void nsDocumentViewer::DestroyPresContext() { mPresContext = nullptr; }
|
||||
|
||||
bool nsDocumentViewer::IsInitializedForPrintPreview() {
|
||||
return mInitializedForPrintPreview;
|
||||
|
|
|
@ -48,7 +48,6 @@ class nsPresArena {
|
|||
void Check() { mPool.Check(); }
|
||||
|
||||
private:
|
||||
|
||||
class FreeList {
|
||||
public:
|
||||
nsTArray<void*> mEntries;
|
||||
|
|
|
@ -1919,7 +1919,6 @@ const T& StyleRect<T>::GetBEnd(mozilla::WritingMode aWM) const {
|
|||
|
||||
} // namespace mozilla
|
||||
|
||||
|
||||
// Definitions of inline methods for nsStylePosition, declared in
|
||||
// nsStyleStruct.h but not defined there because they need WritingMode.
|
||||
inline const mozilla::StyleSize& nsStylePosition::ISize(WritingMode aWM) const {
|
||||
|
|
|
@ -598,10 +598,9 @@ nsColumnSetFrame::ColumnBalanceData nsColumnSetFrame::ReflowChildren(
|
|||
// will be adjusted later, after our correct contentSize is known.
|
||||
nsSize containerSize = aReflowInput.ComputedSizeAsContainerIfConstrained();
|
||||
|
||||
LogicalSize computedSize =
|
||||
StaticPrefs::layout_css_column_span_enabled()
|
||||
? aReflowInput.mCBReflowInput->ComputedSize(wm)
|
||||
: aReflowInput.ComputedSize(wm);
|
||||
LogicalSize computedSize = StaticPrefs::layout_css_column_span_enabled()
|
||||
? aReflowInput.mCBReflowInput->ComputedSize(wm)
|
||||
: aReflowInput.ComputedSize(wm);
|
||||
|
||||
// For RTL, since the columns might not fill the frame exactly, we
|
||||
// need to account for the slop. Otherwise we'll waste time moving the
|
||||
|
|
|
@ -150,8 +150,7 @@ class ScrollFrameHelper::AsyncScrollPortEvent : public Runnable {
|
|||
public:
|
||||
NS_DECL_NSIRUNNABLE
|
||||
explicit AsyncScrollPortEvent(ScrollFrameHelper* helper)
|
||||
: Runnable("ScrollFrameHelper::AsyncScrollPortEvent"),
|
||||
mHelper(helper) {}
|
||||
: Runnable("ScrollFrameHelper::AsyncScrollPortEvent"), mHelper(helper) {}
|
||||
void Revoke() { mHelper = nullptr; }
|
||||
|
||||
private:
|
||||
|
|
|
@ -517,7 +517,6 @@ class ScrollFrameHelper : public nsIReflowCallback {
|
|||
void UpdateMinimumScaleSize(const nsRect& aScrollableOverflow,
|
||||
const nsSize& aICBSize);
|
||||
|
||||
|
||||
// Return the scroll frame's "true outer size".
|
||||
// This is mOuter->GetSize(), except when mOuter has been sized to reflect
|
||||
// a virtual (layout) viewport in which case this returns the outer size
|
||||
|
|
|
@ -87,7 +87,7 @@ inline const StyleTrackBreadth& StyleTrackSize::GetMin() const {
|
|||
return kAuto;
|
||||
}
|
||||
|
||||
}
|
||||
} // namespace mozilla
|
||||
|
||||
static void ReparentFrame(nsIFrame* aFrame, nsContainerFrame* aOldParent,
|
||||
nsContainerFrame* aNewParent) {
|
||||
|
@ -3878,7 +3878,9 @@ void nsGridContainerFrame::Grid::PlaceGridItems(
|
|||
// Note that this is for a grid with a 1,1 origin. We'll change that
|
||||
// to a 0,0 based grid after placing definite lines.
|
||||
const nsStylePosition* const gridStyle = aState.mGridStyle;
|
||||
const auto* areas = gridStyle->mGridTemplateAreas.IsNone() ? nullptr : &*gridStyle->mGridTemplateAreas.AsAreas();
|
||||
const auto* areas = gridStyle->mGridTemplateAreas.IsNone()
|
||||
? nullptr
|
||||
: &*gridStyle->mGridTemplateAreas.AsAreas();
|
||||
int32_t clampMinColLine = kMinLine;
|
||||
int32_t clampMaxColLine = kMaxLine;
|
||||
uint32_t numRepeatCols;
|
||||
|
|
|
@ -32,8 +32,9 @@ class nsIAnonymousContentCreator {
|
|||
NS_DECL_QUERYFRAME_TARGET(nsIAnonymousContentCreator)
|
||||
|
||||
struct ContentInfo {
|
||||
explicit ContentInfo(nsIContent* aContent,
|
||||
mozilla::AnonymousContentKey aKey = mozilla::AnonymousContentKey::None)
|
||||
explicit ContentInfo(
|
||||
nsIContent* aContent,
|
||||
mozilla::AnonymousContentKey aKey = mozilla::AnonymousContentKey::None)
|
||||
: mContent(aContent), mKey(aKey) {}
|
||||
|
||||
nsIContent* mContent;
|
||||
|
|
|
@ -307,9 +307,8 @@ void nsImageFrame::DidSetComputedStyle(ComputedStyle* aOldStyle) {
|
|||
|
||||
UpdateIntrinsicSize(mImage);
|
||||
UpdateIntrinsicRatio(mImage);
|
||||
} else if (!aOldStyle ||
|
||||
aOldStyle->StylePosition()->mAspectRatio !=
|
||||
StylePosition()->mAspectRatio) {
|
||||
} else if (!aOldStyle || aOldStyle->StylePosition()->mAspectRatio !=
|
||||
StylePosition()->mAspectRatio) {
|
||||
UpdateIntrinsicRatio(mImage);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1593,13 +1593,16 @@ uint32_t nsDisplayListBuilder::GetImageDecodeFlags() const {
|
|||
return flags;
|
||||
}
|
||||
|
||||
void nsDisplayListBuilder::ComputeDefaultRenderRootRect(LayoutDeviceIntSize aClientSize) {
|
||||
void nsDisplayListBuilder::ComputeDefaultRenderRootRect(
|
||||
LayoutDeviceIntSize aClientSize) {
|
||||
LayoutDeviceIntRegion cutout;
|
||||
LayoutDeviceIntRect clientRect(LayoutDeviceIntPoint(), aClientSize);
|
||||
cutout.OrWith(clientRect);
|
||||
cutout.SubOut(RoundedToInt(mRenderRootRects[mozilla::wr::RenderRoot::Content]));
|
||||
cutout.SubOut(
|
||||
RoundedToInt(mRenderRootRects[mozilla::wr::RenderRoot::Content]));
|
||||
|
||||
mRenderRootRects[mozilla::wr::RenderRoot::Default] = LayoutDeviceRect(cutout.GetBounds());
|
||||
mRenderRootRects[mozilla::wr::RenderRoot::Default] =
|
||||
LayoutDeviceRect(cutout.GetBounds());
|
||||
}
|
||||
|
||||
void nsDisplayListBuilder::SubtractFromVisibleRegion(nsRegion* aVisibleRegion,
|
||||
|
|
|
@ -2251,7 +2251,8 @@ class nsDisplayItemBase : public nsDisplayItemLink {
|
|||
// The middle 16 bits of the per frame key uniquely identify the display
|
||||
// item when there are more than one item of the same type for a frame.
|
||||
// The low 8 bits are the display item type.
|
||||
return (static_cast<uint32_t>(mExtraPageForPageNum) << (TYPE_BITS + (sizeof(mKey) * 8))) |
|
||||
return (static_cast<uint32_t>(mExtraPageForPageNum)
|
||||
<< (TYPE_BITS + (sizeof(mKey) * 8))) |
|
||||
(static_cast<uint32_t>(mKey) << TYPE_BITS) |
|
||||
static_cast<uint32_t>(mType);
|
||||
}
|
||||
|
|
|
@ -172,7 +172,6 @@ const nsCString& nsCSSProps::GetStringValue(nsCSSCounterDesc aCounterDesc) {
|
|||
|
||||
/***************************************************************************/
|
||||
|
||||
|
||||
const KTableEntry nsCSSProps::kCursorKTable[] = {
|
||||
// CSS 2.0
|
||||
{eCSSKeyword_auto, StyleCursorKind::Auto},
|
||||
|
|
|
@ -1274,8 +1274,7 @@ void nsComputedDOMStyle::AppendGridLineNames(
|
|||
}
|
||||
|
||||
void nsComputedDOMStyle::SetValueToTrackBreadth(
|
||||
nsROCSSPrimitiveValue* aValue,
|
||||
const StyleTrackBreadth& aBreadth) {
|
||||
nsROCSSPrimitiveValue* aValue, const StyleTrackBreadth& aBreadth) {
|
||||
using Tag = StyleTrackBreadth::Tag;
|
||||
switch (aBreadth.tag) {
|
||||
case Tag::MinContent:
|
||||
|
@ -1314,7 +1313,8 @@ already_AddRefed<nsROCSSPrimitiveValue> nsComputedDOMStyle::GetGridTrackSize(
|
|||
fitContentStr.AppendLiteral("fit-content(");
|
||||
MOZ_ASSERT(aTrackSize.AsFitContent().IsBreadth(),
|
||||
"unexpected unit for fit-content() argument value");
|
||||
SetValueToLengthPercentage(val, aTrackSize.AsFitContent().AsBreadth(), true);
|
||||
SetValueToLengthPercentage(val, aTrackSize.AsFitContent().AsBreadth(),
|
||||
true);
|
||||
val->GetCssText(argumentStr);
|
||||
fitContentStr.Append(argumentStr);
|
||||
fitContentStr.Append(char16_t(')'));
|
||||
|
|
|
@ -199,9 +199,12 @@ class nsComputedDOMStyle final : public nsDOMCSSDeclaration,
|
|||
void AppendGridLineNames(nsDOMCSSValueList* aValueList,
|
||||
const nsTArray<RefPtr<nsAtom>>& aLineNames1,
|
||||
const nsTArray<RefPtr<nsAtom>>& aLineNames2);
|
||||
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 nsStyleGridTemplate& aTrackList,
|
||||
const mozilla::ComputedGridTrackInfo* aTrackInfo);
|
||||
|
|
|
@ -1065,7 +1065,7 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsStylePosition {
|
|||
StyleTrackSize mGridAutoColumns;
|
||||
StyleTrackSize mGridAutoRows;
|
||||
float mAspectRatio;
|
||||
uint8_t mGridAutoFlow; // NS_STYLE_GRID_AUTO_FLOW_*
|
||||
uint8_t mGridAutoFlow; // NS_STYLE_GRID_AUTO_FLOW_*
|
||||
mozilla::StyleBoxSizing mBoxSizing;
|
||||
|
||||
// All align/justify properties here take NS_STYLE_ALIGN_* values.
|
||||
|
|
|
@ -1446,7 +1446,8 @@ nsresult JsepSessionImpl::UpdateTransceiversFromRemoteDescription(
|
|||
}
|
||||
|
||||
if (!mSdpHelper.MsectionIsDisabled(msection)) {
|
||||
if (msection.GetAttributeList().HasAttribute(SdpAttribute::kMidAttribute)) {
|
||||
if (msection.GetAttributeList().HasAttribute(
|
||||
SdpAttribute::kMidAttribute)) {
|
||||
transceiver->Associate(msection.GetAttributeList().GetMid());
|
||||
}
|
||||
if (!transceiver->IsAssociated()) {
|
||||
|
|
|
@ -1510,9 +1510,7 @@ class HashTable : private AllocPolicy {
|
|||
};
|
||||
|
||||
// HashTable is movable
|
||||
HashTable(HashTable&& aRhs) : AllocPolicy(std::move(aRhs)) {
|
||||
moveFrom(aRhs);
|
||||
}
|
||||
HashTable(HashTable&& aRhs) : AllocPolicy(std::move(aRhs)) { moveFrom(aRhs); }
|
||||
void operator=(HashTable&& aRhs) {
|
||||
MOZ_ASSERT(this != &aRhs, "self-move assignment is prohibited");
|
||||
if (mTable) {
|
||||
|
|
|
@ -41,7 +41,7 @@ namespace StaticPrefs {
|
|||
inline StripAtomic<cpp_type> id() { \
|
||||
if (UpdatePolicy::policy != UpdatePolicy::Once) { \
|
||||
MOZ_DIAGNOSTIC_ASSERT( \
|
||||
IsAtomic<cpp_type>::value || NS_IsMainThread(), \
|
||||
IsAtomic<cpp_type>::value || NS_IsMainThread(), \
|
||||
"Non-atomic static pref '" name \
|
||||
"' being accessed on background thread by getter"); \
|
||||
return sVarCache_##id; \
|
||||
|
|
|
@ -23,8 +23,7 @@ RemoteSandboxBrokerProcessParent::~RemoteSandboxBrokerProcessParent() {
|
|||
MOZ_COUNT_DTOR(RemoteSandboxBrokerProcessParent);
|
||||
}
|
||||
|
||||
RefPtr<ProcessHandlePromise>
|
||||
RemoteSandboxBrokerProcessParent::AsyncLaunch() {
|
||||
RefPtr<ProcessHandlePromise> RemoteSandboxBrokerProcessParent::AsyncLaunch() {
|
||||
if (!GeckoChildProcessHost::AsyncLaunch()) {
|
||||
return ProcessHandlePromise::CreateAndReject(LaunchError{}, __func__);
|
||||
}
|
||||
|
|
|
@ -33,7 +33,6 @@
|
|||
// returned from the gethash server. They are not serialized,
|
||||
// only cached until the next update.
|
||||
|
||||
|
||||
// MOZ_LOG=UrlClassifierDbService:5
|
||||
extern mozilla::LazyLogModule gUrlClassifierDbServiceLog;
|
||||
#define LOG(args) \
|
||||
|
|
|
@ -124,7 +124,6 @@ nsresult LookupCacheV4::Has(const Completion& aCompletion, bool* aHas,
|
|||
*aHas = true;
|
||||
*aMatchLength = length;
|
||||
|
||||
|
||||
// Even though V4 supports variable-length prefix, we always send 4-bytes for
|
||||
// completion (Bug 1323953). This means cached prefix length is also 4-bytes.
|
||||
return CheckCache(aCompletion, aHas, aConfirmed);
|
||||
|
|
|
@ -173,11 +173,11 @@
|
|||
*
|
||||
*/
|
||||
#ifndef NS_FREE_PERMANENT_DATA
|
||||
#if defined(NS_BUILD_REFCNT_LOGGING) || defined(MOZ_VALGRIND) || \
|
||||
defined(MOZ_ASAN) || defined(MOZ_CODE_COVERAGE) || \
|
||||
defined(MOZ_PROFILE_GENERATE)
|
||||
# define NS_FREE_PERMANENT_DATA
|
||||
#endif
|
||||
# if defined(NS_BUILD_REFCNT_LOGGING) || defined(MOZ_VALGRIND) || \
|
||||
defined(MOZ_ASAN) || defined(MOZ_CODE_COVERAGE) || \
|
||||
defined(MOZ_PROFILE_GENERATE)
|
||||
# define NS_FREE_PERMANENT_DATA
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
|
Загрузка…
Ссылка в новой задаче