mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Introduce CSSPixelLength and update NonNegativeLength.
First, we define computed::CSSPixelLength which contains a CSSFloat, a pixel value, and then we replace computed::Length with CSSPixelLength. Therefore, the |ComputedValue| of NoCalcLength, AbsoluteLength, FontRelativeLength, ViewportPercentageLength, CharacterWidth, and PhysicalLength is CSSPixelLength. Besides, we drop NonNegativeAu, and replace computed::NonNegativeLength with NonNegative<computed::Length>. (i.e. NonNegative<CSSPixelLength>)
This commit is contained in:
parent
cad3aff508
commit
a949e2a057
40 changed files with 502 additions and 406 deletions
|
@ -22,7 +22,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 style::values::computed::NonNegativeLength;
|
||||
use table::{ColumnIntrinsicInlineSize, InternalTable, TableLikeFlow};
|
||||
|
||||
/// A table formatting context.
|
||||
|
@ -57,8 +57,8 @@ impl TableRowGroupFlow {
|
|||
block_flow: BlockFlow::from_fragment(fragment),
|
||||
column_intrinsic_inline_sizes: Vec::new(),
|
||||
spacing: border_spacing::T {
|
||||
horizontal: NonNegativeAu::zero(),
|
||||
vertical: NonNegativeAu::zero(),
|
||||
horizontal: NonNegativeLength::zero(),
|
||||
vertical: NonNegativeLength::zero(),
|
||||
},
|
||||
collapsed_inline_direction_border_widths_for_table: Vec::new(),
|
||||
collapsed_block_direction_border_widths_for_table: Vec::new(),
|
||||
|
@ -163,7 +163,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.0)
|
||||
self.block_flow.assign_block_size_for_table_like_flow(Au::from(self.spacing.vertical))
|
||||
}
|
||||
|
||||
fn compute_stacking_relative_position(&mut self, layout_context: &LayoutContext) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue