aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/inline.rs
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2015-03-09 12:33:04 -0700
committerSimon Sapin <simon.sapin@exyr.org>2015-04-27 17:12:07 +0200
commit48299a53cbe39d1a8a9bd4547a678d1d1cc345ae (patch)
treedbbfd2ad7f938e4fd634f81cceca19df707ff792 /components/layout/inline.rs
parent92359c7b9addfe7ee161760aad20368bafd76c26 (diff)
downloadservo-48299a53cbe39d1a8a9bd4547a678d1d1cc345ae.tar.gz
servo-48299a53cbe39d1a8a9bd4547a678d1d1cc345ae.zip
layout: Implement most of `border-collapse` per CSS 2.1 § 17.6.2.
Known issues: * Collapsed borders do not correctly affect the border-box of the table itself. * The content widths of all cells in a column and the content height of all cells in a row is the same in this patch, but not in Gecko and WebKit. * Corners are not painted well. The spec does not say what to do here. * Column spans are not handled well. The spec does not say what to do here either.
Diffstat (limited to 'components/layout/inline.rs')
-rw-r--r--components/layout/inline.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/components/layout/inline.rs b/components/layout/inline.rs
index 316022eec6c..e4a91bec006 100644
--- a/components/layout/inline.rs
+++ b/components/layout/inline.rs
@@ -15,7 +15,7 @@ use layout_debug;
use model::IntrinsicISizesContribution;
use text;
-use collections::{VecDeque};
+use collections::VecDeque;
use geom::{Point2D, Rect};
use gfx::font::FontMetrics;
use gfx::font_context::FontContext;
@@ -28,8 +28,8 @@ use std::num::ToPrimitive;
use std::ops::{Add, Sub, Mul, Div, Rem, Neg, Shl, Shr, Not, BitOr, BitAnd, BitXor};
use std::sync::Arc;
use std::u16;
-use style::computed_values::{display, overflow_x, text_align, text_justify, text_overflow};
-use style::computed_values::{vertical_align, white_space};
+use style::computed_values::{border_collapse, display, overflow_x, text_align, text_justify};
+use style::computed_values::{text_overflow, vertical_align, white_space};
use style::properties::ComputedValues;
use util::geometry::{Au, MAX_AU, ZERO_RECT};
use util::logical_geometry::{LogicalRect, LogicalSize, WritingMode};
@@ -1197,7 +1197,7 @@ impl Flow for InlineFlow {
{
let this = &mut *self;
for fragment in this.fragments.fragments.iter_mut() {
- fragment.compute_border_and_padding(inline_size);
+ fragment.compute_border_and_padding(inline_size, border_collapse::T::separate);
fragment.compute_block_direction_margins(inline_size);
fragment.compute_inline_direction_margins(inline_size);
fragment.assign_replaced_inline_size_if_necessary(inline_size);