mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Rename RecalcStyleAndConstructFlows to RecalcStyle
It doesn't construct flows anymore.
This commit is contained in:
parent
eaf08ef517
commit
be0e84b30f
2 changed files with 9 additions and 14 deletions
|
@ -11,13 +11,13 @@ use style::dom::{NodeInfo, TElement, TNode};
|
|||
use style::traversal::PerLevelTraversalData;
|
||||
use style::traversal::{recalc_style_at, DomTraversal};
|
||||
|
||||
pub struct RecalcStyleAndConstructFlows<'a> {
|
||||
pub struct RecalcStyle<'a> {
|
||||
context: LayoutContext<'a>,
|
||||
}
|
||||
|
||||
impl<'a> RecalcStyleAndConstructFlows<'a> {
|
||||
impl<'a> RecalcStyle<'a> {
|
||||
pub fn new(context: LayoutContext<'a>) -> Self {
|
||||
RecalcStyleAndConstructFlows { context: context }
|
||||
RecalcStyle { context: context }
|
||||
}
|
||||
|
||||
pub fn destroy(self) -> LayoutContext<'a> {
|
||||
|
@ -26,7 +26,7 @@ impl<'a> RecalcStyleAndConstructFlows<'a> {
|
|||
}
|
||||
|
||||
#[allow(unsafe_code)]
|
||||
impl<'a, E> DomTraversal<E> for RecalcStyleAndConstructFlows<'a>
|
||||
impl<'a, E> DomTraversal<E> for RecalcStyle<'a>
|
||||
where
|
||||
E: TElement,
|
||||
E::ConcreteNode: LayoutNode,
|
||||
|
|
|
@ -44,7 +44,7 @@ use layout::query::{
|
|||
process_offset_parent_query, process_resolved_style_request, process_style_query,
|
||||
process_text_index_request,
|
||||
};
|
||||
use layout::traversal::RecalcStyleAndConstructFlows;
|
||||
use layout::traversal::RecalcStyle;
|
||||
use layout_traits::LayoutThreadFactory;
|
||||
use libc::c_void;
|
||||
use malloc_size_of::{MallocSizeOf, MallocSizeOfOps};
|
||||
|
@ -1066,19 +1066,14 @@ impl LayoutThread {
|
|||
// Create a layout context for use throughout the following passes.
|
||||
let mut layout_context = self.build_layout_context(guards.clone(), &map);
|
||||
|
||||
let traversal = RecalcStyleAndConstructFlows::new(layout_context);
|
||||
let traversal = RecalcStyle::new(layout_context);
|
||||
let token = {
|
||||
let shared =
|
||||
<RecalcStyleAndConstructFlows as DomTraversal<ServoLayoutElement>>::shared_context(
|
||||
&traversal,
|
||||
);
|
||||
RecalcStyleAndConstructFlows::pre_traverse(element, shared)
|
||||
let shared = DomTraversal::<ServoLayoutElement>::shared_context(&traversal);
|
||||
RecalcStyle::pre_traverse(element, shared)
|
||||
};
|
||||
|
||||
if token.should_traverse() {
|
||||
driver::traverse_dom::<ServoLayoutElement, RecalcStyleAndConstructFlows>(
|
||||
&traversal, token, None,
|
||||
);
|
||||
driver::traverse_dom(&traversal, token, None);
|
||||
}
|
||||
|
||||
for element in elements_with_snapshot {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue