Issue #2490 - Part 19: Convert CSSCounterStyleRule to WebIDL.

This commit is contained in:
Moonchild 2024-04-04 19:52:36 +02:00 • committed by roytam1
commit 7fb5d53a79
8 changed files with 53 additions and 21 deletions

View file

@ -43,6 +43,7 @@
#include "mozilla/dom/CSSFontFeatureValuesRuleBinding.h"
#include "mozilla/dom/CSSKeyframeRuleBinding.h"
#include "mozilla/dom/CSSKeyframesRuleBinding.h"
#include "mozilla/dom/CSSCounterStyleRuleBinding.h"
#include "StyleRule.h"
#include "nsFont.h"
#include "nsIURI.h"
@ -2913,7 +2914,6 @@ nsCSSCounterStyleRule::nsCSSCounterStyleRule(const nsCSSCounterStyleRule& aCopy)
, mName(aCopy.mName)
, mGeneration(aCopy.mGeneration)
{
SetIsNotDOMBinding();
for (size_t i = 0; i < ArrayLength(mValues); ++i) {
mValues[i] = aCopy.mValues[i];
}
@ -2945,7 +2945,6 @@ NS_IMPL_RELEASE_INHERITED(nsCSSCounterStyleRule, mozilla::css::Rule)
// implementation.
NS_INTERFACE_MAP_BEGIN(nsCSSCounterStyleRule)
NS_INTERFACE_MAP_ENTRY(nsIDOMCSSCounterStyleRule)
NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(CSSCounterStyleRule)
NS_INTERFACE_MAP_END_INHERITING(mozilla::css::Rule)
bool
@ -3350,6 +3349,5 @@ nsCSSCounterStyleRule::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const
nsCSSCounterStyleRule::WrapObject(JSContext* aCx,
JS::Handle<JSObject*> aGivenProto)
{
NS_NOTREACHED("We called SetIsNotDOMBinding() in our constructor");
return nullptr;
return CSSCounterStyleRuleBinding::Wrap(aCx, this, aGivenProto);
}

View file

@ -652,7 +652,6 @@ public:
, mName(aName)
, mGeneration(0)
{
SetIsNotDOMBinding();
}
private:
@ -676,6 +675,28 @@ public:
// WebIDL interface
uint16_t Type() const override;
void GetCssTextImpl(nsAString& aCssText) const override;
// The XPCOM GetName is OK
// The XPCOM SetName is OK
// The XPCOM GetSystem is OK
// The XPCOM SetSystem is OK
// The XPCOM GetSymbols is OK
// The XPCOM SetSymbols is OK
// The XPCOM GetAdditiveSymbols is OK
// The XPCOM SetAdditiveSymbols is OK
// The XPCOM GetNegative is OK
// The XPCOM SetNegative is OK
// The XPCOM GetPrefix is OK
// The XPCOM SetPrefix is OK
// The XPCOM GetSuffix is OK
// The XPCOM SetSuffix is OK
// The XPCOM GetRange is OK
// The XPCOM SetRange is OK
// The XPCOM GetPad is OK
// The XPCOM SetPad is OK
// The XPCOM GetSpeakAs is OK
// The XPCOM SetSpeakAs is OK
// The XPCOM GetFallback is OK
// The XPCOM SetFallback is OK
// This function is only used to check whether a non-empty value, which has
// been accepted by parser, is valid for the given system and descriptor.