mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Fix servo build.
This commit is contained in:
parent
1cb235c81a
commit
6daebcc5df
18 changed files with 210 additions and 170 deletions
|
@ -15,7 +15,6 @@ use crate::flow::{
|
|||
use crate::flow_list::MutFlowListIterator;
|
||||
use crate::fragment::{Fragment, FragmentBorderBoxIterator, Overflow};
|
||||
use crate::layout_debug;
|
||||
use crate::model::MaybeAuto;
|
||||
use crate::table::{ColumnComputedInlineSize, ColumnIntrinsicInlineSize, InternalTable, VecExt};
|
||||
use crate::table_cell::{CollapsedBordersForCell, TableCellFlow};
|
||||
use app_units::Au;
|
||||
|
@ -30,7 +29,7 @@ use style::computed_values::border_spacing::T as BorderSpacing;
|
|||
use style::computed_values::border_top_style::T as BorderStyle;
|
||||
use style::logical_geometry::{LogicalSize, PhysicalSide, WritingMode};
|
||||
use style::properties::ComputedValues;
|
||||
use style::values::computed::{Color, LengthPercentageOrAuto};
|
||||
use style::values::computed::{Color, NonNegativeLengthPercentageOrAuto};
|
||||
|
||||
#[allow(unsafe_code)]
|
||||
unsafe impl crate::flow::HasBaseFlow for TableRowFlow {}
|
||||
|
@ -208,16 +207,15 @@ impl TableRowFlow {
|
|||
&mut max_block_size,
|
||||
);
|
||||
|
||||
let mut block_size = max_block_size;
|
||||
// TODO: Percentage block-size
|
||||
block_size = match MaybeAuto::from_style(
|
||||
self.block_flow.fragment.style().content_block_size(),
|
||||
Au(0),
|
||||
) {
|
||||
MaybeAuto::Auto => block_size,
|
||||
MaybeAuto::Specified(value) => max(value, block_size),
|
||||
};
|
||||
block_size
|
||||
let block_size = self
|
||||
.block_flow
|
||||
.fragment
|
||||
.style()
|
||||
.content_block_size()
|
||||
.to_used_value(Au(0))
|
||||
.unwrap_or(max_block_size);
|
||||
max(block_size, max_block_size)
|
||||
}
|
||||
|
||||
pub fn assign_block_size_to_self_and_children(
|
||||
|
@ -431,23 +429,23 @@ impl Flow for TableRowFlow {
|
|||
let child_base = kid.mut_base();
|
||||
let child_column_inline_size = ColumnIntrinsicInlineSize {
|
||||
minimum_length: match child_specified_inline_size {
|
||||
LengthPercentageOrAuto::Auto => None,
|
||||
LengthPercentageOrAuto::LengthPercentage(ref lp) => {
|
||||
lp.maybe_to_used_value(None)
|
||||
NonNegativeLengthPercentageOrAuto::Auto => None,
|
||||
NonNegativeLengthPercentageOrAuto::LengthPercentage(ref lp) => {
|
||||
lp.0.maybe_to_used_value(None)
|
||||
},
|
||||
}
|
||||
.unwrap_or(child_base.intrinsic_inline_sizes.minimum_inline_size),
|
||||
percentage: match child_specified_inline_size {
|
||||
LengthPercentageOrAuto::Auto => 0.0,
|
||||
LengthPercentageOrAuto::LengthPercentage(ref lp) => {
|
||||
lp.as_percentage().map_or(0.0, |p| p.0)
|
||||
NonNegativeLengthPercentageOrAuto::Auto => 0.0,
|
||||
NonNegativeLengthPercentageOrAuto::LengthPercentage(ref lp) => {
|
||||
lp.0.as_percentage().map_or(0.0, |p| p.0)
|
||||
},
|
||||
},
|
||||
preferred: child_base.intrinsic_inline_sizes.preferred_inline_size,
|
||||
constrained: match child_specified_inline_size {
|
||||
LengthPercentageOrAuto::Auto => false,
|
||||
LengthPercentageOrAuto::LengthPercentage(ref lp) => {
|
||||
lp.maybe_to_used_value(None).is_some()
|
||||
NonNegativeLengthPercentageOrAuto::Auto => false,
|
||||
NonNegativeLengthPercentageOrAuto::LengthPercentage(ref lp) => {
|
||||
lp.0.maybe_to_used_value(None).is_some()
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue