mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-04 14:58:37 +09:00
Issue #2490 - Part 18: Convert CSSKeyframesRule to WebIDL.
This commit is contained in:
parent
89d96e0226
commit
b984856d8f
8 changed files with 41 additions and 24 deletions
|
|
@ -42,6 +42,7 @@
|
|||
#include "mozilla/dom/CSSFontFaceRuleBinding.h"
|
||||
#include "mozilla/dom/CSSFontFeatureValuesRuleBinding.h"
|
||||
#include "mozilla/dom/CSSKeyframeRuleBinding.h"
|
||||
#include "mozilla/dom/CSSKeyframesRuleBinding.h"
|
||||
#include "StyleRule.h"
|
||||
#include "nsFont.h"
|
||||
#include "nsIURI.h"
|
||||
|
|
@ -2316,7 +2317,6 @@ nsCSSKeyframesRule::nsCSSKeyframesRule(const nsCSSKeyframesRule& aCopy)
|
|||
: GroupRule(aCopy),
|
||||
mName(aCopy.mName)
|
||||
{
|
||||
SetIsNotDOMBinding();
|
||||
}
|
||||
|
||||
nsCSSKeyframesRule::~nsCSSKeyframesRule()
|
||||
|
|
@ -2336,7 +2336,6 @@ NS_IMPL_RELEASE_INHERITED(nsCSSKeyframesRule, css::GroupRule)
|
|||
// QueryInterface implementation for nsCSSKeyframesRule
|
||||
NS_INTERFACE_MAP_BEGIN(nsCSSKeyframesRule)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIDOMCSSKeyframesRule)
|
||||
NS_DOM_INTERFACE_MAP_ENTRY_CLASSINFO(CSSKeyframesRule)
|
||||
NS_INTERFACE_MAP_END_INHERITING(GroupRule)
|
||||
|
||||
#ifdef DEBUG
|
||||
|
|
@ -2501,14 +2500,19 @@ nsCSSKeyframesRule::DeleteRule(const nsAString& aKey)
|
|||
NS_IMETHODIMP
|
||||
nsCSSKeyframesRule::FindRule(const nsAString& aKey,
|
||||
nsIDOMCSSKeyframeRule** aResult)
|
||||
{
|
||||
NS_IF_ADDREF(*aResult = FindRule(aKey));
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsCSSKeyframeRule*
|
||||
nsCSSKeyframesRule::FindRule(const nsAString& aKey)
|
||||
{
|
||||
uint32_t index = FindRuleIndexForKey(aKey);
|
||||
if (index == RULE_NOT_FOUND) {
|
||||
*aResult = nullptr;
|
||||
} else {
|
||||
NS_ADDREF(*aResult = static_cast<nsCSSKeyframeRule*>(mRules[index]));
|
||||
return nullptr;
|
||||
}
|
||||
return NS_OK;
|
||||
return static_cast<nsCSSKeyframeRule*>(mRules[index]);
|
||||
}
|
||||
|
||||
// GroupRule interface
|
||||
|
|
@ -2537,8 +2541,7 @@ nsCSSKeyframesRule::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const
|
|||
nsCSSKeyframesRule::WrapObject(JSContext* aCx,
|
||||
JS::Handle<JSObject*> aGivenProto)
|
||||
{
|
||||
NS_NOTREACHED("We called SetIsNotDOMBinding() in our constructor");
|
||||
return nullptr;
|
||||
return CSSKeyframesRuleBinding::Wrap(aCx, this, aGivenProto);
|
||||
}
|
||||
|
||||
// -------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue