Files
servo/tests/ref/basic.list
Patrick Walton 287fe3b3ab layout: Implement the correct hypothetical box behavior for
absolutely-positioned elements declared with `display: inline`.

Although the computed `display` property of elements with `position:
absolute` is `block`, `position: absolute; display: inline` can still
behave differently from `position: absolute; display: block`. This is
because the hypothetical box for `position: absolute` can be at the
position it would have been if it had `display: inline`. CSS 2.1 §
10.3.7 describes this case in a parenthetical:

"The static-position containing block is the containing block of a
hypothetical box that would have been the first box of the element if
its specified 'position' value had been 'static' and its specified
'float' had been 'none'. (Note that due to the rules in section 9.7 this
hypothetical calculation might require also assuming a different
computed value for 'display'.)"

To handle this, I had to change both style computation and layout. For
the former, I added an internal property
`-servo-display-for-hypothetical-box`, which stores the `display` value
supplied by the author, before the computed value is calculated. Flow
construction now uses this value.

As for layout, implementing the proper behavior is tricky because the
position of an inline fragment in the inline direction cannot be
determined until height assignment, which is a parallelism hazard
because in parallel layout widths are computed before heights. However,
in this particular case we can avoid the parallelism hazard because the
inline direction of a hypothetical box only affects the layout if an
absolutely-positioned element is unconstrained in the inline direction.
Therefore, we can just lay out such absolutely-positioned elements with
a bogus inline position and fix it up once the true inline position of
the hypothetical box is computed. The name for this fix-up process is
"late computation of inline position" (and the corresponding fix-up for
the block position is called "late computation of block position").

This improves the header on /r/rust.
2014-10-01 18:34:53 -07:00

165 lines
8.8 KiB
Plaintext

== basic_width_px.html basic_width_em.html
== br.html br-ref.html
# `?` and `#` in the name is a test for https://github.com/servo/servo/issues/3340
== hello_a?foo#bar.html hello_b.html
== margin_a.html margin_b.html
== root_pseudo_a.html root_pseudo_b.html
== first_child_pseudo_a.html first_child_pseudo_b.html
== last_child_pseudo_a.html last_child_pseudo_b.html
== only_child_pseudo_a.html only_child_pseudo_b.html
== nth_child_pseudo_a.html nth_child_pseudo_b.html
== nth_last_child_pseudo_a.html nth_last_child_pseudo_b.html
== nth_of_type_pseudo_a.html nth_of_type_pseudo_b.html
== nth_last_of_type_pseudo_a.html nth_last_of_type_pseudo_b.html
== first_of_type_pseudo_a.html first_of_type_pseudo_b.html
== last_of_type_pseudo_a.html last_of_type_pseudo_b.html
== only_of_type_pseudo_a.html only_of_type_pseudo_b.html
# visibility_hidden.html visibility_hidden_ref.html
== root_height_a.html root_height_b.html
== png_rgba_colorspace_a.html png_rgba_colorspace_b.html
== border_style_none_a.html border_style_none_b.html
== borders_a.html borders_b.html
== acid1_a.html acid1_b.html
== text_decoration_cached.html text_decoration_cached_ref.html
# text_decoration_propagation_a.html text_decoration_propagation_b.html
# inline_text_align_a.html inline_text_align_b.html
== font_size.html font_size_ref.html
== img_size_a.html img_size_b.html
== img_dynamic_remove.html img_dynamic_remove_ref.html
== upper_id_attr.html upper_id_attr_ref.html
# inline_border_a.html inline_border_b.html
== anon_block_inherit_a.html anon_block_inherit_b.html
== attr_exists_selector.html attr_exists_selector_ref.html
!= noteq_attr_exists_selector.html attr_exists_selector_ref.html
== data_img_a.html data_img_b.html
== background_style_attr.html background_ref.html
== background_external_stylesheet.html background_ref.html
== block_image.html 500x300_green.html
!= block_image.html noteq_500x300_white.html
== object_element_a.html object_element_b.html
== append_style_a.html append_style_b.html
== height_compute_reset.html height_compute.html
== width_nonreplaced_block_simple_a.html width_nonreplaced_block_simple_b.html
== max_width_float_simple_a.html max_width_float_simple_b.html
== max_width_simple_a.html max_width_simple_b.html
== min_width_float_simple_a.html min_width_float_simple_b.html
== min_width_simple_a.html min_width_simple_b.html
# Positioning tests
== position_abs_cb_with_non_cb_kid_a.html position_abs_cb_with_non_cb_kid_b.html
== position_abs_height_width_a.html position_abs_height_width_b.html
== position_abs_left_a.html position_abs_left_b.html
== position_abs_margin_top_percentage_a.html position_abs_margin_top_percentage_b.html
== position_abs_nested_a.html position_abs_nested_b.html
== position_abs_replaced_simple_a.html position_abs_replaced_simple_b.html
== position_abs_static_y_a.html position_abs_static_y_b.html
== position_abs_width_percentage_a.html position_abs_width_percentage_b.html
== position_abs_pseudo_a.html position_abs_pseudo_b.html
# commented out because multiple layers don't work with reftests --pcwalton
# == position_fixed_a.html position_fixed_b.html
# == position_fixed_simple_a.html position_fixed_simple_b.html
# == position_fixed_static_y_a.html position_fixed_static_y_b.html
== position_relative_a.html position_relative_b.html
== position_relative_top_percentage_a.html position_relative_top_percentage_b.html
== background_none_a.html background_none_b.html
== negative_margins_a.html negative_margins_b.html
== negative_margin_uncle_a.html negative_margin_uncle_b.html
== inline_padding_a.html inline_padding_b.html
== min_max_height_a.html min_max_height_b.html
== minimum_line_height_a.html minimum_line_height_b.html
== background_position_a.html background_position_b.html
== background_position_keyword.html background_position_b.html
== background_position_percent.html background_position_b.html
== background_position_shorthand.html background_position_shorthand_ref.html
== background_repeat_x_a.html background_repeat_x_b.html
== background_repeat_y_a.html background_repeat_y_b.html
== background_repeat_none_a.html background_repeat_none_b.html
== background_repeat_both_a.html background_repeat_both_b.html
== setattribute_id_restyle_a.html setattribute_id_restyle_b.html
== pseudo_element_a.html pseudo_element_b.html
flaky_cpu == linebreak_simple_a.html linebreak_simple_b.html
== linebreak_inline_span_a.html linebreak_inline_span_b.html
# Should be == with expected failure. See #2797
!= overconstrained_block.html overconstrained_block_ref.html
== overflow_auto.html overflow_simple_b.html
== overflow_scroll.html overflow_simple_b.html
== overflow_simple_a.html overflow_simple_b.html
== position_fixed_background_color_a.html position_fixed_background_color_b.html
== position_fixed_overflow_a.html position_fixed_overflow_b.html
== noscript.html noscript_ref.html
== pseudo_inherit.html pseudo_inherit_ref.html
experimental == vertical-lr-blocks.html vertical-lr-blocks_ref.html
== float_intrinsic_height.html float_intrinsic_height_ref.html
== table_auto_width.html table_auto_width_ref.html
== inline_whitespace_b.html inline_whitespace_ref.html
== inline_whitespace_a.html inline_whitespace_ref.html
== whitespace_pre.html whitespace_pre_ref.html
== line_height_a.html line_height_ref.html
== block_replaced_content_a.html block_replaced_content_ref.html
== block_replaced_content_b.html block_replaced_content_ref.html
== root_margin_collapse_a.html root_margin_collapse_b.html
# Should be == with expected failure:
fragment=top != ../html/acid2.html acid2_ref.html
# Should be != with expected failure:
# FIXME: use the real test when pixel-snapping for scrolling is fixed.
#fragment=top == ../html/acid2.html acid2_ref_broken.html
== acid2_noscroll.html acid2_ref_broken.html
!= inline_background_a.html inline_background_ref.html
== inline_element_border_a.html inline_element_border_ref.html
== float_intrinsic_width_a.html float_intrinsic_width_ref.html
== float_right_intrinsic_width_a.html float_right_intrinsic_width_ref.html
== fixed_width_overrides_child_intrinsic_width_a.html fixed_width_overrides_child_intrinsic_width_ref.html
== abs_float_pref_width_a.html abs_float_pref_width_ref.html
== alpha_png_a.html alpha_png_b.html
== background_image_position_a.html background_image_position_ref.html
# The following tests fails the ref-tests
#== multiple_css_class_a.html multiple_css_class_b.html
== iframe/simple.html iframe/simple_ref.html
== iframe/multiple_external.html iframe/multiple_external_ref.html
== iframe/overflow.html iframe/overflow_ref.html
== floated_generated_content_a.html floated_generated_content_b.html
== inline_block_margin_a.html inline_block_margin_ref.html
== inline_block_img_a.html inline_block_img_ref.html
== inline_block_baseline_a.html inline_block_baseline_ref.html
== float_table_a.html float_table_ref.html
== table_containing_block_a.html table_containing_block_ref.html
== link_style_order.html link_style_order_ref.html
== link_style_dynamic_addition.html link_style_dynamic_addition_ref.html
== percent_height.html percent_height_ref.html
== inline_block_with_margin_a.html inline_block_with_margin_ref.html
== table_padding_a.html table_padding_ref.html
== img_block_display_a.html img_block_display_ref.html
== after_block_iteration.html after_block_iteration_ref.html
== inline_block_percentage_height_a.html inline_block_percentage_height_ref.html
== percentage_height_float_a.html percentage_height_float_ref.html
== img_block_maxwidth_a.html img_block_maxwidth_ref.html
== img_block_maxwidth_b.html img_block_maxwidth_ref.html
== float_clearance_a.html float_clearance_ref.html
== block_formatting_context_a.html block_formatting_context_ref.html
== inline_block_parent_padding_a.html inline_block_parent_padding_ref.html
== whitespace_nowrap_a.html whitespace_nowrap_ref.html
== block_formatting_context_relative_a.html block_formatting_context_ref.html
== block_formatting_context_translation_a.html block_formatting_context_translation_ref.html
== floated_table_with_margin_a.html floated_table_with_margin_ref.html
== margins_inside_floats_a.html margins_inside_floats_ref.html
== block_formatting_context_complex_a.html block_formatting_context_complex_ref.html
== block_formatting_context_containing_floats_a.html block_formatting_context_containing_floats_ref.html
== clear_generated_content_table_a.html clear_generated_content_table_ref.html
== inline_block_border_a.html inline_block_border_ref.html
== vertical_align_top_a.html vertical_align_top_ref.html
== vertical_align_bottom_a.html vertical_align_bottom_ref.html
== vertical_align_top_span_a.html vertical_align_top_span_ref.html
== vertical_align_top_bottom_a.html vertical_align_top_bottom_ref.html
== vertical_align_sub_a.html vertical_align_sub_ref.html
== vertical_align_super_a.html vertical_align_super_ref.html
== vertical_align_text_top_a.html vertical_align_text_top_ref.html
== vertical_align_text_bottom_a.html vertical_align_text_bottom_ref.html
== inline_hypothetical_box_a.html inline_hypothetical_box_ref.html