mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
style: Add methods to iterate a subtree in preorder.
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
This commit is contained in:
parent
6ae8bdee61
commit
4f997bf333
2 changed files with 65 additions and 2 deletions
|
@ -104,6 +104,12 @@ use stylist::Stylist;
|
|||
#[derive(Clone, Copy)]
|
||||
pub struct GeckoNode<'ln>(pub &'ln RawGeckoNode);
|
||||
|
||||
impl<'ln> PartialEq for GeckoNode<'ln> {
|
||||
fn eq(&self, other: &Self) -> bool {
|
||||
self.0 as *const _ == other.0 as *const _
|
||||
}
|
||||
}
|
||||
|
||||
impl<'ln> fmt::Debug for GeckoNode<'ln> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
if let Some(el) = self.as_element() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue