auto merge of #1216 : june0cho/servo/temp_fix_tableflow, r=kmcallister

In order to fix the wikipedia error, I temporarily change the display property of table-related elements to 'block' instead of 'inline'.
When table is implemented, it should be changed to proper value.

@sonwow
@brson
This commit is contained in:
bors-servo 2013-11-11 16:52:34 -08:00
commit 433f19f5a3
2 changed files with 9 additions and 3 deletions

View file

@ -388,6 +388,11 @@ impl LayoutTreeBuilder {
let display = match node.type_id() { let display = match node.type_id() {
ElementNodeTypeId(_) => match node.style().Box.display { ElementNodeTypeId(_) => match node.style().Box.display {
display::none => return NoGenerator, display::none => return NoGenerator,
display::table | display::inline_table | display::table_row_group
| display::table_header_group | display::table_footer_group
| display::table_row | display::table_column_group
| display::table_column | display::table_cell | display::table_caption
=> display::block,
display => display, display => display,
}, },
TextNodeTypeId => display::inline, TextNodeTypeId => display::inline,

View file

@ -225,10 +225,11 @@ pub mod longhands {
// TODO: don't parse values we don't support // TODO: don't parse values we don't support
<%self:single_keyword_computed name="display" <%self:single_keyword_computed name="display"
values="inline block inline-block none"> values="inline block inline-block
table inline-table table-row-group table-header-group table-footer-group
table-row table-column-group table-column table-cell table-caption
none">
// list-item // list-item
// table inline-table table-row-group table-header-group table-footer-group
// table-row table-column-group table-column table-cell table-caption
pub fn to_computed_value(value: SpecifiedValue, context: &computed::Context) pub fn to_computed_value(value: SpecifiedValue, context: &computed::Context)
-> computed_value::T { -> computed_value::T {
// if context.is_root_element && value == list_item { // if context.is_root_element && value == list_item {