Skip to content

Commit

Permalink
Implement new pseudoElement interface on KeyframeEffect
Browse files Browse the repository at this point in the history
Make target() return the originating element if target_ is a
PseudoElement (BlinkTarget still returns the layout object).

Add pseudoElement() property which returns the target pseudo-selector
if the target is a pseudo-element (null otherwise).
Invalid and unsupported pseudo-elements will still return a selector
but will not animated (i.e. BlinkTarget returns null).

Add pseudoElement option to KeyframeEffect constructor.

Change-Id: Id7d16ea6966c533e56d1170462ff60a79b277fd5
Bug: 981894
  • Loading branch information
george-steel authored and chromium-wpt-export-bot committed Dec 19, 2019
1 parent 7139b3d commit efc9e6c
Showing 1 changed file with 9 additions and 0 deletions.
Expand Up @@ -121,6 +121,15 @@
},
});
},
pseudoElement: MakeInEffectTest({
setup: elem => elem.animate(
{opacity: [0.5, 1]},
{duration: 100 * MS_PER_SEC, pseudoElement: '::before'}
),
test: effect => {
effect.pseudoElement = null;
},
}),
iterationComposite: UsePropertyTest(effect => {
// Get iterationComposite
effect.iterationComposite;
Expand Down

0 comments on commit efc9e6c

Please sign in to comment.