зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 370357882bef (bug 1393189)
This commit is contained in:
Родитель
13ff1408e8
Коммит
61bf0a9a2e
|
@ -238,18 +238,6 @@ public:
|
|||
bool IsResolved() const { return !IsUnresolved(); }
|
||||
inline void Resolve(CounterStyleManager* aManager);
|
||||
|
||||
nsIAtom* AsAtom() const
|
||||
{
|
||||
MOZ_ASSERT(IsUnresolved());
|
||||
return reinterpret_cast<nsIAtom*>(mRaw & ~eMask);
|
||||
}
|
||||
AnonymousCounterStyle* AsAnonymous() const
|
||||
{
|
||||
MOZ_ASSERT(IsAnonymous());
|
||||
return static_cast<AnonymousCounterStyle*>(
|
||||
reinterpret_cast<CounterStyle*>(mRaw & ~eMask));
|
||||
}
|
||||
|
||||
private:
|
||||
CounterStyle* Get() const
|
||||
{
|
||||
|
@ -278,6 +266,17 @@ private:
|
|||
Type GetType() const { return static_cast<Type>(mRaw & eMask); }
|
||||
bool IsUnresolved() const { return GetType() == eUnresolvedAtom; }
|
||||
bool IsAnonymous() const { return GetType() == eAnonymousCounterStyle; }
|
||||
nsIAtom* AsAtom()
|
||||
{
|
||||
MOZ_ASSERT(IsUnresolved());
|
||||
return reinterpret_cast<nsIAtom*>(mRaw & ~eMask);
|
||||
}
|
||||
AnonymousCounterStyle* AsAnonymous()
|
||||
{
|
||||
MOZ_ASSERT(IsAnonymous());
|
||||
return static_cast<AnonymousCounterStyle*>(
|
||||
reinterpret_cast<CounterStyle*>(mRaw & ~eMask));
|
||||
}
|
||||
|
||||
void Reset()
|
||||
{
|
||||
|
|
|
@ -1453,19 +1453,53 @@ Gecko_CopyCounterStyle(CounterStylePtr* aDst, const CounterStylePtr* aSrc)
|
|||
*aDst = *aSrc;
|
||||
}
|
||||
|
||||
nsIAtom*
|
||||
Gecko_CounterStyle_GetName(const CounterStylePtr* aPtr)
|
||||
{
|
||||
if (!aPtr->IsResolved()) {
|
||||
return aPtr->AsAtom();
|
||||
}
|
||||
return (*aPtr)->GetStyleName();
|
||||
bool
|
||||
Gecko_CounterStyle_IsNone(const CounterStylePtr* aPtr) {
|
||||
MOZ_ASSERT(aPtr);
|
||||
return (*aPtr)->IsNone();
|
||||
}
|
||||
|
||||
const AnonymousCounterStyle*
|
||||
Gecko_CounterStyle_GetAnonymous(const CounterStylePtr* aPtr)
|
||||
{
|
||||
return aPtr->AsAnonymous();
|
||||
bool
|
||||
Gecko_CounterStyle_IsName(const CounterStylePtr* aPtr) {
|
||||
return !Gecko_CounterStyle_IsNone(aPtr) && !(*aPtr)->AsAnonymous();
|
||||
}
|
||||
|
||||
void
|
||||
Gecko_CounterStyle_GetName(const CounterStylePtr* aPtr,
|
||||
nsAString* aResult) {
|
||||
MOZ_ASSERT(Gecko_CounterStyle_IsName(aPtr));
|
||||
nsIAtom* name = (*aPtr)->GetStyleName();
|
||||
*aResult = nsDependentAtomString(name);
|
||||
}
|
||||
|
||||
const nsTArray<nsString>&
|
||||
Gecko_CounterStyle_GetSymbols(const CounterStylePtr* aPtr) {
|
||||
MOZ_ASSERT((*aPtr)->AsAnonymous());
|
||||
AnonymousCounterStyle* anonymous = (*aPtr)->AsAnonymous();
|
||||
return anonymous->GetSymbols();
|
||||
}
|
||||
|
||||
uint8_t
|
||||
Gecko_CounterStyle_GetSystem(const CounterStylePtr* aPtr) {
|
||||
MOZ_ASSERT((*aPtr)->AsAnonymous());
|
||||
AnonymousCounterStyle* anonymous = (*aPtr)->AsAnonymous();
|
||||
return anonymous->GetSystem();
|
||||
}
|
||||
|
||||
bool
|
||||
Gecko_CounterStyle_IsSingleString(const CounterStylePtr* aPtr) {
|
||||
MOZ_ASSERT(aPtr);
|
||||
AnonymousCounterStyle* anonymous = (*aPtr)->AsAnonymous();
|
||||
return anonymous ? anonymous->IsSingleString() : false;
|
||||
}
|
||||
|
||||
void
|
||||
Gecko_CounterStyle_GetSingleString(const CounterStylePtr* aPtr,
|
||||
nsAString* aResult) {
|
||||
MOZ_ASSERT(Gecko_CounterStyle_IsSingleString(aPtr));
|
||||
const nsTArray<nsString>& symbols = Gecko_CounterStyle_GetSymbols(aPtr);
|
||||
MOZ_ASSERT(symbols.Length() == 1);
|
||||
aResult->Assign(symbols[0]);
|
||||
}
|
||||
|
||||
already_AddRefed<css::URLValue>
|
||||
|
|
|
@ -332,9 +332,15 @@ void Gecko_SetCounterStyleToString(mozilla::CounterStylePtr* ptr,
|
|||
const nsACString* symbol);
|
||||
void Gecko_CopyCounterStyle(mozilla::CounterStylePtr* dst,
|
||||
const mozilla::CounterStylePtr* src);
|
||||
nsIAtom* Gecko_CounterStyle_GetName(const mozilla::CounterStylePtr* ptr);
|
||||
const mozilla::AnonymousCounterStyle*
|
||||
Gecko_CounterStyle_GetAnonymous(const mozilla::CounterStylePtr* ptr);
|
||||
bool Gecko_CounterStyle_IsNone(const mozilla::CounterStylePtr* ptr);
|
||||
bool Gecko_CounterStyle_IsName(const mozilla::CounterStylePtr* ptr);
|
||||
void Gecko_CounterStyle_GetName(const mozilla::CounterStylePtr* ptr,
|
||||
nsAString* result);
|
||||
const nsTArray<nsString>& Gecko_CounterStyle_GetSymbols(const mozilla::CounterStylePtr* ptr);
|
||||
uint8_t Gecko_CounterStyle_GetSystem(const mozilla::CounterStylePtr* ptr);
|
||||
bool Gecko_CounterStyle_IsSingleString(const mozilla::CounterStylePtr* ptr);
|
||||
void Gecko_CounterStyle_GetSingleString(const mozilla::CounterStylePtr* ptr,
|
||||
nsAString* result);
|
||||
|
||||
// background-image style.
|
||||
void Gecko_SetNullImageValue(nsStyleImage* image);
|
||||
|
|
|
@ -123,7 +123,6 @@ whitelist-vars = [
|
|||
whitelist-types = [
|
||||
"RawGecko.*",
|
||||
"mozilla::AnimationPropertySegment",
|
||||
"mozilla::AnonymousCounterStyle",
|
||||
"mozilla::ComputedTiming",
|
||||
"mozilla::ComputedTimingFunction",
|
||||
"mozilla::ComputedTimingFunction::BeforeFlag",
|
||||
|
@ -371,7 +370,6 @@ structs-types = [
|
|||
"mozilla::css::ImageValue",
|
||||
"mozilla::css::URLValue",
|
||||
"mozilla::css::URLValueData",
|
||||
"mozilla::AnonymousCounterStyle",
|
||||
"mozilla::MallocSizeOf",
|
||||
"mozilla::OriginFlags",
|
||||
"mozilla::Side",
|
||||
|
|
Загрузка…
Ссылка в новой задаче