Handle generated content with display: block correctly during flow

construction.

The iteration was incorrect here. Although it accidentally worked
before, it will cause problems when we have incremental style
recalculation.

The `after_block_iteration` reftest will become interesting once we have
incremental style recalc.
This commit is contained in:
Patrick Walton 2014-09-17 18:03:24 -07:00
parent 6d6726178a
commit b4db9aeaeb
6 changed files with 86 additions and 19 deletions

View file

@ -351,10 +351,12 @@ impl TableColumnFragmentInfo {
impl Fragment {
/// Constructs a new `Fragment` instance for the given node.
///
/// This does *not* construct the text for generated content. See comments in
/// `FlowConstructor::build_specific_fragment_info_for_node()` for more details.
///
/// Arguments:
///
/// * `constructor`: The flow constructor.
///
/// * `node`: The node to create a fragment for.
pub fn new(constructor: &mut FlowConstructor, node: &ThreadSafeLayoutNode) -> Fragment {
let style = node.style().clone();
@ -373,7 +375,8 @@ impl Fragment {
}
/// Constructs a new `Fragment` instance from a specific info.
pub fn new_from_specific_info(node: &ThreadSafeLayoutNode, specific: SpecificFragmentInfo) -> Fragment {
pub fn new_from_specific_info(node: &ThreadSafeLayoutNode, specific: SpecificFragmentInfo)
-> Fragment {
let style = node.style().clone();
let writing_mode = style.writing_mode;
Fragment {