Bug 1350140: stylo: Implement all the remaining state pseudo-classes. r=heycam

Also implements :link, :visited, and :any-link more efficiently, and stops
matching :-moz-read-only in everything that is not read-write, which is kind of
dumb, and probably creates some artifacts.

MozReview-Commit-ID: 6BQqi7nAWdT
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
This commit is contained in:
Emilio Cobos Álvarez 2017-03-24 00:45:07 +01:00
parent 299f9446e6
commit a6277d5513
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
5 changed files with 188 additions and 82 deletions

View file

@ -138,7 +138,7 @@ impl ::selectors::MatchAttr for GeckoElementSnapshot {
impl ElementSnapshot for GeckoElementSnapshot {
fn state(&self) -> Option<ElementState> {
if self.has_any(Flags::State) {
Some(ElementState::from_bits_truncate(unsafe { (*self.0).mState as u32 }))
Some(ElementState::from_bits_truncate(unsafe { (*self.0).mState }))
} else {
None
}