зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1459498: Use a different enum to differentiate IsAlternate from HasAlternateRel. r=heycam
MozReview-Commit-ID: 6pwR8t6fzSD
This commit is contained in:
Родитель
5b6f2bdee0
Коммит
96600d2b9a
|
@ -44,7 +44,7 @@ nsStyleLinkElement::StyleSheetInfo::StyleSheetInfo(
|
|||
mozilla::CORSMode aCORSMode,
|
||||
const nsAString& aTitle,
|
||||
const nsAString& aMedia,
|
||||
IsAlternate aHasAlternateRel,
|
||||
HasAlternateRel aHasAlternateRel,
|
||||
IsInline aIsInline
|
||||
)
|
||||
: mURI(aURI)
|
||||
|
@ -53,7 +53,7 @@ nsStyleLinkElement::StyleSheetInfo::StyleSheetInfo(
|
|||
, mCORSMode(aCORSMode)
|
||||
, mTitle(aTitle)
|
||||
, mMedia(aMedia)
|
||||
, mHasAlternateRel(aHasAlternateRel == IsAlternate::Yes)
|
||||
, mHasAlternateRel(aHasAlternateRel == HasAlternateRel::Yes)
|
||||
, mIsInline(aIsInline == IsInline::Yes)
|
||||
{
|
||||
MOZ_ASSERT(!mIsInline || aContent);
|
||||
|
|
|
@ -41,6 +41,11 @@ protected:
|
|||
No
|
||||
};
|
||||
|
||||
enum class HasAlternateRel
|
||||
{
|
||||
Yes,
|
||||
No
|
||||
};
|
||||
|
||||
struct MOZ_STACK_CLASS StyleSheetInfo
|
||||
{
|
||||
|
@ -54,6 +59,7 @@ protected:
|
|||
nsAutoString mMedia;
|
||||
nsAutoString mIntegrity;
|
||||
|
||||
bool mIsAlternate : 1;
|
||||
bool mHasAlternateRel : 1;
|
||||
bool mIsInline : 1;
|
||||
|
||||
|
@ -65,7 +71,7 @@ protected:
|
|||
mozilla::CORSMode aCORSMode,
|
||||
const nsAString& aTitle,
|
||||
const nsAString& aMedia,
|
||||
IsAlternate aHasAlternateRel,
|
||||
HasAlternateRel aHasAlternateRel,
|
||||
IsInline aIsInline);
|
||||
|
||||
~StyleSheetInfo();
|
||||
|
|
|
@ -475,7 +475,7 @@ HTMLLinkElement::GetStyleSheetInfo()
|
|||
GetCORSMode(),
|
||||
title,
|
||||
media,
|
||||
alternate ? IsAlternate::Yes : IsAlternate::No,
|
||||
alternate ? HasAlternateRel::Yes : HasAlternateRel::No,
|
||||
IsInline::No,
|
||||
});
|
||||
}
|
||||
|
|
|
@ -228,7 +228,7 @@ HTMLStyleElement::GetStyleSheetInfo()
|
|||
CORS_NONE,
|
||||
title,
|
||||
media,
|
||||
IsAlternate::No,
|
||||
HasAlternateRel::No,
|
||||
IsInline::Yes,
|
||||
});
|
||||
}
|
||||
|
|
|
@ -245,7 +245,7 @@ SVGStyleElement::GetStyleSheetInfo()
|
|||
AttrValueToCORSMode(GetParsedAttr(nsGkAtoms::crossorigin)),
|
||||
title,
|
||||
media,
|
||||
IsAlternate::No,
|
||||
HasAlternateRel::No,
|
||||
IsInline::Yes,
|
||||
});
|
||||
}
|
||||
|
|
|
@ -159,7 +159,7 @@ XMLStylesheetProcessingInstruction::GetStyleSheetInfo()
|
|||
CORS_NONE,
|
||||
title,
|
||||
media,
|
||||
alternate ? IsAlternate::Yes : IsAlternate::No,
|
||||
alternate ? HasAlternateRel::Yes : HasAlternateRel::No,
|
||||
IsInline::No,
|
||||
});
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче