style: Invalidate style for ::selection.

This patch invalidates the style for `::selection`, which will restore the
behavior before the regression.

However, it's still not quite correct, because repaint is not triggered. Given
that `::selection` requires some major change to implement
https://github.com/w3c/csswg-drafts/issues/2474, we can address this problem
later.

Differential Revision: https://phabricator.services.mozilla.com/D35305
This commit is contained in:
violet 2019-06-22 10:09:51 +00:00 committed by Emilio Cobos Álvarez
parent 815d189228
commit 6eedebe2c8
No known key found for this signature in database
GPG key ID: E1152D0994E4BF8A
3 changed files with 25 additions and 0 deletions

View file

@ -116,6 +116,12 @@ impl PseudoElement {
*self == PseudoElement::Marker
}
/// Whether this pseudo-element is the ::selection pseudo.
#[inline]
pub fn is_selection(&self) -> bool {
*self == PseudoElement::Selection
}
/// Whether this pseudo-element is ::first-letter.
#[inline]
pub fn is_first_letter(&self) -> bool {