mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-18 07:45:30 +00:00
Bug 1679009 - Simplify some getters in CSSPseudoElement and KeyframeEffect. r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D97939
This commit is contained in:
parent
472511bebf
commit
c3096d1e25
@ -44,11 +44,6 @@ JSObject* CSSPseudoElement::WrapObject(JSContext* aCx,
|
||||
return CSSPseudoElement_Binding::Wrap(aCx, this, aGivenProto);
|
||||
}
|
||||
|
||||
already_AddRefed<dom::Element> CSSPseudoElement::Element() const {
|
||||
RefPtr<dom::Element> retVal(mOriginatingElement);
|
||||
return retVal.forget();
|
||||
}
|
||||
|
||||
/* static */
|
||||
already_AddRefed<CSSPseudoElement> CSSPseudoElement::GetCSSPseudoElement(
|
||||
dom::Element* aElement, PseudoStyleType aType) {
|
||||
|
@ -47,7 +47,7 @@ class CSSPseudoElement final : public nsWrapperCache {
|
||||
aRetVal.Append(
|
||||
nsDependentAtomString(nsCSSPseudoElements::GetPseudoAtom(mPseudoType)));
|
||||
}
|
||||
already_AddRefed<dom::Element> Element() const;
|
||||
dom::Element* Element() const { return mOriginatingElement.get(); }
|
||||
|
||||
// Given an element:pseudoType pair, returns the CSSPseudoElement stored as a
|
||||
// property on |aElement|. If there is no CSSPseudoElement for the specified
|
||||
|
@ -1090,11 +1090,6 @@ already_AddRefed<KeyframeEffect> KeyframeEffect::Constructor(
|
||||
return effect.forget();
|
||||
}
|
||||
|
||||
already_AddRefed<Element> KeyframeEffect::GetTarget() const {
|
||||
RefPtr<Element> ret = mTarget.mElement;
|
||||
return ret.forget();
|
||||
}
|
||||
|
||||
void KeyframeEffect::SetPseudoElement(const nsAString& aPseudoElement,
|
||||
ErrorResult& aRv) {
|
||||
PseudoStyleType pseudoType = PseudoStyleType::NotPseudo;
|
||||
|
@ -142,7 +142,7 @@ class KeyframeEffect : public AnimationEffect {
|
||||
const UnrestrictedDoubleOrKeyframeAnimationOptions& aOptions,
|
||||
ErrorResult& aRv);
|
||||
|
||||
already_AddRefed<Element> GetTarget() const;
|
||||
Element* GetTarget() const { return mTarget.mElement.get(); }
|
||||
NonOwningAnimationTarget GetAnimationTarget() const {
|
||||
return NonOwningAnimationTarget(mTarget.mElement, mTarget.mPseudoType);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user