mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Introduce the LayoutIterator newtype and return it for all children() methods in style and layout.
This commit is contained in:
parent
e6bbff110a
commit
4aa3e589c0
4 changed files with 25 additions and 16 deletions
|
@ -39,8 +39,8 @@ use std::ops::BitOr;
|
|||
use std::ptr;
|
||||
use std::sync::Arc;
|
||||
use style::data::PrivateStyleData;
|
||||
use style::dom::{LayoutIterator, NodeInfo, TDocument, TElement, TNode, TRestyleDamage, UnsafeNode};
|
||||
use style::dom::{OpaqueNode, PresentationalHintsSynthetizer};
|
||||
use style::dom::{NodeInfo, TDocument, TElement, TNode, TRestyleDamage, UnsafeNode};
|
||||
use style::element_state::ElementState;
|
||||
use style::error_reporting::StdoutErrorReporter;
|
||||
use style::gecko_selector_impl::{GeckoSelectorImpl, NonTSPseudoClass, PseudoElement};
|
||||
|
@ -161,12 +161,12 @@ impl<'ln> TNode for GeckoNode<'ln> {
|
|||
unimplemented!()
|
||||
}
|
||||
|
||||
fn children(self) -> GeckoChildrenIterator<'ln> {
|
||||
fn children(self) -> LayoutIterator<GeckoChildrenIterator<'ln>> {
|
||||
let maybe_iter = unsafe { Gecko_MaybeCreateStyleChildrenIterator(self.0) };
|
||||
if let Some(iter) = maybe_iter.into_owned_opt() {
|
||||
GeckoChildrenIterator::GeckoIterator(iter)
|
||||
LayoutIterator(GeckoChildrenIterator::GeckoIterator(iter))
|
||||
} else {
|
||||
GeckoChildrenIterator::Current(self.first_child())
|
||||
LayoutIterator(GeckoChildrenIterator::Current(self.first_child()))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue