Stylo: match both ::placehoder & ::moz-placeholder for placeholder pseudo-elements.

This commit is contained in:
cku 2017-05-23 23:51:20 +08:00
parent 84c1f904cb
commit 6143e95d74
5 changed files with 22 additions and 4 deletions

View file

@ -684,6 +684,8 @@ pub trait MatchMethods : TElement {
{
let implemented_pseudo = self.implemented_pseudo_element();
if let Some(ref pseudo) = implemented_pseudo {
// We don't expect to match against a non-canonical pseudo-element.
debug_assert_eq!(*pseudo, pseudo.canonical());
if pseudo.is_eager() {
// If it's an eager element-backed pseudo, just grab the matched
// rules from the parent, and update animations.