mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Log element during selector matching
MozReview-Commit-ID: D8eFyRCy5BR
This commit is contained in:
parent
eaefcbe551
commit
6b1b8bbee8
8 changed files with 35 additions and 2 deletions
|
@ -29,6 +29,7 @@ use smallvec::SmallVec;
|
|||
use std::cell::Cell;
|
||||
use std::clone::Clone;
|
||||
use std::cmp;
|
||||
use std::fmt;
|
||||
|
||||
/// When the ElementState of an element (like IN_HOVER_STATE) changes,
|
||||
/// certain pseudo-classes (like :hover) may require us to restyle that
|
||||
|
@ -607,6 +608,15 @@ impl<'a, E> ElementWrapper<'a, E>
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a, E> fmt::Debug for ElementWrapper<'a, E>
|
||||
where E: TElement,
|
||||
{
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
// Ignore other fields for now, can change later if needed.
|
||||
self.element.fmt(f)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "gecko")]
|
||||
fn dir_selector_to_state(s: &[u16]) -> ElementState {
|
||||
// Jump through some hoops to deal with our Box<[u16]> thing.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue