servo/components/layout
bors-servo bdcf606f48 Auto merge of #5691 - pcwalton:hypothetical-box-reform, r=glennw
Before this change, Servo used one code path that computed the position
of flows with `position: static` or `position: relative` and another
separate code path that computed the position of flows with `position:
absolute` or `position: fixed`. The latter code attempted to duplicate
the former code to determine the static position of hypothetical boxes,
but this was both fragile and incorrect in the case of hypothetical
boxes nested inside floats. In fact, it's impossible to determine the
static position of an absolute flow relative to its containing block at
inline-size assignment time, because that static position could depend
on a float that cannot be placed until block-size assignment!

This patch changes block layout to use the same code path for static
positioning of regular flows and static positioning of absolute flows
where applicable. This both simplifies the code and improves its
efficiency, since it allows the `hypothetical_position` field and
`static_block_offsets` data structure to be removed. Moreover, it
improves correctness in the above case (which the new reftest checks).
This allows the sidebar in Facebook Timeline to be positioned properly.

r? @glennw

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5691)
<!-- Reviewable:end -->
2015-04-14 18:14:11 -05:00
..
css Adding cmdling argument for disabling style share cache, fix #5581 2015-04-09 21:42:41 -04:00
animation.rs layout: Implement CSS transitions per CSS-TRANSITIONS § 2. 2015-03-31 08:46:11 -07:00
block.rs layout: Minor stylistic cleanup. 2015-04-14 13:00:11 -07:00
Cargo.toml Split out shared networking code into net_traits crate 2015-04-03 13:38:10 -04:00
construct.rs layout: Lay out nested inline elements with different vertical-align 2015-04-09 14:55:05 -07:00
context.rs Split out shared networking code into net_traits crate 2015-04-03 13:38:10 -04:00
data.rs Replace unsafe_blocks by unsafe_code. 2015-03-21 10:27:32 +01:00
display_list_builder.rs Switch Arc<Box<Image>> to Arc<Image> for perf boost. 2015-04-10 18:59:02 -04:00
floats.rs layout: During inline layout, make place_between_floats use the same 2015-04-09 14:23:08 -07:00
flow.rs layout: Use the same code path for computing static positions of regular 2015-04-14 13:00:10 -07:00
flow_list.rs Use usize in flow_list. 2015-03-29 12:43:44 +02:00
flow_ref.rs Replace unsafe_blocks by unsafe_code. 2015-03-21 10:27:32 +01:00
fragment.rs layout: Minor stylistic cleanup. 2015-04-14 13:00:11 -07:00
generated_content.rs Use usize in generated_content. 2015-04-02 15:06:27 +02:00
incremental.rs layout: Implement ordered lists, CSS counters, and quotes per CSS 2.1 2015-03-09 17:13:45 -07:00
inline.rs layout: Use the same code path for computing static positions of regular 2015-04-14 13:00:10 -07:00
layout_debug.rs Remove old_path usage from layout. 2015-03-25 22:36:01 +01:00
layout_task.rs Auto merge of #5593 - shinglyu:ismap, r=jdm 2015-04-14 00:10:08 -05:00
lib.rs Split out shared networking code into net_traits crate 2015-04-03 13:38:10 -04:00
list_item.rs layout: Position and size list images properly in the block direction. 2015-04-07 15:42:52 -07:00
model.rs layout: Use the same code path for computing static positions of regular 2015-04-14 13:00:10 -07:00
opaque_node.rs Replace unsafe_blocks by unsafe_code. 2015-03-21 10:27:32 +01:00
parallel.rs Use isize with children_count members. 2015-04-02 14:50:15 +02:00
sequential.rs layout: Implement ordered lists, CSS counters, and quotes per CSS 2.1 2015-03-09 17:13:45 -07:00
table.rs layout: Use the same code path for computing static positions of regular 2015-04-14 13:00:10 -07:00
table_caption.rs Replace unsafe_blocks by unsafe_code. 2015-03-21 10:27:32 +01:00
table_cell.rs Replace unsafe_blocks by unsafe_code. 2015-03-21 10:27:32 +01:00
table_colgroup.rs Use u32 for TableColumnFragmentInfo::span. 2015-04-02 14:46:19 +02:00
table_row.rs Replace unsafe_blocks by unsafe_code. 2015-03-21 10:27:32 +01:00
table_rowgroup.rs Replace unsafe_blocks by unsafe_code. 2015-03-21 10:27:32 +01:00
table_wrapper.rs layout: Minor stylistic cleanup. 2015-04-14 13:00:11 -07:00
text.rs layout: Simplify and improve the correctness of whitespace stripping in 2015-04-08 14:29:23 -07:00
traversal.rs Stop using u/i suffixes in layout. 2015-04-02 15:14:09 +02:00
wrapper.rs Add/update comments with links to spec 2015-04-14 18:03:13 -04:00