Bug 1374233 - Part 5: Use NonNegativeLength and NonNegativeAu for border-spacing.

We already have NonNegativeLength and NonNegativeAu, so we can re-use it
to define the specified value and the computed value of border-spacing.
And then implement ToAnimatedValue for it.

MozReview-Commit-ID: CLckpKMYVXU
This commit is contained in:
Boris Chiou 2017-07-21 13:35:06 +08:00
parent 2ef38ce67a
commit 190cd5b952
8 changed files with 67 additions and 33 deletions

View file

@ -21,6 +21,7 @@ use std::iter::{IntoIterator, Iterator, Peekable};
use style::computed_values::{border_collapse, border_spacing};
use style::logical_geometry::LogicalSize;
use style::properties::ComputedValues;
use style::values::computed::NonNegativeAu;
use table::{ColumnIntrinsicInlineSize, InternalTable, TableLikeFlow};
/// A table formatting context.
@ -55,8 +56,8 @@ impl TableRowGroupFlow {
block_flow: BlockFlow::from_fragment(fragment),
column_intrinsic_inline_sizes: Vec::new(),
spacing: border_spacing::T {
horizontal: Au(0),
vertical: Au(0),
horizontal: NonNegativeAu::zero(),
vertical: NonNegativeAu::zero(),
},
collapsed_inline_direction_border_widths_for_table: Vec::new(),
collapsed_block_direction_border_widths_for_table: Vec::new(),
@ -161,7 +162,7 @@ impl Flow for TableRowGroupFlow {
fn assign_block_size(&mut self, _: &LayoutContext) {
debug!("assign_block_size: assigning block_size for table_rowgroup");
self.block_flow.assign_block_size_for_table_like_flow(self.spacing.vertical)
self.block_flow.assign_block_size_for_table_like_flow(self.spacing.vertical.0)
}
fn compute_absolute_position(&mut self, layout_context: &LayoutContext) {