mirror of
https://github.com/servo/servo.git
synced 2025-07-23 15:23:42 +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::PerLevelTraversalData;
|
||||||
use style::traversal::{recalc_style_at, DomTraversal};
|
use style::traversal::{recalc_style_at, DomTraversal};
|
||||||
|
|
||||||
pub struct RecalcStyleAndConstructFlows<'a> {
|
pub struct RecalcStyle<'a> {
|
||||||
context: LayoutContext<'a>,
|
context: LayoutContext<'a>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> RecalcStyleAndConstructFlows<'a> {
|
impl<'a> RecalcStyle<'a> {
|
||||||
pub fn new(context: LayoutContext<'a>) -> Self {
|
pub fn new(context: LayoutContext<'a>) -> Self {
|
||||||
RecalcStyleAndConstructFlows { context: context }
|
RecalcStyle { context: context }
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn destroy(self) -> LayoutContext<'a> {
|
pub fn destroy(self) -> LayoutContext<'a> {
|
||||||
|
@ -26,7 +26,7 @@ impl<'a> RecalcStyleAndConstructFlows<'a> {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unsafe_code)]
|
#[allow(unsafe_code)]
|
||||||
impl<'a, E> DomTraversal<E> for RecalcStyleAndConstructFlows<'a>
|
impl<'a, E> DomTraversal<E> for RecalcStyle<'a>
|
||||||
where
|
where
|
||||||
E: TElement,
|
E: TElement,
|
||||||
E::ConcreteNode: LayoutNode,
|
E::ConcreteNode: LayoutNode,
|
||||||
|
|
|
@ -44,7 +44,7 @@ use layout::query::{
|
||||||
process_offset_parent_query, process_resolved_style_request, process_style_query,
|
process_offset_parent_query, process_resolved_style_request, process_style_query,
|
||||||
process_text_index_request,
|
process_text_index_request,
|
||||||
};
|
};
|
||||||
use layout::traversal::RecalcStyleAndConstructFlows;
|
use layout::traversal::RecalcStyle;
|
||||||
use layout_traits::LayoutThreadFactory;
|
use layout_traits::LayoutThreadFactory;
|
||||||
use libc::c_void;
|
use libc::c_void;
|
||||||
use malloc_size_of::{MallocSizeOf, MallocSizeOfOps};
|
use malloc_size_of::{MallocSizeOf, MallocSizeOfOps};
|
||||||
|
@ -1066,19 +1066,14 @@ impl LayoutThread {
|
||||||
// Create a layout context for use throughout the following passes.
|
// Create a layout context for use throughout the following passes.
|
||||||
let mut layout_context = self.build_layout_context(guards.clone(), &map);
|
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 token = {
|
||||||
let shared =
|
let shared = DomTraversal::<ServoLayoutElement>::shared_context(&traversal);
|
||||||
<RecalcStyleAndConstructFlows as DomTraversal<ServoLayoutElement>>::shared_context(
|
RecalcStyle::pre_traverse(element, shared)
|
||||||
&traversal,
|
|
||||||
);
|
|
||||||
RecalcStyleAndConstructFlows::pre_traverse(element, shared)
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if token.should_traverse() {
|
if token.should_traverse() {
|
||||||
driver::traverse_dom::<ServoLayoutElement, RecalcStyleAndConstructFlows>(
|
driver::traverse_dom(&traversal, token, None);
|
||||||
&traversal, token, None,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for element in elements_with_snapshot {
|
for element in elements_with_snapshot {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue