removed restyledamage

This commit is contained in:
Clark Gaebel 2014-10-07 14:12:18 -04:00
parent d12c6e7383
commit a29dc2c979
4 changed files with 49 additions and 98 deletions

View file

@ -34,7 +34,6 @@ use fragment::{InlineBlockFragmentInfo, InputFragment, InputFragmentInfo, Specif
use fragment::{TableCellFragment, TableColumnFragment, TableColumnFragmentInfo, TableFragment};
use fragment::{TableRowFragment, TableWrapperFragment, UnscannedTextFragment};
use fragment::{UnscannedTextFragmentInfo};
use incremental::RestyleDamage;
use inline::{InlineFragments, InlineFlow};
use parallel;
use table_wrapper::TableWrapperFlow;
@ -89,7 +88,7 @@ pub enum ConstructionItem {
/// Inline fragments and associated {ib} splits that have not yet found flows.
InlineFragmentsConstructionItem(InlineFragmentsConstructionResult),
/// Potentially ignorable whitespace.
WhitespaceConstructionItem(OpaqueNode, Arc<ComputedValues>, RestyleDamage),
WhitespaceConstructionItem(OpaqueNode, Arc<ComputedValues>),
/// TableColumn Fragment
TableColumnFragmentConstructionItem(Fragment),
}
@ -442,15 +441,13 @@ impl<'a> FlowConstructor<'a> {
abs_descendants.push_descendants(kid_abs_descendants);
}
ConstructionItemConstructionResult(WhitespaceConstructionItem(whitespace_node,
whitespace_style,
whitespace_damage)) => {
whitespace_style)) => {
// Add whitespace results. They will be stripped out later on when
// between block elements, and retained when between inline elements.
let fragment_info =
UnscannedTextFragment(UnscannedTextFragmentInfo::from_text(" ".to_string()));
let mut fragment = Fragment::from_opaque_node_and_style(whitespace_node,
whitespace_style,
whitespace_damage,
fragment_info);
inline_fragment_accumulator.fragments.push(&mut fragment);
}
@ -610,14 +607,11 @@ impl<'a> FlowConstructor<'a> {
abs_descendants.push_descendants(kid_abs_descendants);
}
ConstructionItemConstructionResult(WhitespaceConstructionItem(whitespace_node,
whitespace_style,
whitespace_damage))
=> {
whitespace_style)) => {
// Instantiate the whitespace fragment.
let fragment_info = UnscannedTextFragment(UnscannedTextFragmentInfo::from_text(" ".to_string()));
let mut fragment = Fragment::from_opaque_node_and_style(whitespace_node,
whitespace_style,
whitespace_damage,
fragment_info);
fragment_accumulator.fragments.push(&mut fragment)
}
@ -659,8 +653,7 @@ impl<'a> FlowConstructor<'a> {
let opaque_node = OpaqueNodeMethods::from_thread_safe_layout_node(node);
return ConstructionItemConstructionResult(WhitespaceConstructionItem(
opaque_node,
node.style().clone(),
node.restyle_damage()))
node.style().clone()))
}
// If this is generated content, then we need to initialize the accumulator with the
@ -1206,9 +1199,6 @@ impl FlowConstructionUtils for FlowRef {
{
let kid_base = flow::mut_base(new_child.get_mut());
base.restyle_damage.insert(kid_base.restyle_damage.propagate_up());
kid_base.parallel.parent = parallel::mut_owned_flow_to_unsafe_flow(self);
}