Bug 1600376 - Remove useless namespace qualifications in layout/style. r=jwatt

All these things are in the mozilla namespace and such. Clean up a bit.

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Emilio Cobos Álvarez 2019-11-30 11:57:10 +00:00
Родитель e8c4cdd941
Коммит 2c0c593033
23 изменённых файлов: 83 добавлений и 103 удалений

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

@ -45,7 +45,7 @@ class CSSCounterStyleRule final : public css::Rule {
#include "nsCSSCounterDescList.h"
#undef CSS_COUNTER_DESC
size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const final;
size_t SizeOfIncludingThis(MallocSizeOf) const final;
JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) final;

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

@ -29,8 +29,7 @@ class CSSImportRule final : public css::Rule {
void List(FILE* out = stdout, int32_t aIndent = 0) const final;
#endif
size_t SizeOfIncludingThis(
mozilla::MallocSizeOf aMallocSizeOf) const override;
size_t SizeOfIncludingThis(MallocSizeOf) const override;
// WebIDL interface
uint16_t Type() const final { return CSSRule_Binding::IMPORT_RULE; }

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

@ -94,8 +94,7 @@ void CSSMediaRule::GetCssText(nsAString& aCssText) const {
}
/* virtual */
size_t CSSMediaRule::SizeOfIncludingThis(
mozilla::MallocSizeOf aMallocSizeOf) const {
size_t CSSMediaRule::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const {
// TODO Implement this!
return aMallocSizeOf(this);
}

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

@ -38,8 +38,7 @@ class CSSMediaRule final : public css::ConditionRule {
ErrorResult& aRv) final;
dom::MediaList* Media();
size_t SizeOfIncludingThis(
mozilla::MallocSizeOf aMallocSizeOf) const override;
size_t SizeOfIncludingThis(MallocSizeOf) const override;
JSObject* WrapObject(JSContext* aCx,
JS::Handle<JSObject*> aGivenProto) override;

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

@ -39,8 +39,7 @@ class CSSMozDocumentRule final : public css::ConditionRule {
void SetConditionText(const nsAString& aConditionText,
ErrorResult& aRv) final;
size_t SizeOfIncludingThis(
mozilla::MallocSizeOf aMallocSizeOf) const override;
size_t SizeOfIncludingThis(MallocSizeOf) const override;
JSObject* WrapObject(JSContext* aCx,
JS::Handle<JSObject*> aGivenProto) override;

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

@ -28,8 +28,8 @@ class CSSPageRuleDeclaration final : public nsDOMCSSDeclaration {
nsINode* GetParentObject() final;
protected:
mozilla::DeclarationBlock* GetOrCreateCSSDeclaration(
Operation aOperation, mozilla::DeclarationBlock** aCreated) final;
DeclarationBlock* GetOrCreateCSSDeclaration(
Operation aOperation, DeclarationBlock** aCreated) final;
nsresult SetCSSDeclaration(DeclarationBlock* aDecl,
MutationClosureData* aClosureData) final;
Document* DocToUpdate() final { return nullptr; }

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

@ -33,8 +33,7 @@ class CSSSupportsRule : public css::ConditionRule {
void SetConditionText(const nsAString& aConditionText,
ErrorResult& aRv) final;
size_t SizeOfIncludingThis(
mozilla::MallocSizeOf aMallocSizeOf) const override;
size_t SizeOfIncludingThis(MallocSizeOf) const override;
JSObject* WrapObject(JSContext* aCx,
JS::Handle<JSObject*> aGivenProto) override;

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

@ -34,7 +34,7 @@ class CSSValue : public RefCounted<CSSValue> {
};
// CSSValue
virtual void GetCssText(nsString& aText, mozilla::ErrorResult& aRv) = 0;
virtual void GetCssText(nsString& aText, ErrorResult& aRv) = 0;
virtual uint16_t CssValueType() const = 0;
virtual ~CSSValue(){};

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

@ -39,7 +39,7 @@ namespace dom {
class FontFace final : public nsISupports, public nsWrapperCache {
friend class mozilla::PostTraversalTask;
friend class mozilla::dom::FontFaceBufferSource;
friend class FontFaceBufferSource;
friend class Entry;
public:
@ -152,31 +152,31 @@ class FontFace final : public nsISupports, public nsWrapperCache {
// Web IDL
static already_AddRefed<FontFace> Constructor(
const GlobalObject& aGlobal, const nsAString& aFamily,
const mozilla::dom::StringOrArrayBufferOrArrayBufferView& aSource,
const mozilla::dom::FontFaceDescriptors& aDescriptors, ErrorResult& aRV);
const StringOrArrayBufferOrArrayBufferView& aSource,
const FontFaceDescriptors& aDescriptors, ErrorResult& aRV);
void GetFamily(nsString& aResult);
void SetFamily(const nsAString& aValue, mozilla::ErrorResult& aRv);
void SetFamily(const nsAString& aValue, ErrorResult& aRv);
void GetStyle(nsString& aResult);
void SetStyle(const nsAString& aValue, mozilla::ErrorResult& aRv);
void SetStyle(const nsAString& aValue, ErrorResult& aRv);
void GetWeight(nsString& aResult);
void SetWeight(const nsAString& aValue, mozilla::ErrorResult& aRv);
void SetWeight(const nsAString& aValue, ErrorResult& aRv);
void GetStretch(nsString& aResult);
void SetStretch(const nsAString& aValue, mozilla::ErrorResult& aRv);
void SetStretch(const nsAString& aValue, ErrorResult& aRv);
void GetUnicodeRange(nsString& aResult);
void SetUnicodeRange(const nsAString& aValue, mozilla::ErrorResult& aRv);
void SetUnicodeRange(const nsAString& aValue, ErrorResult& aRv);
void GetVariant(nsString& aResult);
void SetVariant(const nsAString& aValue, mozilla::ErrorResult& aRv);
void SetVariant(const nsAString& aValue, ErrorResult& aRv);
void GetFeatureSettings(nsString& aResult);
void SetFeatureSettings(const nsAString& aValue, mozilla::ErrorResult& aRv);
void SetFeatureSettings(const nsAString& aValue, ErrorResult& aRv);
void GetVariationSettings(nsString& aResult);
void SetVariationSettings(const nsAString& aValue, mozilla::ErrorResult& aRv);
void SetVariationSettings(const nsAString& aValue, ErrorResult& aRv);
void GetDisplay(nsString& aResult);
void SetDisplay(const nsAString& aValue, mozilla::ErrorResult& aRv);
void SetDisplay(const nsAString& aValue, ErrorResult& aRv);
mozilla::dom::FontFaceLoadStatus Status();
mozilla::dom::Promise* Load(mozilla::ErrorResult& aRv);
mozilla::dom::Promise* GetLoaded(mozilla::ErrorResult& aRv);
FontFaceLoadStatus Status();
Promise* Load(ErrorResult& aRv);
Promise* GetLoaded(ErrorResult& aRv);
private:
FontFace(nsISupports* aParent, FontFaceSet* aFontFaceSet);
@ -191,7 +191,7 @@ class FontFace final : public nsISupports, public nsWrapperCache {
// Returns true if the descriptor was modified, false if descriptor is
// unchanged (which may not be an error: check aRv for actual failure).
bool SetDescriptor(nsCSSFontDesc aFontDesc, const nsAString& aValue,
mozilla::ErrorResult& aRv);
ErrorResult& aRv);
/**
* Sets all of the descriptor values in mDescriptors using values passed
@ -210,7 +210,7 @@ class FontFace final : public nsISupports, public nsWrapperCache {
/**
* Sets the current loading status.
*/
void SetStatus(mozilla::dom::FontFaceLoadStatus aStatus);
void SetStatus(FontFaceLoadStatus aStatus);
void GetDesc(nsCSSFontDesc aDescID, nsString& aResult) const;
@ -241,7 +241,7 @@ class FontFace final : public nsISupports, public nsWrapperCache {
// A Promise that is fulfilled once the font represented by this FontFace is
// loaded, and is rejected if the load fails. This promise is created lazily
// when JS asks for it.
RefPtr<mozilla::dom::Promise> mLoaded;
RefPtr<Promise> mLoaded;
// Saves the rejection code for mLoaded if mLoaded hasn't been created yet.
nsresult mLoadedRejection;
@ -258,7 +258,7 @@ class FontFace final : public nsISupports, public nsWrapperCache {
// Note that we can't just reflect the value of the gfxUserFontEntry's
// status, since the spec sometimes requires us to go through the event
// loop before updating the status, rather than doing it immediately.
mozilla::dom::FontFaceLoadStatus mStatus;
FontFaceLoadStatus mStatus;
// Represents where a FontFace's data is coming from.
enum SourceType {

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

@ -655,9 +655,8 @@ nsresult FontFaceSet::StartLoad(gfxUserFontEntry* aUserFontEntry,
rv = NS_NewStreamLoader(getter_AddRefs(streamLoader), fontLoader, fontLoader);
NS_ENSURE_SUCCESS(rv, rv);
mozilla::net::PredictorLearn(
aFontFaceSrc->mURI->get(), mDocument->GetDocumentURI(),
nsINetworkPredictor::LEARN_LOAD_SUBRESOURCE, loadGroup);
net::PredictorLearn(aFontFaceSrc->mURI->get(), mDocument->GetDocumentURI(),
nsINetworkPredictor::LEARN_LOAD_SUBRESOURCE, loadGroup);
rv = channel->AsyncOpen(streamLoader);
if (NS_FAILED(rv)) {

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

@ -73,8 +73,7 @@ class FontFaceSet final : public DOMEventTargetHelper,
virtual nsresult StartLoad(gfxUserFontEntry* aUserFontEntry,
const gfxFontFaceSrc* aFontFaceSrc) override;
void RecordFontLoadDone(uint32_t aFontSize,
mozilla::TimeStamp aDoneTime) override;
void RecordFontLoadDone(uint32_t aFontSize, TimeStamp aDoneTime) override;
bool BypassCache() final {
return mFontFaceSet && mFontFaceSet->mBypassCache;
@ -153,7 +152,7 @@ class FontFaceSet final : public DOMEventTargetHelper,
static bool PrefEnabled();
// nsICSSLoaderObserver
NS_IMETHOD StyleSheetLoaded(mozilla::StyleSheet* aSheet, bool aWasDeferred,
NS_IMETHOD StyleSheetLoaded(StyleSheet* aSheet, bool aWasDeferred,
nsresult aStatus) override;
FontFace* GetFontFaceAt(uint32_t aIndex);
@ -176,25 +175,22 @@ class FontFaceSet final : public DOMEventTargetHelper,
IMPL_EVENT_HANDLER(loading)
IMPL_EVENT_HANDLER(loadingdone)
IMPL_EVENT_HANDLER(loadingerror)
already_AddRefed<mozilla::dom::Promise> Load(JSContext* aCx,
const nsAString& aFont,
const nsAString& aText,
mozilla::ErrorResult& aRv);
bool Check(const nsAString& aFont, const nsAString& aText,
mozilla::ErrorResult& aRv);
mozilla::dom::Promise* GetReady(mozilla::ErrorResult& aRv);
mozilla::dom::FontFaceSetLoadStatus Status();
already_AddRefed<dom::Promise> Load(JSContext* aCx, const nsAString& aFont,
const nsAString& aText, ErrorResult& aRv);
bool Check(const nsAString& aFont, const nsAString& aText, ErrorResult& aRv);
dom::Promise* GetReady(ErrorResult& aRv);
dom::FontFaceSetLoadStatus Status();
void Add(FontFace& aFontFace, mozilla::ErrorResult& aRv);
void Add(FontFace& aFontFace, ErrorResult& aRv);
void Clear();
bool Delete(FontFace& aFontFace);
bool Has(FontFace& aFontFace);
uint32_t Size();
already_AddRefed<mozilla::dom::FontFaceSetIterator> Entries();
already_AddRefed<mozilla::dom::FontFaceSetIterator> Values();
already_AddRefed<dom::FontFaceSetIterator> Entries();
already_AddRefed<dom::FontFaceSetIterator> Values();
MOZ_CAN_RUN_SCRIPT
void ForEach(JSContext* aCx, FontFaceSetForEachCallback& aCallback,
JS::Handle<JS::Value> aThisArg, mozilla::ErrorResult& aRv);
JS::Handle<JS::Value> aThisArg, ErrorResult& aRv);
// For ServoStyleSet to know ahead of time whether a font is loadable.
void CacheFontLoadability();
@ -306,8 +302,7 @@ class FontFaceSet final : public DOMEventTargetHelper,
FontWeight& aWeight, FontStretch& aStretch,
FontSlantStyle& aStyle, ErrorResult& aRv);
void FindMatchingFontFaces(const nsAString& aFont, const nsAString& aText,
nsTArray<FontFace*>& aFontFaces,
mozilla::ErrorResult& aRv);
nsTArray<FontFace*>& aFontFaces, ErrorResult& aRv);
void DispatchLoadingEventAndReplaceReadyPromise();
void DispatchCheckLoadingFinishedAfterDelay();
@ -339,7 +334,7 @@ class FontFaceSet final : public DOMEventTargetHelper,
// a new Promise object whenever mReady is settled and another
// FontFace in mRuleFaces or mNonRuleFaces starts to load.
// Note that mReady is created lazily when GetReady() is called.
RefPtr<mozilla::dom::Promise> mReady;
RefPtr<dom::Promise> mReady;
// Whether the ready promise must be resolved when it's created.
bool mResolveLazilyCreatedReadyPromise;
@ -356,7 +351,7 @@ class FontFaceSet final : public DOMEventTargetHelper,
nsTArray<FontFaceRecord> mNonRuleFaces;
// The overall status of the loading or loaded fonts in the FontFaceSet.
mozilla::dom::FontFaceSetLoadStatus mStatus;
dom::FontFaceSetLoadStatus mStatus;
// A map from gfxFontFaceSrc pointer identity to whether the load is allowed
// by CSP or other checks. We store this here because querying CSP off the

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

@ -16,8 +16,7 @@ namespace dom {
class FontFaceSetIterator final {
public:
FontFaceSetIterator(mozilla::dom::FontFaceSet* aFontFaceSet,
bool aIsKeyAndValue);
FontFaceSetIterator(FontFaceSet*, bool aIsKeyAndValue);
NS_DECL_CYCLE_COLLECTION_NATIVE_CLASS(FontFaceSetIterator)
NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(FontFaceSetIterator)
@ -27,7 +26,7 @@ class FontFaceSetIterator final {
// WebIDL
void Next(JSContext* aCx, FontFaceSetIteratorResult& aResult,
mozilla::ErrorResult& aRv);
ErrorResult& aRv);
private:
~FontFaceSetIterator();

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

@ -64,9 +64,8 @@ class GroupRule : public Rule {
}
// non-virtual -- it is only called by subclasses
size_t SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;
virtual size_t SizeOfIncludingThis(
mozilla::MallocSizeOf aMallocSizeOf) const override = 0;
size_t SizeOfExcludingThis(MallocSizeOf) const;
size_t SizeOfIncludingThis(MallocSizeOf) const override = 0;
// WebIDL API
dom::CSSRuleList* CssRules() { return mRuleList; }

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

@ -780,7 +780,7 @@ static nsresult VerifySheetIntegrity(const SRIMetadata& aMetadata,
nsIConsoleReportCollector* aReporter) {
NS_ENSURE_ARG_POINTER(aReporter);
if (MOZ_LOG_TEST(SRILogHelper::GetSriLog(), mozilla::LogLevel::Debug)) {
if (MOZ_LOG_TEST(SRILogHelper::GetSriLog(), LogLevel::Debug)) {
nsAutoCString requestURL;
nsCOMPtr<nsIURI> originalURI;
if (aChannel &&
@ -788,7 +788,7 @@ static nsresult VerifySheetIntegrity(const SRIMetadata& aMetadata,
originalURI) {
originalURI->GetAsciiSpec(requestURL);
}
MOZ_LOG(SRILogHelper::GetSriLog(), mozilla::LogLevel::Debug,
MOZ_LOG(SRILogHelper::GetSriLog(), LogLevel::Debug,
("VerifySheetIntegrity (unichar stream)"));
}
@ -995,7 +995,7 @@ nsresult SheetLoadData::VerifySheetReadyToParse(nsresult aStatus,
if (NS_FAILED(rv)) {
LOG((" Load was blocked by SRI"));
MOZ_LOG(gSriPRLog, mozilla::LogLevel::Debug,
MOZ_LOG(gSriPRLog, LogLevel::Debug,
("css::Loader::OnStreamComplete, bad metadata"));
mLoader->SheetComplete(*this, NS_ERROR_SRI_CORRUPT);
return NS_OK;
@ -1121,7 +1121,7 @@ Tuple<RefPtr<StyleSheet>, Loader::SheetState> Loader::CreateSheet(
SRIMetadata sriMetadata;
if (!aIntegrity.IsEmpty()) {
MOZ_LOG(gSriPRLog, mozilla::LogLevel::Debug,
MOZ_LOG(gSriPRLog, LogLevel::Debug,
("css::Loader::CreateSheet, integrity=%s",
NS_ConvertUTF16toUTF8(aIntegrity).get()));
nsAutoCString sourceUri;
@ -1331,9 +1331,9 @@ nsresult Loader::LoadSheet(SheetLoadData& aLoadData, SheetState aSheetState,
nsCOMPtr<nsIStreamListener> streamLoader = new StreamLoader(aLoadData);
if (mDocument) {
mozilla::net::PredictorLearn(aLoadData.mURI, mDocument->GetDocumentURI(),
nsINetworkPredictor::LEARN_LOAD_SUBRESOURCE,
mDocument);
net::PredictorLearn(aLoadData.mURI, mDocument->GetDocumentURI(),
nsINetworkPredictor::LEARN_LOAD_SUBRESOURCE,
mDocument);
}
nsSecurityFlags securityFlags =
@ -1603,9 +1603,8 @@ nsresult Loader::LoadSheet(SheetLoadData& aLoadData, SheetState aSheetState,
nsCOMPtr<nsIStreamListener> streamLoader = new StreamLoader(aLoadData);
if (mDocument) {
mozilla::net::PredictorLearn(aLoadData.mURI, mDocument->GetDocumentURI(),
nsINetworkPredictor::LEARN_LOAD_SUBRESOURCE,
mDocument);
net::PredictorLearn(aLoadData.mURI, mDocument->GetDocumentURI(),
nsINetworkPredictor::LEARN_LOAD_SUBRESOURCE, mDocument);
}
rv = channel->AsyncOpen(streamLoader);

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

@ -86,7 +86,7 @@ class MOZ_RAII LoaderReusableStyleSheets {
};
class Loader final {
typedef mozilla::dom::ReferrerPolicy ReferrerPolicy;
using ReferrerPolicy = dom::ReferrerPolicy;
public:
typedef nsIStyleSheetLinkingElement::Completed Completed;
@ -102,8 +102,8 @@ class Loader final {
// aDocGroup is used for dispatching SheetLoadData in PostLoadEvent(). It
// can be null if you want to use this constructor, and there's no
// document when the Loader is constructed.
explicit Loader(mozilla::dom::DocGroup*);
explicit Loader(mozilla::dom::Document*);
explicit Loader(dom::DocGroup*);
explicit Loader(dom::Document*);
private:
// Private destructor, to discourage deletion outside of Release():
@ -274,7 +274,7 @@ class Loader final {
/**
* Get the document we live for. May return null.
*/
mozilla::dom::Document* GetDocument() const { return mDocument; }
dom::Document* GetDocument() const { return mDocument; }
/**
* Return true if this loader has pending loads (ones that would send
@ -314,7 +314,7 @@ class Loader final {
typedef nsTArray<RefPtr<SheetLoadData>> LoadDataArray;
// Measure our size.
size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;
size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const;
private:
friend class SheetLoadData;
@ -439,11 +439,10 @@ class Loader final {
// This reference is nulled by the Document in it's destructor through
// DropDocumentReference().
mozilla::dom::Document* MOZ_NON_OWNING_REF
mDocument; // the document we live for
dom::Document* MOZ_NON_OWNING_REF mDocument; // the document we live for
// For dispatching events via DocGroup::Dispatch() when mDocument is nullptr.
RefPtr<mozilla::dom::DocGroup> mDocGroup;
RefPtr<dom::DocGroup> mDocGroup;
// Number of datas still waiting to be notified on if we're notifying on a
// whole bunch at once (e.g. in one of the stop methods). This is used to

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

@ -79,14 +79,14 @@ class MappedDeclarations final {
template <typename T,
typename = typename std::enable_if<std::is_enum<T>::value>::type>
void SetKeywordValue(nsCSSPropertyID aId, T aValue) {
static_assert(mozilla::EnumTypeFitsWithin<T, int32_t>::value,
static_assert(EnumTypeFitsWithin<T, int32_t>::value,
"aValue must be an enum that fits within 32 bits");
SetKeywordValue(aId, static_cast<int32_t>(aValue));
}
template <typename T,
typename = typename std::enable_if<std::is_enum<T>::value>::type>
void SetKeywordValueIfUnset(nsCSSPropertyID aId, T aValue) {
static_assert(mozilla::EnumTypeFitsWithin<T, int32_t>::value,
static_assert(EnumTypeFitsWithin<T, int32_t>::value,
"aValue must be an enum that fits within 32 bits");
SetKeywordValueIfUnset(aId, static_cast<int32_t>(aValue));
}

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

@ -25,7 +25,7 @@ namespace dom {
class MediaList;
class MediaQueryList final : public DOMEventTargetHelper,
public mozilla::LinkedListElement<MediaQueryList> {
public LinkedListElement<MediaQueryList> {
public:
// The caller who constructs is responsible for calling Evaluate
// before calling any other methods.

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

@ -17,10 +17,10 @@
#define AVG2(a, b) (((a) + (b) + 1) >> 1)
using mozilla::dom::Document;
namespace mozilla {
using dom::Document;
bool PreferenceSheet::sInitialized;
PreferenceSheet::Prefs PreferenceSheet::sContentPrefs;
PreferenceSheet::Prefs PreferenceSheet::sChromePrefs;

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

@ -94,8 +94,7 @@ class Rule : public nsISupports, public nsWrapperCache {
// This is pure virtual because all of Rule's data members are non-owning and
// thus measured elsewhere.
virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const
MOZ_MUST_OVERRIDE = 0;
virtual size_t SizeOfIncludingThis(MallocSizeOf) const MOZ_MUST_OVERRIDE = 0;
// WebIDL interface
virtual uint16_t Type() const = 0;

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

@ -39,7 +39,6 @@
#include "nsWindowSizes.h"
#include "GeckoProfiler.h"
using namespace mozilla;
using namespace mozilla::dom;
#ifdef DEBUG
@ -312,7 +311,7 @@ void ServoStyleSet::PreTraverseSync() {
// Get the Document's root element to ensure that the cache is valid before
// calling into the (potentially-parallel) Servo traversal, where a cache hit
// is necessary to avoid a data race when updating the cache.
mozilla::Unused << mDocument->GetRootElement();
Unused << mDocument->GetRootElement();
// FIXME(emilio): This shouldn't be needed in theory, the call to the same
// function in PresShell should do the work, but as it turns out we
@ -892,7 +891,7 @@ bool ServoStyleSet::GetKeyframesForName(const Element& aElement,
nsTArray<ComputedKeyframeValues> ServoStyleSet::GetComputedKeyframeValuesFor(
const nsTArray<Keyframe>& aKeyframes, Element* aElement,
const mozilla::ComputedStyle* aStyle) {
const ComputedStyle* aStyle) {
nsTArray<ComputedKeyframeValues> result(aKeyframes.Length());
// Construct each nsTArray<PropertyStyleAnimationValuePair> here.
@ -932,7 +931,7 @@ ServoStyleSet::ResolveServoStyleByAddingAnimation(
already_AddRefed<RawServoAnimationValue> ServoStyleSet::ComputeAnimationValue(
Element* aElement, RawServoDeclarationBlock* aDeclarations,
const mozilla::ComputedStyle* aStyle) {
const ComputedStyle* aStyle) {
return Servo_AnimationValue_Compute(aElement, aDeclarations, aStyle,
mRawSet.get())
.Consume();

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

@ -38,7 +38,7 @@ StreamLoader::OnStartRequest(nsIRequest* aRequest) {
if (length > MaxValue<nsACString::size_type>::value) {
return (mStatus = NS_ERROR_OUT_OF_MEMORY);
}
if (!mBytes.SetCapacity(length, mozilla::fallible_t())) {
if (!mBytes.SetCapacity(length, fallible)) {
return (mStatus = NS_ERROR_OUT_OF_MEMORY);
}
}
@ -162,7 +162,7 @@ nsresult StreamLoader::WriteSegmentFun(nsIInputStream*, void* aClosure,
}
}
if (!self->mBytes.Append(aSegment, aCount, mozilla::fallible_t())) {
if (!self->mBytes.Append(aSegment, aCount, fallible)) {
self->mBytes.Truncate();
return (self->mStatus = NS_ERROR_OUT_OF_MEMORY);
}

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

@ -198,23 +198,20 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_END
NS_IMPL_CYCLE_COLLECTION_TRACE_WRAPPERCACHE(StyleSheet)
mozilla::dom::CSSStyleSheetParsingMode StyleSheet::ParsingModeDOM() {
dom::CSSStyleSheetParsingMode StyleSheet::ParsingModeDOM() {
#define CHECK_MODE(X, Y) \
static_assert( \
static_cast<int>(X) == static_cast<int>(Y), \
"mozilla::dom::CSSStyleSheetParsingMode and " \
"mozilla::css::SheetParsingMode should have identical values");
CHECK_MODE(mozilla::dom::CSSStyleSheetParsingMode::Agent,
css::eAgentSheetFeatures);
CHECK_MODE(mozilla::dom::CSSStyleSheetParsingMode::User,
css::eUserSheetFeatures);
CHECK_MODE(mozilla::dom::CSSStyleSheetParsingMode::Author,
css::eAuthorSheetFeatures);
CHECK_MODE(dom::CSSStyleSheetParsingMode::Agent, css::eAgentSheetFeatures);
CHECK_MODE(dom::CSSStyleSheetParsingMode::User, css::eUserSheetFeatures);
CHECK_MODE(dom::CSSStyleSheetParsingMode::Author, css::eAuthorSheetFeatures);
#undef CHECK_MODE
return static_cast<mozilla::dom::CSSStyleSheetParsingMode>(mParsingMode);
return static_cast<dom::CSSStyleSheetParsingMode>(mParsingMode);
}
void StyleSheet::SetComplete() {

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

@ -140,7 +140,7 @@ class StyleSheet final : public nsICSSLoaderObserver, public nsWrapperCache {
ServoCSSRuleList* GetCssRulesInternal();
// Returns the stylesheet's Servo origin as a StyleOrigin value.
mozilla::StyleOrigin GetOrigin() const;
StyleOrigin GetOrigin() const;
/**
* The different changes that a stylesheet may go through.
@ -160,7 +160,7 @@ class StyleSheet final : public nsICSSLoaderObserver, public nsWrapperCache {
void SetOwningNode(nsINode* aOwningNode) { mOwningNode = aOwningNode; }
css::SheetParsingMode ParsingMode() const { return mParsingMode; }
mozilla::dom::CSSStyleSheetParsingMode ParsingModeDOM();
dom::CSSStyleSheetParsingMode ParsingModeDOM();
/**
* Whether the sheet is complete.
@ -520,7 +520,7 @@ class StyleSheet final : public nsICSSLoaderObserver, public nsWrapperCache {
// Make StyleSheetInfo and subclasses into friends so they can use
// ChildSheetListBuilder.
friend struct mozilla::StyleSheetInfo;
friend struct StyleSheetInfo;
};
} // namespace mozilla