mirror of
https://github.com/servo/servo.git
synced 2025-08-02 20:20:14 +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
|
@ -453,6 +453,16 @@ impl<'a, Impl: SelectorImpl> Iterator for SelectorIter<'a, Impl> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a, Impl: SelectorImpl> fmt::Debug for SelectorIter<'a, Impl> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
let iter = self.iter.clone().rev();
|
||||
for component in iter {
|
||||
component.to_css(f)?
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
/// An iterator over all simple selectors belonging to ancestors.
|
||||
pub struct AncestorIter<'a, Impl: 'a + SelectorImpl>(SelectorIter<'a, Impl>);
|
||||
impl<'a, Impl: 'a + SelectorImpl> AncestorIter<'a, Impl> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue