Bug 1274944 - Part 1: Add writable spacing attribute. r=smaug

Use [SetterThrows] for KeyframeEffect.spacing because it throws if the input
string is not conformed to the grammar.

MozReview-Commit-ID: CkAnPu8TnV

--HG--
extra : rebase_source : af0960391684323a25ac0b40da28dcbe5c3c2919
This commit is contained in:
Boris Chiou 2016-08-31 16:58:57 +08:00
parent 941035740b
commit adeea43b3b
4 changed files with 16 additions and 2 deletions

View File

@ -125,5 +125,13 @@ KeyframeEffect::SetTarget(const Nullable<ElementOrCSSPseudoElement>& aTarget)
}
}
void
KeyframeEffect::SetSpacing(JSContext* aCx,
const nsAString& aSpacing,
ErrorResult& aRv)
{
// TODO: Implement this in the next patch.
}
} // namespace dom
} // namespace mozilla

View File

@ -65,6 +65,8 @@ public:
// that to update the properties rather than calling
// GetStyleContextForElement.
void SetTarget(const Nullable<ElementOrCSSPseudoElement>& aTarget);
void SetSpacing(JSContext* aCx, const nsAString& aSpacing, ErrorResult& aRv);
};
} // namespace dom

View File

@ -624,6 +624,10 @@ DOMInterfaces = {
'concrete': False
},
'KeyframeEffect': {
'implicitJSContext': { 'setterOnly': [ 'spacing' ] }
},
'LegacyMozTCPSocket': {
'headerFile': 'TCPSocket.h',
'wrapperCache': False,

View File

@ -73,8 +73,8 @@ interface KeyframeEffect : KeyframeEffectReadOnly {
// inherit attribute IterationCompositeOperation iterationComposite;
// Bug 1216844 - implement additive animation
// inherit attribute CompositeOperation composite;
// Bug 1244590 - implement spacing modes
// inherit attribute DOMString spacing;
[SetterThrows]
inherit attribute DOMString spacing;
[Throws]
void setKeyframes (object? keyframes);
};